right cheers jim i got the camera going in all directions now!
back to what you were saying about the objects im curious did you mean when you said hardwired stuff like this.
function gl_textured_2d_quad( texture as GLuint , byval x1 as single , byval y1 as single , byval x2 as single , byval y2 as single ) export
glenable GL_TEXTURE_2D
glBindTexture GL_TEXTURE_2D,texture
glDisable GL_DEPTH_TEST
glMatrixMode GL_PROJECTION
glPushMatrix
glLoadIdentity
glOrtho 0, 800, 0, 600,-1, 1
glMatrixMode GL_MODELVIEW
glPushMatrix
glLoadIdentity
glBegin GL_QUADS
glTexCoord2f 0.0 , 0.0 : glVertex2f x1, y1
glTexCoord2f 1.0 , 0.0 : glVertex2f x2, y1
glTexCoord2f 1.0 , 1.0 : glVertex2f x2, y2
glTexCoord2f 0.0 , 1.0 : glvertex2f x1, y2
glEnd
glMatrixMode GL_PROJECTION
glPopMatrix
glMatrixMode GL_MODELVIEW
glPopMatrix
glEnable GL_DEPTH_TEST
gldisable GL_TEXTURE_2D
return 0
end function
function gl_2d_quad(byval x1 as single , byval y1 as single , byval x2 as single , byval y2 as single) export
glDisable GL_DEPTH_TEST
glMatrixMode GL_PROJECTION
glPushMatrix
glLoadIdentity
glOrtho 0 , 800 , 0 , 600 , -1 , 1
glMatrixMode GL_MODELVIEW
glPushMatrix
glLoadIdentity
glBegin GL_QUADS
glVertex2f x1, y1
glVertex2f x2, y1
glVertex2f x2, y2
glvertex2f x1, y2
glEnd
glMatrixMode GL_PROJECTION
glPopMatrix
glMatrixMode GL_MODELVIEW
glPopMatrix
glEnable GL_DEPTH_TEST
return 0
end function
function gl_textured_box() export
glBegin GL_QUADS
glTexCoord2f 0.0, 0.0 : glVertex3f -1.0, -1.0, 1.0
glTexCoord2f 1.0, 0.0 : glVertex3f 1.0, -1.0, 1.0
glTexCoord2f 1.0, 1.0 : glVertex3f 1.0, 1.0, 1.0
glTexCoord2f 0.0, 1.0 : glVertex3f -1.0, 1.0, 1.0
glTexCoord2f 1.0, 0.0 : glVertex3f -1.0, -1.0, -1.0
glTexCoord2f 1.0, 1.0 : glVertex3f -1.0, 1.0, -1.0
glTexCoord2f 0.0, 1.0 : glVertex3f 1.0, 1.0, -1.0
glTexCoord2f 0.0, 0.0 : glVertex3f 1.0, -1.0, -1.0
glTexCoord2f 0.0, 1.0 : glVertex3f -1.0, 1.0, -1.0
glTexCoord2f 0.0, 0.0 : glVertex3f -1.0, 1.0, 1.0
glTexCoord2f 1.0, 0.0 : glVertex3f 1.0, 1.0, 1.0
glTexCoord2f 1.0, 1.0 : glVertex3f 1.0, 1.0, -1.0
glTexCoord2f 1.0, 1.0 : glVertex3f -1.0, -1.0, -1.0
glTexCoord2f 0.0, 1.0 : glVertex3f 1.0, -1.0, -1.0
glTexCoord2f 0.0, 0.0 : glVertex3f 1.0, -1.0, 1.0
glTexCoord2f 1.0, 0.0 : glVertex3f -1.0, -1.0, 1.0
glTexCoord2f 1.0, 0.0 : glVertex3f 1.0, -1.0, -1.0
glTexCoord2f 1.0, 1.0 : glVertex3f 1.0, 1.0, -1.0
glTexCoord2f 0.0, 1.0 : glVertex3f 1.0, 1.0, 1.0
glTexCoord2f 0.0, 0.0 : glVertex3f 1.0, -1.0, 1.0
glTexCoord2f 0.0, 0.0 : glVertex3f -1.0, -1.0, -1.0
glTexCoord2f 1.0, 0.0 : glVertex3f -1.0, -1.0, 1.0
glTexCoord2f 1.0, 1.0 : glVertex3f -1.0, 1.0, 1.0
glTexCoord2f 0.0, 1.0 : glVertex3f -1.0, 1.0, -1.0
glEnd
return 0
end function
function gl_box() export
glBegin GL_QUADS
glVertex3f -1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f 1.0, -1.0, -1.0
glVertex3f -1.0, 1.0, -1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f 1.0, -1.0, -1.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f 1.0, -1.0, -1.0
glVertex3f 1.0, 1.0, -1.0
glVertex3f 1.0, 1.0, 1.0
glVertex3f 1.0, -1.0, 1.0
glVertex3f -1.0, -1.0, -1.0
glVertex3f -1.0, -1.0, 1.0
glVertex3f -1.0, 1.0, 1.0
glVertex3f -1.0, 1.0, -1.0
glEnd
return 0
end function
as this is due to be removed now as its not needed anymore it was for inital debugging only.
the way the engine now works is that all objects get stored in the new_entity type regardless of wether there 3ds or static primitives and then they can be run through my one drawing routine .