Move UniformType and AttribType enums to global scope

This commit is contained in:
baldurk
2017-11-03 17:45:40 +00:00
parent 091a32d98f
commit b695720a11
3 changed files with 71 additions and 67 deletions
+4 -4
View File
@@ -2518,14 +2518,14 @@ void SerialiseProgramBindings(const GLHookSet &gl, Serialiser *ser, GLuint prog,
}
template <>
std::string DoStringise(const WrappedOpenGL::UniformType &el)
std::string DoStringise(const UniformType &el)
{
switch(el)
{
case WrappedOpenGL::UNIFORM_UNKNOWN: return "unk";
case UNIFORM_UNKNOWN: return "unk";
#define VEC2STR(suffix) \
case WrappedOpenGL::CONCAT(VEC, suffix): return STRINGIZE(suffix);
case CONCAT(VEC, suffix): return STRINGIZE(suffix);
VEC2STR(1fv)
VEC2STR(1iv)
VEC2STR(1uiv)
@@ -2545,7 +2545,7 @@ std::string DoStringise(const WrappedOpenGL::UniformType &el)
#undef VEC2STR
#define MAT2STR(suffix) \
case WrappedOpenGL::CONCAT(MAT, suffix): return STRINGIZE(suffix);
case CONCAT(MAT, suffix): return STRINGIZE(suffix);
MAT2STR(2fv)
MAT2STR(2x3fv)
MAT2STR(2x4fv)
+67
View File
@@ -297,6 +297,73 @@ void GetBindpointMapping(const GLHookSet &gl, GLuint curProg, int shadIdx, Shade
void ResortBindings(ShaderReflection *refl, ShaderBindpointMapping *mapping);
enum UniformType
{
UNIFORM_UNKNOWN,
VEC1fv,
VEC1iv,
VEC1uiv,
VEC1dv,
VEC2fv,
VEC2iv,
VEC2uiv,
VEC2dv,
VEC3fv,
VEC3iv,
VEC3uiv,
VEC3dv,
VEC4fv,
VEC4iv,
VEC4uiv,
VEC4dv,
MAT2fv,
MAT2x3fv,
MAT2x4fv,
MAT3fv,
MAT3x2fv,
MAT3x4fv,
MAT4fv,
MAT4x2fv,
MAT4x3fv,
MAT2dv,
MAT2x3dv,
MAT2x4dv,
MAT3dv,
MAT3x2dv,
MAT3x4dv,
MAT4dv,
MAT4x2dv,
MAT4x3dv,
};
DECLARE_REFLECTION_ENUM(UniformType);
enum AttribType
{
Attrib_GLdouble = 0x01,
Attrib_GLfloat = 0x02,
Attrib_GLshort = 0x03,
Attrib_GLushort = 0x04,
Attrib_GLbyte = 0x05,
Attrib_GLubyte = 0x06,
Attrib_GLint = 0x07,
Attrib_GLuint = 0x08,
Attrib_packed = 0x09,
Attrib_typemask = 0x0f,
Attrib_L = 0x10,
Attrib_I = 0x20,
Attrib_N = 0x40,
};
DECLARE_REFLECTION_ENUM(AttribType);
extern int GLCoreVersion;
extern bool GLIsCore;
extern bool IsGLES;
-63
View File
@@ -1048,24 +1048,6 @@ public:
IMPLEMENT_FUNCTION_SERIALISED(void, glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
const GLenum *attachments));
enum AttribType
{
Attrib_GLdouble = 0x01,
Attrib_GLfloat = 0x02,
Attrib_GLshort = 0x03,
Attrib_GLushort = 0x04,
Attrib_GLbyte = 0x05,
Attrib_GLubyte = 0x06,
Attrib_GLint = 0x07,
Attrib_GLuint = 0x08,
Attrib_packed = 0x09,
Attrib_typemask = 0x0f,
Attrib_L = 0x10,
Attrib_I = 0x20,
Attrib_N = 0x40,
};
bool Serialise_glVertexAttrib(GLuint index, int count, GLenum type, GLboolean normalized,
const void *value, int attribtype);
@@ -1465,51 +1447,6 @@ public:
IMPLEMENT_FUNCTION_SERIALISED(void, glGetNamedBufferSubData(GLuint buffer, GLintptr offset,
GLsizeiptr size, void *data));
enum UniformType
{
UNIFORM_UNKNOWN,
VEC1fv,
VEC1iv,
VEC1uiv,
VEC1dv,
VEC2fv,
VEC2iv,
VEC2uiv,
VEC2dv,
VEC3fv,
VEC3iv,
VEC3uiv,
VEC3dv,
VEC4fv,
VEC4iv,
VEC4uiv,
VEC4dv,
MAT2fv,
MAT2x3fv,
MAT2x4fv,
MAT3fv,
MAT3x2fv,
MAT3x4fv,
MAT4fv,
MAT4x2fv,
MAT4x3fv,
MAT2dv,
MAT2x3dv,
MAT2x4dv,
MAT3dv,
MAT3x2dv,
MAT3x4dv,
MAT4dv,
MAT4x2dv,
MAT4x3dv,
};
bool Serialise_glUniformMatrix(GLint location, GLsizei count, GLboolean transpose,
const void *value, UniformType type);
bool Serialise_glUniformVector(GLint location, GLsizei count, const void *value, UniformType type);