Jump to content
  • Advertisement
Sign in to follow this  
Lirben

OpenGL loading textures with devIL

This topic is 4055 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

hello, I'm new to openGL programming. I'm wondering how I can load a texture in my Borland 5cpp builder. I try this code char *FileName = "image1.bmp"; ilInit(); ilutInit(); ilutRenderer(ILUT_OPENGL); ilutEnable(ILUT_OPENGL_CONV); ilutGLLoadImage(FileName); and I get a weird error message. Project Unit1.exe raised exception class EAccesViolation with message 'Access Violation at address 00000000. Read of address 00000000'. Process stopped. Use step or Run to continue. I just don't get it because the file is right specified and it isn't opend in an other program. can someone help me?

Share this post


Link to post
Share on other sites
Advertisement
Greetings.

I think you need to init ILU before initializing ILUT.

Like this:

char *FileName = "image1.bmp";
ilInit();

iluInit(); // <------ add this.

ilutInit();
ilutRenderer(ILUT_OPENGL);
ilutEnable(ILUT_OPENGL_CONV);
ilutGLLoadImage(FileName);


Hope this helps. =)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!