Lines Matching refs:format
183 #pragma mark Format conversion
203 static int32_t convertGLPixelFormat(GLint format, GLenum type)
207 switch (format) {
227 static GLenum validFormatType(ogles_context_t* c, GLenum format, GLenum type)
230 if (format<GL_ALPHA || format>GL_LUMINANCE_ALPHA) {
237 if (type == GL_UNSIGNED_SHORT_5_6_5 && format != GL_RGB) {
241 type == GL_UNSIGNED_SHORT_5_5_5_1) && format != GL_RGBA) {
281 if ((dst.format == src.format) &&
290 const GGLFormat& pixelFormat(c->rasterizer.formats[src.format]);
368 GLenum format, GLenum type, GLsizei width, GLsizei height,
376 const int32_t formatIdx = convertGLPixelFormat(format, type);
407 tex->internalformat = format;
413 static size_t dataSizePalette4(int numLevels, int width, int height, int format)
417 switch (format) {
457 void *surface, int stride, int format)
462 switch (format) {
1091 // any compressed texture format natively.
1092 GLenum format;
1097 format = GL_RGB;
1102 format = GL_RGBA;
1107 format = GL_RGB;
1112 format = GL_RGBA;
1117 format = GL_RGBA;
1122 format = GL_RGB;
1147 level, format, type, width, height);
1165 if (dataSizePalette4(numLevels, width, height, format) > imageSize) {
1174 i, format, type, lod_w, lod_h);
1188 GLenum format, GLenum type, const GLvoid *pixels)
1199 if (format != (GLenum)internalformat) {
1203 if (validFormatType(c, format, type)) {
1210 level, format, type, width, height);
1217 const int32_t formatIdx = convertGLPixelFormat(format, type);
1229 userSurface.format = formatIdx;
1247 GLenum format, GLsizei imageSize,
1257 GLenum format, GLenum type, const GLvoid *pixels)
1268 if (validFormatType(c, format, type)) {
1282 if (format != tex->internalformat) {
1296 const int32_t formatIdx = convertGLPixelFormat(format, type);
1312 userSurface.format = formatIdx;
1351 GLenum format = 0;
1354 const int cbFormatIdx = cbSurface.format;
1374 // figure out the format to use for the new texture
1380 format = internalformat;
1389 format = internalformat;
1395 if (format == 0) {
1405 level, format, type, width, height);
1503 GLenum format, GLenum type, GLvoid *pixels)
1506 if ((format != GL_RGBA) && (format != GL_RGB)) {
1524 if ((format == GL_RGBA) && (type == GL_UNSIGNED_BYTE)) {
1526 } else if ((format == GL_RGB) && (type == GL_UNSIGNED_SHORT_5_6_5)) {
1550 userSurface.format = formatIdx;