Re: [PyOpenGL-Users] access opengl thru c++
Brought to you by:
mcfletch
From: axel m. <mi...@ho...> - 2009-06-07 07:34:45
|
That solved my problem, and thank you so much for your quick reply :-) > Date: Sat, 6 Jun 2009 18:31:53 -0400 > From: mcf...@vr... > To: mi...@ho... > CC: pyo...@li... > Subject: Re: [PyOpenGL-Users] access opengl thru c++ > > 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 > _________________________________________________________________ Hitta hetaste singlarna på MSN Dejting! http://dejting.se.msn.com/channel/index.aspx?trackingid=1002952 |