Advertisement

Problems

Started by July 09, 2003 08:09 PM
-1 comments, last by GiGaHeRz 21 years, 7 months ago
I''m a newbie in OpenGL programming and I tried to display a little model... well actually only some triangles loaded from a text file, but OpenGL ignores my orders. The worst thing is that if I try to draw them manually, it works... I''m using Visualbasic 6. This is the code I use to draw them... for now: ------------------------------------------------------- Public Function DrawGLScene() As Boolean '' Here''s Where We Do All The Drawing Dim N As Long glClear clrColorBufferBit Or clrDepthBufferBit glLoadIdentity glTranslatef 0#, 0#, -350# glRotatef rtri, 1#, 1#, 1# glColor3f 1#, 1#, 1# glBegin bmTriangles For N = 0 To CModel.TriangleC - 1 glColor3f Rnd, Rnd, Rnd With CModel.Tri(N) glVertex3f CDbl(.Point(0, 0)), CDbl(.Point(0, 1)), CDbl(.Point(0, 2)) glVertex3f CDbl(.Point(1, 0)), CDbl(.Point(1, 1)), CDbl(.Point(1, 2)) glVertex3f CDbl(.Point(2, 0)), CDbl(.Point(2, 1)), CDbl(.Point(2, 2)) End With Next glEnd rtri = rtri + 0.5 DrawGLScene = True End Function ------------------------------------------------------------

This topic is closed to new replies.

Advertisement