MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetLinearGLFormat

Function GetLinearGLFormat

Source/Graphics/textures.cpp:126–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126bool GetLinearGLFormat(GLenum format) {
127 switch (format) {
128 case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT:
129 return (bool)GL_COMPRESSED_RGB_S3TC_DXT1_EXT;
130
131 case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:
132 return (bool)GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
133
134 case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
135 return (bool)GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
136
137 case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
138 return (bool)GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
139
140 case GL_SRGB8:
141 return (bool)GL_RGB8;
142
143 case GL_SRGB8_ALPHA8:
144 return (bool)GL_RGBA8;
145
146 case GL_SRGB_ALPHA:
147 return (bool)GL_RGBA;
148 }
149
150 return format;
151}
152
153namespace {
154#ifdef _WIN32

Callers 1

subImageMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected