• Welcome to Dark Bit Factory & Gravity.
 

in need of a bit of help with ogl textures

Started by ninogenio, November 23, 2007

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

ninogenio

hey all,

ive been trying to get a simple texture loader/blitter class going but when i blit all i get is a white square and i cant for the life of me figuare out why?

i think its coming from the part where i push my image into vram but it looks like it should work.

if anyone can help out id be mighty chuffed cheers.

Challenge Trophies Won:

Jim

Yeah, you need to create the sprite AFTER you initialise OpenGL.  Right now you have it at the top of WinMain - move it to much later on.

Jim
Challenge Trophies Won:

ninogenio

cheers jim!

i cant believe i was being that daft  :whack:

i had to change it to GL_UNSIGNED_BYTE to get stop it crashing on my system but i thought GL_UNSIGNED_INT would work, not that it really makes much difference which one is used but i`m curious?
Challenge Trophies Won:

Jim

INT means that each component of the colour is an int - ie, each r,g,b,a is 4x32 bits!
Jim
Challenge Trophies Won:

ninogenio

Challenge Trophies Won: