Publié : ven. 23/janv./2009 14:56
à mon grand'dam, non...djes a écrit :As-tu testé ma petite bibliothèque? http://www.purebasic.fr/french/viewtopi ... highlight=
ça y est, bon, euh, oui mais non,
le faite que les objets (le cube par exemple) soit des fichiers externes ne me plait pas, avec opengl je peux créer simplement un objet en utilisant la fonction glVertex3f_()
ce qui n'est pas possible avec ogre (à ma connaissance) ou alors il faut utiliser des tableaux dim (beurk) ou des data (beurkbeurk) !
Code : Tout sélectionner
Procedure objet_Z()
glColor3f_(1.0,0.0,0.0)
; 5- 2 +---+ 1
; ! !
; 4- ! !
; 3 ! A !
; 3- 4 +-----------+ !
; ! \ B \ !
; 2- ! +-----------+ 8
; ! ! 7
; 1- ! C !
; ! !
; 0- 5 +---+ 6 --- X
; : : : : :
; 0 1 2 3 4
; :
; Y
; Section A
glBegin_(#GL_POLYGON) ;Start Drawing
glVertex3f_(4.0, 5.0, 0.0) ; 1
glVertex3f_(3.0, 5.0, 0.0) ; 2
glVertex3f_(3.0, 3.0, 0.0) ; 3
glVertex3f_(4.0, 2.0, 0.0) ; 8
glEnd_() ;Done Drawing
; Section B
glBegin_(#GL_POLYGON) ;Start Drawing
glVertex3f_(3.0, 3.0, 0.0) ; 3
glVertex3f_(0.0, 3.0, 0.0) ; 4
glVertex3f_(1.0, 2.0, 0.0) ; 7
glVertex3f_(4.0, 2.0, 0.0) ; 8
glEnd_() ;Done Drawing
; Section C
glBegin_(#GL_POLYGON) ;Start Drawing
glVertex3f_(0.0, 3.0, 0.0) ; 4
glVertex3f_(0.0, 0.0, 0.0) ; 5
glVertex3f_(1.0, 0.0, 0.0) ; 6
glVertex3f_(1.0, 2.0, 0.0) ; 7
glEnd_() ;Done Drawing
;glRotatef_(rtri,0.0,1.0,0.0) l'objet tourne sur son axe Y
EndProcedure
bon, c'est tréééééééééééés lourdingue mais ça marche
pat