Getting going with D/OpenGL

Anders F Björklund afb at algonet.se
Thu Oct 26 01:07:18 PDT 2006


James Pelcis wrote:

> I do indeed want to patch them (and I have).  I am willing to support OS 
> X, but I don't have a Mac to do any of the testing on.
> 
> Thanks.  That's committed now.  Is it right?

Let's see now...

"gl.d:27: module glext cannot read file 'c/gl/glext.d'"

Right, they do need a subdirectory structure to match
(same as let-me-rearrange-your-source-files Java...)

"c/gl/_glextern.d:10: identifier 'GLvoid' is not defined
  c/gl/_glextern.d:10: GLvoid is used as a type"

Simple enough, lose the GLalias for that little file.

"gears.d:361: cannot implicitly convert expression (& idle) of type 
void(C *)() to void(*)()"

OK, lose my extern(C) on my callbacks - no problem

"gears.d:368: cannot implicitly convert expression (args) of type 
char[][] to int*"

No convenience wrapper for glutInit ? OK, argc/argv.


Unfortunately it won't link OK, though, since all the
function pointers have the same name as the symbols
from the OpenGL / GLUT system frameworks it seems ?

"ld: warning multiple definitions of symbol _glutBitmapCharacter
/var/tmp//ccBNPSeY.o definition of _glutBitmapCharacter in section 
(__DATA,__data)
/System/Library/Frameworks/GLUT.framework/GLUT(single module) definition 
of _glutBitmapCharacter
ld: warning multiple definitions of symbol _glutBitmapWidth
/var/tmp//ccBNPSeY.o definition of _glutBitmapWidth in section 
(__DATA,__data)
/System/Library/Frameworks/GLUT.framework/GLUT(single module) definition 
of _glutBitmapWidth
[...]
ld: warning multiple definitions of symbol _glActiveTexture
/var/tmp//ccDsucNC.o definition of _glActiveTexture in section 
(__DATA,__data)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) 
definition of _glActiveTexture
ld: warning multiple definitions of symbol _glAlphaFunc
/var/tmp//ccDsucNC.o definition of _glAlphaFunc in section (__DATA,__data)
/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib(gll_api.o) 
definition of _glAlphaFunc
[...]"

And then it throws a weird D run-time error at me:

"Error: circular initialization dependency with module gl"

So, no, I don't think that it is right just yet...
I'll stick with the import module, later Derelict.

--anders



More information about the Digitalmars-d-learn mailing list