Texture Creation (PCX) Problem
Posted: Sat Feb 21, 2009 10:57 pm
Hello nds comrades!
I have a problem regarding a function I made:
This function is meant to create a texture for useage, but it only works the first call. :/
I can't figure out why right now.. maybe anyone can share some of their knowledge?
Here's the calls:
I thank you for sharing your wisdom!
EDIT:
Oh, if I switch place between the calls the first call works and the other doesn't so there's nothing wrong with the input data.
I have a problem regarding a function I made:
Code: Select all
void CreateTexturePCX(const u8 *imagedata, int &texture)
{
sImage pcx;
loadPCX((u8*)imagedata, &pcx);
image8to16trans(&pcx, 255);
glGenTextures(1, &texture);
glBindTexture(0, texture);
glTexImage2D(0, 0, GL_RGBA, TEXTURE_SIZE_256 , TEXTURE_SIZE_256, 0, TEXGEN_TEXCOORD, pcx.image.data8);
imageDestroy(&pcx);
}
I can't figure out why right now.. maybe anyone can share some of their knowledge?
Here's the calls:
Code: Select all
CreateTexturePCX(lagualogo_pcx, lagualogo_texture);//<--Works
CreateTexturePCX(tilemap_level01_pcx, tilemap);//<--Not
EDIT:
Oh, if I switch place between the calls the first call works and the other doesn't so there's nothing wrong with the input data.