Merge "GLES2 translator: host does not support RGB565"
This commit is contained in:
@@ -1284,7 +1284,21 @@ GL_APICALL void GL_APIENTRY glReleaseShaderCompiler(void){
|
||||
|
||||
GL_APICALL void GL_APIENTRY glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height){
|
||||
GET_CTX();
|
||||
ctx->dispatcher().glRenderbufferStorageEXT(target,internalformat,width,height);
|
||||
GLenum internal = internalformat;
|
||||
#ifdef NV_WAR
|
||||
switch (internalformat) {
|
||||
case GL_RGB565:
|
||||
internal = GL_RGB;
|
||||
break;
|
||||
case GL_RGB5_A1:
|
||||
internal = GL_RGBA4;
|
||||
break;
|
||||
default:
|
||||
internal = internalformat;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
ctx->dispatcher().glRenderbufferStorageEXT(target,internal,width,height);
|
||||
}
|
||||
|
||||
GL_APICALL void GL_APIENTRY glSampleCoverage(GLclampf value, GLboolean invert){
|
||||
@@ -1376,6 +1390,10 @@ GL_APICALL void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint inte
|
||||
}
|
||||
if (type==GL_HALF_FLOAT_OES)
|
||||
type = GL_HALF_FLOAT_NV;
|
||||
#ifdef NV_WAR
|
||||
if (pixels==NULL && type==GL_UNSIGNED_SHORT_5_5_5_1)
|
||||
type = GL_UNSIGNED_SHORT;
|
||||
#endif
|
||||
ctx->dispatcher().glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user