highgfx module

BlitzMax Forums/BlitzMax Programming/highgfx module

Update:
ModuleInfo "History: 1.01"
ModuleInfo "History: You can now yous Max2D Commands while not in SetBuffer()...EndBuffer()"
ModuleInfo "History: Added GetImageName()"
ModuleInfo "History: Added BindTexture()"
ModuleInfo "History: Added UnBindTexture()"
ModuleInfo "History: Added SetTextureBuffer()"
ModuleInfo "History: Added a mode flag to setbuffer()"
ModuleInfo "History: Added flags 'HI_RENDERTOTEXTURE_MODE_DIRECT"


The most important info of this new update is the new mode argument in SetBuffer(). This can be of any of the following:

HI_RENDERTOTEXTURE_MODE_COPY
HI_RENDERTOTEXTURE_MODE_FASTCOPY
HI_RENDERTOTEXTURE_MODE_DIRECT

Direct mode is done using fbo's, but it should do a check if you try and use that mode when its not supported and return false (otherwise true).

Also You should now be able to use normal blitzmax 2d draw commands as long as your not in a setbuffer()...endbuffer()

And...

I added SetTextureBuffer() which takes an opengl texture to rendered to. note you need to give width & height for that function.

Added custom bind texture and unbind for better support of max2d.

Also added getimagename which will return the texture name (%) of the give image (create one if highgfx dosent have it stored).

I'm sure i missed some stuff. Havent really got the time to bug test it today :(

Download from Here
Or the link in my new and imroved slimline sig :)

PS: Yer I no i said I wouldnt add fbo's but It was easier then I thought (dont worry if you dont know what i'm on about)

EDITZ: Oh I knew I forgot somthing... I added a Init function which you have to call if you are going to use HI_REDNERTOTEXTURE_MODE_DIRECT.