BlitzMaxier 2D?

BlitzMax Forums/BlitzMax Programming/BlitzMaxier 2D?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This sounds like a good project in general. I think Max2D definitely would benefit from being extended in a number of ways. It seems Mark was working on Max3D which I always presumed would let you do most of the things that we wanted Max2D to do but in an integrated way, but now that's turned into a whole new higher-level editor-driven system so now Max2D is still left with its diapers on.

I think Max2D needs to at the very least have a comprehensive set of drawing functions. I don't know why there weren't hollow rectangles and ovals right from the start, this was a major oversight. DrawPixmap unfortunately uses glDrawPixels which in Max2D code does not set the scale factor. It is actually possible to define a scaling operation which occurs during the drawing, if you write it on your own OpenGL code. I think we also need to see splines and we also need access to the points along the spline to use them not just as drawing primitives but as paths for animation etc. As far as new draw modes go, there aren't a whole lot of blend modes that are supported in the base level OpenGL. We already do Add and Multiply. It's possible to do Inverse and it's possible to copy the alpha value into the RGB components during rendering, but that's about it. More blend modes were added in newer versions of GL. Maybe it would be helpful though to do composite things like drawing shadows beneath sprites. It's hard to do a subtract mode, though. We should also have use of the stencil buffer - BlitzBasic on the Amiga had stencils!

I also agree about the glBegin glEnd - I implemented this into some drawing functions that I made for myself and called them MultiBegin and MultiEnd. I as the programmer then calls MultiBegin when I'm starting to draw primitives of the same kind e.g quads, and then so long as I know when I'm done I can do MultiEnd, rather than having new begins and ends around every quad drawn. It does help with the speed and removes a lot of overhead, but then this would only apply to OpenGL and you'd have to write all your own GL drawing operations to replace the standard Max2D stuff otherwise normal Max2D calls would interrupt it.