Dav1dde / gl3n

OpenGL Maths for D (not glm for D).
http://dav1dde.github.com/gl3n/
Other
103 stars 49 forks source link

make value_ptr const #49

Closed extrawurst closed 9 years ago

extrawurst commented 9 years ago

this still works with the gl methods taking const GLfloat*

Dav1dde commented 9 years ago

Looks good to me, can you do the same for Quaternions and Vectors as well?

extrawurst commented 9 years ago

ok done, good to go ?

Dav1dde commented 9 years ago

Thanks

mathstuf commented 9 years ago

I'm getting unresolved symbols with this patch. The demangled symbol looks weird:

const(pure nothrow @property @safe const(float)* function()) gl3n.linalg.Matrix!(float, 4, 4).Matrix.value_ptr
mathstuf commented 9 years ago

Using gdc 2.065.

Dav1dde commented 9 years ago

Any ideas why this happens and how this is fixable? @Extrawurst

extrawurst commented 9 years ago

@mathstuf sure you have rebuilt the lib after upgrading ?

extrawurst commented 9 years ago

i cannot reproduce the issue on win32 using dmd2.065. @Dav1dde maybe a travis-ci integration can prevent those issues in the future? it is easy to integrate to even test multiple compiler flavours and its free ;)

mathstuf commented 9 years ago

Yep, started with a clean build too.

extrawurst commented 9 years ago

@mathstuf as you can see travis-ci tests those compilers too now. gdc works too

mathstuf commented 9 years ago

I guess to be clear, this is in a project using this gl3n build.

extrawurst commented 9 years ago

so ? travis-ci builds for unittesting which is pretty much the same and i am using gl3n in a project that is built using travis with gdc: https://github.com/Extrawurst/unecht

mathstuf commented 9 years ago

So what would cause that weird signature? It looks like it's returning a constant pointer to a function returning a const(float)*.

Dav1dde commented 9 years ago

Is it possible for you to provide a minimal example? Did you try with dmd instead of gdc?

mathstuf commented 9 years ago

Oops, my bad. Seems the library I was using was pointing to the wrong build tree. Sorry for the noise.