softwarefailure wrote:I'm trying to get some info from a texture:
Code: Select all
int texwidth = 0, texheight = 0, fmt = 0;
glBindTexture(textureTarget, id);
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_COMPONENTS, &fmt);
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_WIDTH, &texwidth);
glGetTexLevelParameteriv(textureTarget, 0, GL_TEXTURE_HEIGHT, &texheight);
But I'm getting these weird return values:
Code: Select all
fmt: 0x47005800
texwidth: 0x44800000
texheight: 0x43000000
Hmmm, I though to myself, when reading this topic a few days back , those look like floating point numbers, not really knowing I held my tongue to avoid confusion.
The code works fine on Windows/Linux/MacOS and but on MiniGL I get these strange values. Is this a bug in MiniGL?
Today however I had some time to dig out my old checkout of minigl and found this:
void cgl_GLGetTexLevelParameteriv(struct GLContextIFace *Self, GLenum gltarget, GLint level,
GLenum pname, GLfloat *param)
MGLAPI void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
{
CC->GLGetTexLevelParameteriv(target, level, pname, params);
}
ooops defo a bug I'd say. I don't think I have commit access to fix that (not in the main OS repo) so I'll raise a BZ