Commit 3466a4d0 by Jamie Madill

Add a helper method to return the number of components in a texture format.

TRAC #23841 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods
parent 02f20dd8
......@@ -1344,6 +1344,20 @@ GLuint GetComponentType(GLint internalFormat, GLuint clientVersion)
}
}
GLuint GetComponentCount(GLint internalFormat, GLuint clientVersion)
{
InternalFormatInfo internalFormatInfo;
if (GetInternalFormatInfo(internalFormat, clientVersion, &internalFormatInfo))
{
return internalFormatInfo.mComponentCount;
}
else
{
UNREACHABLE();
return false;
}
}
GLenum GetColorEncoding(GLint internalFormat, GLuint clientVersion)
{
InternalFormatInfo internalFormatInfo;
......
......@@ -66,6 +66,7 @@ GLenum GetFormat(GLint internalFormat, GLuint clientVersion);
GLenum GetType(GLint internalFormat, GLuint clientVersion);
GLenum GetComponentType(GLint internalFormat, GLuint clientVersion);
GLuint GetComponentCount(GLint internalFormat, GLuint clientVersion);
GLenum GetColorEncoding(GLint internalFormat, GLuint clientVersion);
bool IsColorRenderingSupported(GLint internalFormat, const rx::Renderer *renderer);
......
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