So, I was looking at hitchhikr's openGL framework, and I began to play around with it and some other GL tutorials, so I finally was able to come up with this code to put a simple triangle on the screen:
		invoke glBegin,GL_TRIANGLES
invoke glColor3f, CFLT(0.5), CFLT(1.0), CFLT(0.5)
invoke glVertex3f,CFLT(100.0),CFLT(100.0),CFLT(1.0)
invoke glVertex3f,CFLT(150.0),CFLT(100.0),CFLT(1.0)
invoke glVertex3f,CFLT(125.0),CFLT(50.0),CFLT(1.0)
invoke glEnd
Which I put in the "draw" section (I translated it from a C++ example, so I'm not sure bout how well I translated it) But the code compiles, and it runs, but I don't see any triangle. any ideas what the problem is?
Posted on 2008-01-12 10:40:47 by HKothari
Putting whatever values for the vertices' coordinates is no guarantee they will be visible onscreen. You could be putting that triangle way behind the camera, or somewhere to the side. There probably is less than 1% chance that any randomly-positioned triangle will show-up onscreen.
You really have to do some maths to calculate where to put the triangle for it to be drawn.... or simply use coordinates (and opengl-matrices) that you have seen to show-up onscreen. And don't forget clockwise/counter-clockwise culling is usually enabled.

It's only after you implement a moving/rotating camera, that you can say goodbye to this problem. It's just 20-50 lines away :)

P.S. give the C++ and ASM code for us to proofread your translation.
Posted on 2008-01-12 19:33:12 by Ultrano
http://www.falloutsoftware.com/tutorials/gl/gl2p5.htm
http://www.morrowland.com/apron/tutorials/gl/gl_triangle.php

I am using both of those for now, but the first one was the example that I have above. Thanks.
Posted on 2008-01-12 20:08:59 by HKothari
Oh yah, here's my asm code, but remember, I used that framework that is linked above.
Attachments:
Posted on 2008-01-13 08:25:00 by HKothari