Blank Textures

Started by
5 comments, last by xeos 24 years ago
I''m trying to display a basic texture into my OpenGL program, and it comes blank, coloured with the last colour. I''m working on a classed version of NeHe''s framework, and it has happened before, only I can''t remember what I did to fix it :-) Any assistance will be grateful!
XEOS Digital Development - Supporting the independant and OpenSource game developers!
Advertisement
The texture size probably has to be a power of 2.

Paul Groves.
http://home.clara.net/paulyg
OpenGL for Beginners
Paul Grovespauls opengl page
Also, you might want to check what states you have enabled/disabled. Make sure that you have called glEnable(GL_TEXTURE_2D) and you have called glBindTexture() with the proper texture information.

PreManDrake
I don''t use OpenGL. I use big bad DirectX, but when I set textures I have to specify texture coords. Try it if it has not been done.
I think this will be the cause of incorrect texture sizes, i.e. not a power of two. Also some (most??) cards have problems with textures larger than 256x256.

Hope this helps somewhat.
Somehow I don''t think texture size is a problem... I''ve got a G400 W/- 32M ram, and I''ve seen some big textures before.

Could the problem simply be that I have bunged NeHe''s framework into classes... I know the create( ... ); function won''t work in it''s own file, but I have it all sorted out now.

I can draw prims, but I just can''t do textures!!!

HELP!!!
XEOS Digital Development - Supporting the independant and OpenSource game developers!
Thanks for all you help, but I got it out!

Turns out that I was trying to initialize my OpenGL stuff before I created my window [:-)]

Thanks for your help - it''s guys like you who make this message board work!

(Mental Note: Don''t put OpenGL init stuff in render::render() function when using render *r = new render();!!!)
XEOS Digital Development - Supporting the independant and OpenSource game developers!

This topic is closed to new replies.

Advertisement