glGenTextures not working???

Started by
8 comments, last by ReKleSS 21 years, 9 months ago
hi all, I''ve been having a problem with my GL program... every time I call glGenTextures(1,&texture[0]), texture[0] still equals 0, in NeHe tutorial 6, it always equalled 1. When I go on to try to map the texture, nothing happens. Any idea why this would happen? -ReKleSS
Advertisement
That is odd. The only reason I can think for this to happen is that your OpenGL rendering context hasn''t been set up properly.

Try glGetError and gluErrorString to see what went wrong.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Did you enabled GL_TEXTURE_2D (or 1D) before you tried to generate the lists?
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
Thx, now I''m getting somewhere... the textures map, but the colours are all wrong. I''m using nehe.bmp as a test, and it''s all GREEN instead of blue. any ideas this time?
my mistake, I had set glColor3f to something strange, it was tinting the bmp. Thanks MadKeith, and u too, siaspete.


-ReKleSS
You''re welcome, after several years of programming in OpenGL I made the exact same mistake a few months back, and it took me forever to find it
It's only funny 'till someone gets hurt.And then it's just hilarious.Unless it's you.
I always try to make an effort to remember to set the screen to the clear color after drawing particular objects.
masterghttp:/masterg.andyc.org
hi,

I think, i have the same problem of yours.
I''m trying to compile Lesson6.cpp with BCC55 and i''m getting
Error: Unresolved external ''auxDIBImageLoadA'' referenced from LESSON6.OBJ

I cannot get it right from these answers can you explain for an OpenGl beginner what to do ?

Thnx.
It means you''re not linking to the glaux library. I''ve never used it so I can''t tell you what the exact .lib file is, but basically you want to go into your project settings and add it to the linker''s library list.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions
Heh... I''m pretty sure it''s glaux.lib or glaux32.lib

-ReKleSS
Golf is called golf because all the other four letter words were taken

This topic is closed to new replies.

Advertisement