PDA

View Full Version : gluScaleImage



Ruslan
08-31-2004, 03:34 AM
Hello, I have a problem in this code


typedef struct {
GLubyte rgbRed;
GLubyte rgbGreen;
GLubyte rgbBlue;
GLubyte rgbAlpha;
} CGLRGB;

CGLRGB* Tex;
Tmp = (CGLRGB *) malloc (Height*Width*4);
CGLRGB* Tex;
Tex = (CGLRGB *) malloc(2Height*2Width*4);
GLenum error;
error = gluScaleImage(GL_RGBA,Width, Height, GL_UNSIGNED_BYTE, Tmp,2Width, 2Height, GL_UNSIGNED_BYTE, Tex);
const GLubyte *errorbyte;
errorbyte = gluErrorString(error);errorbyte = out_of_memory
Why???

08-31-2004, 07:16 PM
post the complete code block. otherwise, id say you are out of memory, and so would gl, apparently.