Jump to content
  • Advertisement
Sign in to follow this  
cstdio

OpenGL Problem with GLUT : not drawing to window?

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

Hi all, I've used GLUT in the past with no problem, but I'm now trying to abstract all the GLUT/OpenGL stuff via a singleton "engine" class. Everything compiles and runs, but the window that launches is full of old graphics card memory garbage (for instance, a lot of it looked like chunks of Maya stuff that was running an hour before). The initialization code is EXACTLY THE SAME as code that works fine in another project. The steps that the program runs through (initialize GLUT, run display, run the resize function, run the idle function, run the display, etc etc) are the same. I'm (unfortunately) using Visual Studio .NET 2003 but I may be porting the project over to Eclipse on MacOSX. My projects are set up as follows: 1. OpenGL Base Classes -- a lot of polygon/math/object management stuff * multi-threaded (yeah, yeah) static lib, __cdecl calling convention 2. Project-specific Classes -- extend base classes for specific applications * multi-threaded static lib, __cdecl calling convention 3. Application -- use the singleton engine to display a few simple objects * multi-threaded win32 app, __cdecl calling convention A release build for WinXP will probably use single-threaded dlls instead of static libs. Within the Base Classes is a Camera class that I use to set perspective/orthographic view ports (glu calls) and transform from world to camera reference frame (and vice-versa). This *may* be the problem, but I use the same class in the project that works (one big app, no libs). Any ideas? I'll post the code if you want to see it, but I don't think it'll help any -- I think this has more to do with me not understanding EXACTLY how GLUT works. I'm still a newbie when it comes to *real* programming, so lemme have it! - Nate

Share this post


Link to post
Share on other sites
Advertisement
Resolved.

There were some "bad characters" in a chunk of my glut initialization source code...so the Visual Studio compiler just decided to ignore a couple of lines of code or something. Wonderful.

Works like a charm now...

- Nate

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!