"feed" blitzmax a new opengl or DirectX context.?
BlitzMax Forums/BlitzMax Programming/"feed" blitzmax a new opengl or DirectX context.?
| ||
Hi All, Is there any possible way to feed blitmax a new context to use when rendering? OR- get it to render *on top* of another context? We're trying to get Max2D drawing to work on top of Flow3D. Cheers for any ideas. |
| ||
Wouldn't it be easier to just write a few functions to emulate Max2D drawing using native Ogre functions? Max2D is very basic, so there's not much to add in anyway. I'm assuming that Ogre already does everything Max2D does and a lot more in 2D, and that the reason for doing this at all is just for people who've already written things which use Max2D and don't want to learn any new syntax. |
| ||
I say rewrite the parts of Max2D that you plan to use, using your own rendering systems. There isn't much to it - you've got Plot, DrawLine, DrawRect, DrawImage, DrawPixmap, DrawOval, SetColor and SetBlend. That's about it right? |
| ||
Well, of course thats the best answer, but i figured i'd still ask hehe :-) |
| ||
You could write functions that map to the same parameters that the max2d command use, effectively rewiring them to call your code, allowing programmers to use the same commands, e.g.function myDrawText(a$,b:Float,c:Float) 'do your wiz-bang text rendering here end function DrawText=MyDrawText DrawText "hi",50,50 Another thought I had was maybe you should look at framebuffer objects via OpenGL extensions and maybe you can use that to define which context/buffer is used for rendering etc? |