Jump to content
  • Advertisement
Sign in to follow this  
Roots

OpenGL DevIL/OpenIL is drawing things upside down for me, but not for my video programmer?

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

My new graphics programmer has been working on our OpenGL video engine and when I tried out his demo code, everything was drawn upside-down (flipped across x-axis) for me, but on his machine everything looks like it should. Has anyone experienced something like this happening? I don't know if something is wrong with my crappy ATI video drivers or what. We're both running Linux and he's using DevIL 1.6.6 and I'm using DevIL 1.6.5-5.1 (from Debian package listing). But that shouldn't matter should it? If anyone has any ideas why this is happening please let me know. I can post code if needed.

Share this post


Link to post
Share on other sites
Advertisement
After initialising DevIL try putting these lines of code in:

ilOriginFunc(IL_ORIGIN_UPPER_LEFT);
ilEnable(IL_ORIGIN_SET);


They should ensure that all images have the same origin (and hence are shown the right way up).

Share this post


Link to post
Share on other sites
Quote:
Original post by _the_phantom_
well, it depends on what changed between version 1.6.5-5.1 and 1.6.6, i'd check the DevIL site to see...



Yeah I'm reading through it right now. Oh I forgot to mention, previously we were using the FreeImage library instead of DevIL and everything was drawn correctly for me with that code...

Share this post


Link to post
Share on other sites
Quote:
Original post by Monder
After initialising DevIL try putting these lines of code in:

ilOriginFunc(IL_ORIGIN_UPPER_LEFT);
ilEnable(IL_ORIGIN_SET);


They should ensure that all images have the same origin (and hence are shown the right way up).



Thanks, that did it! [grin]

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!