is wiggle functions necessary for opengl games?

Started by
4 comments, last by Binomine 18 years, 8 months ago
what is Wiggle functions? i know it goes with OpenGL but does it goes with GLUT too? if i am writing a 3D environment with interactive control, i need to set the screen size. should i use wiggie? thanks
Advertisement
Wiggie?

Not sure, but whatever it is, it sounds awesome!
I am pretty sure you are referring to wgl or "wiggle" functions. These are Windows OpenGL extensions and are not necessary when using OpenGL. I'd recommend using a cross platform alternative instead like GLUT (as you mentioned) or GLFW or SDL.
Quote:Original post by muimui1911
what is Wiggle functions? i know it goes with OpenGL but does it goes with GLUT too?
if i am writing a 3D environment with interactive control, i need to set the screen size. should i use wiggie?


thanks
wiggle functions are extentions to OpenGL that are windows specific. They always start with the three letters wgl. Macs has agl( pronounced agile), OS/2 has pgl and *nix uses glX.( I believe sgi uses sgl, pronounce sickle, but it's been a while).

They're used for OS specific tasks that lie outside OpenGL, like fonts or windowing.

If you're using GLUT to create a different window size, you can use glutReshapeWindow().

If you want to change resolution using GLUT, there's two ways I know about.
One is to use gameGLUT and the function glutGameModeString(). However, gameGLUT is limited and a few GLUT features are unavalible in gameGLUT, like multiple windows. The other is to use a wgl functions.

When you use wgl, you lose portability, which you can either use compiler directives like #ifdefine WIN32 or simply not care, since most people won't run their code on anything besides Windows.
so what would you suggest for my case then?
Quote:Original post by muimui1911
so what would you suggest for my case then?

- If you haven't started yet and portability is a big issue:
Use SDL or GLFW or GLUT with compiler directives.

- If you haven't started yet and portability isn't an issue:
Use wgl with GLUT or SDL or GLFW

- If you've already started in GLUT and portability is a big issue:
Use GLUT and use compiler directives

#ifdef WIN32
wgl...
#eif LINUX(I don't remember the actual definition that linux uses)
glx...
#eif APPLE(Nor apple)
agl...
#endif

- If you've already started in GLUT and portability isn't an issue:
use wgl with GLUT

This topic is closed to new replies.

Advertisement