How to use Max2D and Openglide

BlitzMax Forums/OpenGL Module/How to use Max2D and Openglide

Takuan(Posted 2005) [#1]
Err..OpenGL not Openglide:-/
Tried to use Max2D and the second Nehe Tutorial but doesnt work. Thought its possible to use Max2D and OpenGL like the Nehe Tut in one code/.exe?
What did i wrong?


Takuan(Posted 2005) [#2]
Or isnt it possible to simply mix Max2D with OpenGL?


Cajun17(Posted 2005) [#3]
I beleive all graphics are done with openGL so mixing 2d and 3d should be no problem.


Clyde(Posted 2005) [#4]
I've not tried it, but at a guess you should be able to mix OpenGl with the inbuilt Max2D commands, seeming as BMAX is built around OGL.

Anybody tried this and know the score with it?


teamonkey(Posted 2005) [#5]
Yes you can.

The default OpenGL viewport is (-1,-1) to (1,1) though - when you use Graphics instead of bglCreateContext it sets it to (0,0) to (screen_width,screen_height). So if you're drawing a triangle that would fill the screen with the standard OpenGL viewport, it might just be displayed as one pixel in the top-left corner of the screen - or not at all.


Takuan(Posted 2005) [#6]
Thank you very much, it works as you say.
Dont know why i havent simply tested Graphics command in nehe tut.