Open zurgeg opened 4 years ago
System Specs are: 1050 Ti i7 8700 16GB of ram
Also as a debugging step put the square displaying code in Pink World, that didn't work. Also, does the object need to be a GL_TRIANGLE
? Could that cause any problems? If so do you have example GL commands that I could try? Thanks!
I'm trying the following instructions:
glBegin(GL_TRIANGLES) # Start Drawing The Pyramid
glColor3f(1.0,0.0,0.0) # Red
glVertex3f( 0.0, 1.0, 0.0) # Top Of Triangle (Front)
glColor3f(0.0,1.0,0.0) # Green
glVertex3f(-1.0,-1.0, 1.0) # Left Of Triangle (Front)
glColor3f(0.0,0.0,1.0) # Blue
glVertex3f( 1.0,-1.0, 1.0)
glColor3f(1.0,0.0,0.0) # Red
glVertex3f( 0.0, 1.0, 0.0) # Top Of Triangle (Right)
glColor3f(0.0,0.0,1.0) # Blue
glVertex3f( 1.0,-1.0, 1.0) # Left Of Triangle (Right)
glColor3f(0.0,1.0,0.0) # Green
glVertex3f( 1.0,-1.0, -1.0) # Right
glColor3f(1.0,0.0,0.0) # Red
glVertex3f( 0.0, 1.0, 0.0) # Top Of Triangle (Back)
glColor3f(0.0,1.0,0.0) # Green
glVertex3f( 1.0,-1.0, -1.0) # Left Of Triangle (Back)
glColor3f(0.0,0.0,1.0) # Blue
glVertex3f(-1.0,-1.0, -1.0) # Right Of
glColor3f(1.0,0.0,0.0) # Red
glVertex3f( 0.0, 1.0, 0.0) # Top Of Triangle (Left)
glColor3f(0.0,0.0,1.0) # Blue
glVertex3f(-1.0,-1.0,-1.0) # Left Of Triangle (Left)
glColor3f(0.0,1.0,0.0) # Green
glVertex3f(-1.0,-1.0, 1.0) # Right Of Triangle (Left)
glEnd()
glLoadIdentity()
glTranslatef(1.5,0.0,-7.0) # Move Right And Into The Screen
glRotatef(rquad,1.0,1.0,1.0) # Rotate The Cube On X, Y & Z
glBegin(GL_QUADS) # Start Drawing The Cube
glColor3f(0.0,1.0,0.0) # Set The Color To Blue
glVertex3f( 1.0, 1.0,-1.0) # Top Right Of The Quad (Top)
glVertex3f(-1.0, 1.0,-1.0) # Top Left Of The Quad (Top)
glVertex3f(-1.0, 1.0, 1.0) # Bottom Left Of The Quad (Top)
glVertex3f( 1.0, 1.0, 1.0) # Bottom Right Of The Quad (Top)
glColor3f(1.0,0.5,0.0) # Set The Color To Orange
glVertex3f( 1.0,-1.0, 1.0) # Top Right Of The Quad (Bottom)
glVertex3f(-1.0,-1.0, 1.0) # Top Left Of The Quad (Bottom)
glVertex3f(-1.0,-1.0,-1.0) # Bottom Left Of The Quad (Bottom)
glVertex3f( 1.0,-1.0,-1.0) # Bottom Right Of The Quad (Bottom)
glColor3f(1.0,0.0,0.0) # Set The Color To Red
glVertex3f( 1.0, 1.0, 1.0) # Top Right Of The Quad (Front)
glVertex3f(-1.0, 1.0, 1.0) # Top Left Of The Quad (Front)
glVertex3f(-1.0,-1.0, 1.0) # Bottom Left Of The Quad (Front)
glVertex3f( 1.0,-1.0, 1.0) # Bottom Right Of The Quad (Front)
glColor3f(1.0,1.0,0.0) # Set The Color To Yellow
glVertex3f( 1.0,-1.0,-1.0) # Bottom Left Of The Quad (Back)
glVertex3f(-1.0,-1.0,-1.0) # Bottom Right Of The Quad (Back)
glVertex3f(-1.0, 1.0,-1.0) # Top Right Of The Quad (Back)
glVertex3f( 1.0, 1.0,-1.0) # Top Left Of The Quad (Back)
glColor3f(0.0,0.0,1.0) # Set The Color To Blue
glVertex3f(-1.0, 1.0, 1.0) # Top Right Of The Quad (Left)
glVertex3f(-1.0, 1.0,-1.0) # Top Left Of The Quad (Left)
glVertex3f(-1.0,-1.0,-1.0) # Bottom Left Of The Quad (Left)
glVertex3f(-1.0,-1.0, 1.0) # Bottom Right Of The Quad (Left)
glColor3f(1.0,0.0,1.0) # Set The Color To Violet
glVertex3f( 1.0, 1.0,-1.0) # Top Right Of The Quad (Right)
glVertex3f( 1.0, 1.0, 1.0) # Top Left Of The Quad (Right)
glVertex3f( 1.0,-1.0, 1.0) # Bottom Left Of The Quad (Right)
glVertex3f( 1.0,-1.0,-1.0) # Bottom Right Of The Quad (Right)
glEnd() # Done Drawing The Quad
I was making some code for SteamVR when I ran into a roadblock, my code to show the square wouldn't show anything! Here's my code:
Can anyone help? Thanks in advance!