Commit 95738972 by Corentin Wallez Committed by Commit Bot

Specialize GLTypeToGLEnum in headers

BUG=angleproject:1514 Change-Id: I1f95e985471ea7a2ea0242d8b48ceccca68edf42 Reviewed-on: https://chromium-review.googlesource.com/384891Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
parent 966456de
......@@ -86,17 +86,6 @@ QueryT CastStateValue(GLenum pname, NativeT value)
} // anonymous namespace
template <>
GLenum GLTypeToGLenum<GLint>::value = GL_INT;
template <>
GLenum GLTypeToGLenum<GLuint>::value = GL_UNSIGNED_INT;
template <>
GLenum GLTypeToGLenum<GLboolean>::value = GL_BOOL;
template <>
GLenum GLTypeToGLenum<GLint64>::value = GL_INT_64_ANGLEX;
template <>
GLenum GLTypeToGLenum<GLfloat>::value = GL_FLOAT;
template <typename QueryT>
void CastStateValues(Context *context, GLenum nativeType, GLenum pname,
unsigned int numParams, QueryT *outParams)
......
......@@ -23,7 +23,33 @@ class Context;
template <typename GLType>
struct GLTypeToGLenum
{
static GLenum value;
// static constexpr GLenum value;
};
template <>
struct GLTypeToGLenum<GLint>
{
static constexpr GLenum value = GL_INT;
};
template <>
struct GLTypeToGLenum<GLuint>
{
static constexpr GLenum value = GL_UNSIGNED_INT;
};
template <>
struct GLTypeToGLenum<GLboolean>
{
static constexpr GLenum value = GL_BOOL;
};
template <>
struct GLTypeToGLenum<GLint64>
{
static constexpr GLenum value = GL_INT_64_ANGLEX;
};
template <>
struct GLTypeToGLenum<GLfloat>
{
static constexpr GLenum value = GL_FLOAT;
};
// The GL state query API types are: bool, int, uint, float, int64
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment