Lines Matching refs:format
178 #pragma mark Format conversion
198 static int32_t convertGLPixelFormat(GLint format, GLenum type)
202 switch (format) {
222 static GLenum validFormatType(ogles_context_t* c, GLenum format, GLenum type)
225 if (format<GL_ALPHA || format>GL_LUMINANCE_ALPHA) {
232 if (type == GL_UNSIGNED_SHORT_5_6_5 && format != GL_RGB) {
236 type == GL_UNSIGNED_SHORT_5_5_5_1) && format != GL_RGBA) {
276 if ((dst.format == src.format) &&
285 const GGLFormat& pixelFormat(c->rasterizer.formats[src.format]);
363 GLenum format, GLenum type, GLsizei width, GLsizei height,
371 const int32_t formatIdx = convertGLPixelFormat(format, type);
402 tex->internalformat = format;
408 static size_t dataSizePalette4(int numLevels, int width, int height, int format)
412 switch (format) {
452 void *surface, int stride, int format)
457 switch (format) {
1072 // any compressed texture format natively.
1073 GLenum format;
1078 format = GL_RGB;
1083 format = GL_RGBA;
1088 format = GL_RGB;
1093 format = GL_RGBA;
1098 format = GL_RGBA;
1103 format = GL_RGB;
1128 level, format, type, width, height);
1146 if (dataSizePalette4(numLevels, width, height, format) > imageSize) {
1155 i, format, type, lod_w, lod_h);
1169 GLenum format, GLenum type, const GLvoid *pixels)
1180 if (format != (GLenum)internalformat) {
1184 if (validFormatType(c, format, type)) {
1191 level, format, type, width, height);
1198 const int32_t formatIdx = convertGLPixelFormat(format, type);
1210 userSurface.format = formatIdx;
1228 GLenum format, GLsizei imageSize,
1238 GLenum format, GLenum type, const GLvoid *pixels)
1249 if (validFormatType(c, format, type)) {
1263 if (format != tex->internalformat) {
1277 const int32_t formatIdx = convertGLPixelFormat(format, type);
1293 userSurface.format = formatIdx;
1332 GLenum format = 0;
1335 const int cbFormatIdx = cbSurface.format;
1355 // figure out the format to use for the new texture
1361 format = internalformat;
1370 format = internalformat;
1376 if (format == 0) {
1386 level, format, type, width, height);
1484 GLenum format, GLenum type, GLvoid *pixels)
1487 if ((format != GL_RGBA) && (format != GL_RGB)) {
1505 if ((format == GL_RGBA) && (type == GL_UNSIGNED_BYTE)) {
1507 } else if ((format == GL_RGB) && (type == GL_UNSIGNED_SHORT_5_6_5)) {
1531 userSurface.format = formatIdx;