Page 1 of 1

GL galore and SelectBrush()

Posted: Tue Jun 09, 2015 9:25 pm
by TheMartian
Hi

Seing that simply adding the @REQUIRE "glgalore" statement would 'divert' programs with hardware brushes to GL statements, I of course immediately wanted to try this. The program used for testing creates among other things a big hardware brush as a fixed background and then paints to that brush with other smaller hardware brushes. All brushes used in the program are HW brushes except the one used as blueprint to create the #BGMAP brush. And that one is freed just after use. This works normally. But if I add the GLgalore plugin I get an error that for a Brush called #BGMAP initialized as follows...


BeginDoubleBuffer(True)

... some code...

CreateBrush(#DUMMYMAP,self.vmapsize_x,self.vmapsize_y)
CopyBrush(#DUMMYMAP,#BGMAP,{Hardware=True})
FreeBrush(#DUMMYMAP)

... some code ...

SelectBrush(#BGMAP)

The selectBrush statement returns:

"Hardware Brushes cannot be used here"

This happens in WIndows as well as on a SAM440ep. On both installations the test programs provided with GLgalore run fine. Both systems run OS4 FE.

So the question is.... Is SelectBrush() an NoGo when using HW brushes and GLgalore?

regards
Jesper

Re: GL galore and SelectBrush()

Posted: Wed Jun 10, 2015 8:44 pm
by airsoftsoftwair
This is currently unsupported because it requires framebuffer objects which aren't supported by TinyGL and MiniGL. It wouldn't be difficult to support this on Windows, Linux and Mac OS but I wanted to keep it as portable as possible so I decided not to support it to make GL Galore behave the same on every platform.