Re: [PyOpenGL-Users] access opengl thru c++
Brought to you by:
mcfletch
From: Mike C. F. <mcf...@vr...> - 2009-06-06 22:32:57
|
axel mårtensson wrote: > hello, > i am trying to write a simple program to display a cube. > my problem is however that when i run the program i can only see a > blue background (the background being the value of glClearColor) > and not the red cube. ... > glTranslatef(-1.5f,0.0f,-6.0f); > glBegin(GL_QUADS); > glColor3f(1.0, 0.0, 0.0); > glVertex3f(100.0, 100.0, 0.0); > glVertex3f(200.0, 100.0, 0.0); > glVertex3f(200.0, 200.0, 0.0); > glVertex3f(100.0, 200.0, 0.0); > glEnd(); You move the camera 6 back from the 0,0,0 point, then draw something at 100 to the right and 100 up from 0,0,0... my expectation is that the geometry is off-screen. Don't have time to be compiling things this afternoon, but I'd suggest drawing something at 0,0,0 first. HTH, Mike -- ________________________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://www.vrplumber.com http://blog.vrplumber.com |