Skip to main content
GameDev.net gamedev.net
🔒 Locked

texture problem

Started by FreJa Jun 4, 2007 at 5:20 PM 2 replies 450+ views
Original Post
FreJa
FreJa
Hey, Im trying to load a BMP texture with alpha blending, however, this i what i get: pic (sry for the crappy host, but my ftp isnt working atm :( ) the image is supposed to be straight, plus, part of the E on Game, appears on the beginning of the quad. This is what I'm doing to setup the texture:

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, 4, texture->width, texture->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture->data);
Any ideas? Thanks
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
PlayfulPuppy
PlayfulPuppy
Looks like you're specifying the bottom left and bottom right texture coordinates the wrong way around when you're creating the quad.
FreJa
FreJa
Quote:
Original post by PlayfulPuppy
Looks like you're specifying the bottom left and bottom right texture coordinates the wrong way around when you're creating the quad.


It only happens with some textures, and they're all created the same way... :(
"Through me the road to the city of desolation,Through me the road to sorrows diuturnal,Through me the road among the lost creation."
janci123
janci123
check if textures are in resolution 2^n x 2^m, otherwise try find error code with GetLastError

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.