PDA

View Full Version : OpenGL & ScreenSavers



SuperCuzz
04-18-2001, 07:34 AM
I am having some rendering problems with using the screen saver library and all. I am using the functions ScreenSaverProc, ScreenSaverDialogProc...etc as required by the Headerfile. However when I display Cubes and other polygons certain sides are missing when displayed. And just to test to see if all of my TexCoord and Vertetx were correct I displayed just the bottom of a cube and rotated it on the x-axis, but only ONE side would be visible, and when it flipped over to the other side you would not see anything until the other side(which could be seen before)was displayed.

I tried the exact same code using a window that I defined my self( Using Windows.h ) and everything worked fine.

What is it that I am doing wrong?

If you need to see some coding examples I will post them.

Deiussum
04-18-2001, 08:40 AM
It sounds to me more like an OpenGL problem than a problem with the screensaver library. Just switching to a screensaver app shouldn't cause the problem you are seeing. Some things to check...

1) Make sure the object isn't getting clipped by the viewing volume.

2) Check if you have culling enabled... if you do, make sure your faces are all specified in a counter-clockwise direction. (Or Clockwise if you changed the winding order for the front face.)

Since you said you can only see one side of the bottom of the cube, my instincts tell me that you are running into problem 2. You probably have a line like so...

glEnable(GL_CULL_FACE);

Try comment that our or do a

glDisable(GL_CULL_FACE);

before your rendering function...

SuperCuzz
04-19-2001, 05:34 AM
Damn!! It works...That was the problem
I did have it enabled. Hehe thanks for the help, I was about to Destroy my Computer there for second

Deiussum
04-19-2001, 10:13 AM
Glad you got it working. http://www.opengl.org/discussion_boards/ubb/smile.gif