• Advertisement

Archived

This topic is now archived and is closed to further replies.

glGenTextures not working???

This topic is 5710 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
my mistake, I had set glColor3f to something strange, it was tinting the bmp. Thanks MadKeith, and u too, siaspete.


-ReKleSS

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
I always try to make an effort to remember to set the screen to the clear color after drawing particular objects.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement