-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|41|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Showcase Home -> Functions Libraries


 
Cower
Created : 23 April 2010
 
System : Cross Platform
Language : Blitz Max

BufferedGLMax2D

An OpenGL Max2D module that attempts to minimize state changes and uses retained-mode rendering (unlike GLMax2D's use of immediate-mode rendering).

Repository
The short description actually summarized it pretty well.

Essentially, this is just a reimplementation of Max2D with a few goodies/benefits:

1) it's inherently faster at some things. For example, if you are going to render a ton of the same image, it's faster, although there are some odd cases where there seems to be a bottleneck somewhere. I haven't yet taken the time to really profile it, however, since there's been close to zero interest in it.

2) drawing a lot of images with the same blend mode and such. This implementation packs as much as it can into single texture pages, so that even if you load a font or 20 images, the number of textures you have should be very, very low, thereby minimizing how often you'll have to change the texture in OpenGL.

3) it includes my renderbuffer module (which you'll have to get as well - it's linked to in the readme as well, so you'll have a hard time missing it). Essentially, this entire Max2D implementation is just a fancy wrapper around the renderbuffer module (the texture packing code is part of the Max2D implementation, however) that handles state changes and buffering and such. As such, at pretty much any time, you can use the renderbuffer module to render your own effects that might not be handled by Max2D. Most people are afraid of doing anything that doesn't look like it's done by BRL, however, so I'm afraid I'm the only person who does this.

The code is more or less completely functional, although there are probably still bugs and bottlenecks in some areas. It can be improved, it's open source for a reason, but again, most Blitz users are terrified of doing anything themselves or working in C/C++, so I've long since given up on ever seeing someone using Blitz contribute to an open-source Blitz project.

At any rate, using it is fairly simple: you put the module in place, build it, import it, and call SetGraphicsDriver(BufferedGLMax2DDriver()). That's it, you never have to know anything else.

Latest Update

Commit log on repository.

 

Comments