tinerin
04-14-2006, 01:12 AM
Can anyone help me set up a GL_LUMINANCE_ALPHA texture with GL_LUMINANCE16_ALPHA16 format?
Currently when setting up my texels i'm using GLubyte and assigning 4 bytes to each texel:
texels = (GLubyte *)malloc(texW * texH * texD * texBytes);
texels[TEXEL3(s, t, r)] = 0x00;
texels[TEXEL3(s, t, r)+1] = 0x00;
texels[TEXEL3(s, t, r)+2] = 0x00;
texels[TEXEL3(s, t, r)+3] = 0x00;
glTexImage3D(GL_TEXTURE_3D, 0, GL_LUMINANCE16_ALPHA16, texH, texW, texD, 1, GL_LUMINANCE_ALPHA, GL_FLOAT, texels);
creating the texture causes an error. can anyone help me fix this?
Currently when setting up my texels i'm using GLubyte and assigning 4 bytes to each texel:
texels = (GLubyte *)malloc(texW * texH * texD * texBytes);
texels[TEXEL3(s, t, r)] = 0x00;
texels[TEXEL3(s, t, r)+1] = 0x00;
texels[TEXEL3(s, t, r)+2] = 0x00;
texels[TEXEL3(s, t, r)+3] = 0x00;
glTexImage3D(GL_TEXTURE_3D, 0, GL_LUMINANCE16_ALPHA16, texH, texW, texD, 1, GL_LUMINANCE_ALPHA, GL_FLOAT, texels);
creating the texture causes an error. can anyone help me fix this?