🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

GLDrawSprocketTest question

Started by
2 comments, last by David20321 23 years, 11 months ago
I was fiddling around with the GLDrawSprocketTest trying to make one of my GLUT programs run fast in full screen with the cool fading and I did. The only problems are that I can''t set the view angle like you can with gluPerspective and I can''t figure out how to get millions of colors. With thousands of colors it has that annoying swimming pixel effect on my ATI Rage 128. This is basically a mac question so please don''t post stupid responses like "MACS SUCK" or anything.
Advertisement
Hmmm, setting displayBestDepth to 32 doesn''t work? It should. You should also still be able to use gluPerspective().

Morgan
gluPerspective does work, I accidently a repeat later that canceled it out.
What does gDSpContextAttributes.displayDepthMask = kDSpDepthMask_16; do? does it have anything to do with how many colors are displayed? I tried changed it to kDSpDepthMask_32 but that froze everything up. It might not be 16 bit but it still shows the swimming pixel thing. If it is 16 bit the depthmask thing is the only piece of code with 16 in it now.
Also, how can I make a program timer so it runs consistently at the same speed? For example every 60th of a second it updates the screen. Right now it runs hyper fast until a complicated effect happens and then it just goes pretty fast. I tried putting if (TickCount()%2==1){
DrawGL( gOpenGLContext );
}
into the main loop so that every other tick it would draw but now it just goes kind of slow and when a complicated effect happens it goes really slow.
What I did was write a simple timer class which has something similar to the following methods:

• Start( time, callback ) - this starts a timer that will call a callback function (function pointer) after an alotted (sp?) amount of time.
• Update() - this checks the current time against the time it was started to see if the alotted time has passed, if it does then it calls the callback function.

So, I made a global instance of this class and set the callback function to call my rendering function, which renders my scene and calls Start() again to reset the starting time. Hope this helps.

Morgan

Oops, forgot to say anything about kDSpDepthMask_32 thing. This may actually be a bug in my code in the tutorial. I'll try to do a quick update of the code and tutorial today, but can't guarantee it, so hold tight for a little while.

Morgan

Edited by - Morgan on August 6, 2000 2:11:14 PM

This topic is closed to new replies.

Advertisement