How to use Max2D and Openglide
BlitzMax Forums/OpenGL Module/How to use Max2D and Openglide
| ||
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? |
| ||
Or isnt it possible to simply mix Max2D with OpenGL? |
| ||
I beleive all graphics are done with openGL so mixing 2d and 3d should be no problem. |
| ||
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? |
| ||
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. |
| ||
Thank you very much, it works as you say. Dont know why i havent simply tested Graphics command in nehe tut. |