Advertisement

Tutorials

Started by June 10, 2003 01:10 AM
5 comments, last by Chops 21 years, 8 months ago
In order to compile the tutorials I have to change the line
if (ChangeDisplaySettings(&dmScreenSettings,CDS_FULLSCREEN)!=DISP_CHANGE_SUCCESSFUL) 
to
if (ChangeDisplaySettings(&dmScreenSettings,0)!=DISP_CHANGE_SUCCESSFUL) 
Can someone tell me why? Im using win2k sp3 and devc++ 4. [edited by - Chops on June 10, 2003 2:12:43 AM]
CDS_FULLSCREEN is not defined by all compilers. Add this to your code, somewhere at the top, or something:

#ifndef CDS_FULLSCREEN
#define CDS_FULLSCREEN 4
#endif
Advertisement
Thank you. That worked.

But now I''m up to lesson 6. There''s a problem using glaux. I updated dev-cpp in the hope that would fix it. But there''s no support at all for glaux in the latest version.

I understand glaux is antiquated. Is there an easy way to get around this so I can continue the tutorials?
You can (and should) use an image library to load textures.
There are many free libraries out there, e.g. DevIL that support not only BMP but oalso TGA, JPG, PNG and many other image formats.

To use them with OGL, you just need to obtain three basic things:
image dimension (i.e. width and height), the number of bits per pixel and a pointer to the unencoded raw pixel data.

You pass these three bits of information to glTexImage2D or
gluBuild2DMipmaps
Why should I use an image library? I created my own which is perfectly adequate. Granted, it only supports bmp, tga and jpg [plus a custom format], but still.

Death of one is a tragedy, death of a million is just a statistic.
If at first you don't succeed, redefine success.
because not everyone wants to write their own img library
Advertisement
Thanks darookie.

But it looks like I wont be using DevIL. It doesnt work with dev-cpp. I wish I''d known that several hours ago.

Id be half-way through the tutorials if it wasnt for this bloody image library. I need some sleep.

This topic is closed to new replies.

Advertisement