Bugs item #943375, was opened at 2004-04-27 19:22
Message generated for change (Comment added) made by mcfletch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=943375&group_id=5988
Category: GL
Group: v2.0.1
>Status: Closed
>Resolution: Fixed
>Priority: 7
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Mike C. Fletcher (mcfletch)
Summary: bug in glGetTexImage()
Initial Comment:
glGetTexImage() fails when using non-square textures.
It returns height x height texture instead of texture with correct dimensions. I suppose the bug is in get_tex_dims(), the GL_TEXTURE_HEIGHT in case GL_TEXTURE_1D should probably be GL_TEXTURE_WIDTH.
int get_tex_dims(GLenum target, GLint level, int dims[4])
{
int rank = 0;
/* just cascade through the switch, retrieving the apropriate sizes */
switch (target)
{
case GL_TEXTURE_4D_SGIS:
glGetTexLevelParameteriv(target, level, GL_TEXTURE_4DSIZE_SGIS, dims + rank++);
case GL_TEXTURE_3D:
glGetTexLevelParameteriv(target, level, GL_TEXTURE_DEPTH, dims + rank++);
case GL_TEXTURE_2D:
glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, dims + rank++);
case GL_TEXTURE_1D:
glGetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, dims + rank++);
}
return rank;
}
----------------------------------------------------------------------
>Comment By: Mike C. Fletcher (mcfletch)
Date: 2004-10-18 03:13
Message:
Logged In: YES
user_id=34901
Okay, fixed this and another bug that showed up later in the
function regarding the number of dimensions in the resulting
array. There's also now a test/demo in OpenGLContext for
both the array and string forms.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=943375&group_id=5988
|