PDA

View Full Version : Rendering with (free)glut Problems



wolfomat
03-20-2012, 07:27 AM
I'm using Freeglut on NetBeans with MinGW which works okay.

But when i am creating a c++ project and try to use freeglut and opengl (with -lopengl32, -lglu32 and -lfreeglut libs) i only will get a white screen..... but the demos just work fine (same project, same setup).


my Code:
http://pastebin.com/aX68vRKC

ust get a white window....

the original code is here:
http://pastebin.com/V6pfEQAD

this behaviour confuses me, since some other demos will run properly (with the same Project-Setup within NetBeans).
any ideas?

mobeen
03-20-2012, 09:02 AM
Since u have attached the display function after creating the first window, the contents will be drawn on the first window.
if u attach the display function after creating the second window, the contents will be displayed on the second window.

wolfomat
03-20-2012, 09:13 AM
hey,

this wasn't the problem at all, somehow i forgot to add glutSwapBuffers(); at the end of the display func. problem solved :) yay \o/