Jump to content
  • Advertisement
Sign in to follow this  
muimui1911

is wiggle functions necessary for opengl games?

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

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

Share this post


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

Share this post


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

Share this post


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

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!