Oxygen Basic

Programming => Example Code => Topic started by: Peter on June 15, 2011, 04:53:28 AM

Title: OpenGl
Post by: Peter on June 15, 2011, 04:53:28 AM
Deleted
[attachment deleted by admin]
Title: Re: OpenGl
Post by: kryton9 on June 15, 2011, 07:28:30 PM
It does take a awhile to get used to it Peter. And the way we are doing it now is the old way. The new way is using shaders and vertex buffer objects, but that takes more work to get something on the screen than the old way.

I have had problems with using different color calls. Some of the variable types don't seem to work. As a safe fallback use glColor3f(r, g, b).

Also you have to set the modelviews for 3d and 2d separately. So you draw your 3d first then your 2d.
Here is a good site to learn it quickly.
http://fly.cc.fer.hr/~unreal/theredbook/
Title: Re: OpenGl
Post by: Charles Pegge on June 15, 2011, 10:39:00 PM

I would start with a 3D system and put your 2D objects in at fixed distances. Also handle all colors and coords as floats (single) as this appears to be the primary datatype for the graphics hardware.

Charles