GL renderbuffers do not have mips, return early from function

* Some of the other sub-functions don't handle non-texture targets
This commit is contained in:
baldurk
2020-08-21 11:46:37 +01:00
parent 409f256411
commit a6871327aa
+4
View File
@@ -567,6 +567,10 @@ int GetNumMips(GLenum target, GLuint tex, GLuint w, GLuint h, GLuint d)
{
int mips = 1;
// renderbuffers don't have mips
if(target == eGL_RENDERBUFFER)
return 1;
GLint immut = 0;
GL.glGetTextureParameterivEXT(tex, target, eGL_TEXTURE_IMMUTABLE_FORMAT, &immut);