[Gridflow-dev] OpenGL wrangling
Claude Heiland-Allen
claudiusmaximus at goto10.org
Tue Aug 10 08:08:45 EDT 2010
On 10/08/10 01:09, Mathieu Bouchard wrote:
> On Mon, 9 Aug 2010, Claude Heiland-Allen wrote:
>> My standard workaround is to use GLEW[2] which usually makes things
>> just work (unless a function really isn't supported, in which case the
>> function pointer is 0 - shifting existence checks from compile-time to
>> run-time has some problems too of course...). I don't know how this
>> would interact with Gem's usage (or not) of GLEW, though.
I did a brief test: creating a new patch with
"blend_equation max"--[gf/gl]
results in
error: [gf/gl] inlet 0 method blend_equation: need OpenGL ARB_imaging
extension
... you might be able to track this down from the Find menu.
Then adding:
"create"--[gemwin]
and retrying results in no error: this is to be expected (provided that
you do have ARB_imaging) as Gem initializes GLEW at (each) gemwin
creation (at least the Gem version I have...)
> I added checks for null pointers for the methods you mentioned, except
> the ARB. Does it look ok ? Should I do it with all the ARB as well ?
Thanks for adding them, I realized this step was missing after I went to
bed. The null pointer chacks could be grouped together by checking the
supported OpenGL versions and extensions, though it's probably neither
easier or clearer to do it that way, depending on how gridflow is
implemented (especially as drivers can lie and say they support an
extension but don't implement all of its functions, etc).
I think my main machine does support the GL_ARB_imaging extension, but
I'm fairly sure my old one doesn't; adding a null check to
glBlendEquation should be fine (I have done this in r6006; I also think
the #ifdef ARB thing is unnecessary as GLEW should define all the
constants from everywhere).
BTW, there are many different extensions/functions with ARB[1] in the
name, so "the ARB stuff" is too vague to be useful :)
[1] http://en.wikipedia.org/wiki/OpenGL_Architecture_Review_Board
> Do you have anything else that still doesn't compile ? (macro constants
> not found and stuff)
No, it compiles fine (even with -DARB) - the (only?) problem with GLEW
is that the existence checks are shifted to runtime so you have to code
more defensively.
Claude
--
http://claudiusmaximus.goto10.org
More information about the Gridflow-dev
mailing list