Skip to content

Commit

Permalink
Display GL_POINTS instead of GL_NONE when capturing points.
Browse files Browse the repository at this point in the history
  • Loading branch information
maierlars committed Nov 2, 2024
1 parent 3656641 commit 5261f52
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion renderdoc/driver/gl/wrappers/gl_buffer_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3409,10 +3409,34 @@ void WrappedOpenGL::glBindTransformFeedback(GLenum target, GLuint id)
}
}

enum GLprimitiveMode
{
points = eGL_POINTS,
lines = eGL_LINES,
triangles = eGL_TRIANGLES,
};

DECLARE_REFLECTION_ENUM(GLprimitiveMode);

template <>
rdcstr DoStringise(const GLprimitiveMode &el)
{
RDCCOMPILE_ASSERT(sizeof(GLprimitiveMode) == sizeof(GLenum) && sizeof(GLprimitiveMode) == sizeof(uint32_t),
"Fake bitfield enum must be uint32_t sized");

BEGIN_ENUM_STRINGISE(GLprimitiveMode);
{
STRINGISE_ENUM_NAMED(points, "GL_POINTS");
STRINGISE_ENUM_NAMED(lines, "GL_LINES");
STRINGISE_ENUM_NAMED(triangles, "GL_TRIANGLES");
}
END_ENUM_STRINGISE();
}

template <typename SerialiserType>
bool WrappedOpenGL::Serialise_glBeginTransformFeedback(SerialiserType &ser, GLenum primitiveMode)
{
SERIALISE_ELEMENT(primitiveMode);
SERIALISE_ELEMENT_TYPED(GLprimitiveMode, primitiveMode);

SERIALISE_CHECK_READ_ERRORS();

Expand Down

0 comments on commit 5261f52

Please sign in to comment.