I made a few changes to trivial things. There's one change that's not so trivial though:
In OS X, a GLhandleARB is a pointer. This means that it can't be cast to a GLuint. I worked around this by duplicating the extGlProgramParameteri function (as can be seen in the patch). There may be a better way to do this.
I haven't tested this thoroughly yet.
Patch: http://pastie.org/2027978
[fixed] Building trunk in OS X in 64-bit with 10.6 SDK
[fixed] Building trunk in OS X in 64-bit with 10.6 SDK
Last edited by balrog on Mon Jun 06, 2011 7:25 pm, edited 1 time in total.
Looking back at the patch, I'm not sure if the #elif at line 687 of COpenGLDriver.cpp should be that, or perhaps a separate #if/#endif block. It seems that GL_ARB_framebuffer_sRGB and GL_EXT_framebuffer_sRGB should both be treated, without an else-if.
As for the other patches — COpenGLSLMaterialRenderer.cpp wasn't fixed yet (but I can say that my "fix" wasn't the cleanest), and more importantly, video::createSoftwareDriver2() no longer exists.
As for the other patches — COpenGLSLMaterialRenderer.cpp wasn't fixed yet (but I can say that my "fix" wasn't the cleanest), and more importantly, video::createSoftwareDriver2() no longer exists.
Now I'm getting this error:
This is because the first parameter of the glProgramParameteriEXT() function is a GLuint, and since a GLhandleARB is a pointer on Mac OS, this is an invalid cast.
My previous fix (with the ugly code duplication) didn't have this issue, but it was ugly. I can't seem to think of a better way of the top of my head...
EDIT:
It fails at the same spot as before, due to conversion from GLuint to a pointer:
EDIT 2:
Throughout the Xcode project file, this path is used. Obviously it doesn't work right on my machine.
Code: Select all
In file included from /sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLDriver.h:25,
from /sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLTexture.cpp:11:
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h: In member function 'void irr::video::COpenGLExtensionHandler::extGlProgramParameteri(void*, GLenum, GLint)':
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2227: error: invalid conversion from 'void*' to 'GLuint'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLExtensionHandler.h:2227: error: initializing argument 1 of 'void glProgramParameteriEXT(GLuint, GLenum, GLint)'
This is because the first parameter of the glProgramParameteriEXT() function is a GLuint, and since a GLhandleARB is a pointer on Mac OS, this is an invalid cast.
My previous fix (with the ugly code duplication) didn't have this issue, but it was ugly. I can't seem to think of a better way of the top of my head...
EDIT:
It fails at the same spot as before, due to conversion from GLuint to a pointer:
Code: Select all
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:151: error: invalid conversion from 'GLuint' to 'void*'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:151: error: initializing argument 1 of 'void irr::video::COpenGLExtensionHandler::extGlProgramParameteri(void*, GLenum, GLint)'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:152: error: invalid conversion from 'GLuint' to 'void*'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:152: error: initializing argument 1 of 'void irr::video::COpenGLExtensionHandler::extGlProgramParameteri(void*, GLenum, GLint)'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:154: error: invalid conversion from 'GLuint' to 'void*'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:154: error: initializing argument 1 of 'void irr::video::COpenGLExtensionHandler::extGlProgramParameteri(void*, GLenum, GLint)'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:156: error: invalid conversion from 'GLuint' to 'void*'
/sources/3d-vr/irrlicht/source/Irrlicht/MacOSX/../COpenGLSLMaterialRenderer.cpp:156: error: initializing argument 1 of 'void irr::video::COpenGLExtensionHandler::extGlProgramParameteri(void*, GLenum, GLint)'
Throughout the Xcode project file, this path is used. Obviously it doesn't work right on my machine.
Code: Select all
/Users/hybrid/irrlicht/branch_1.7/source/Irrlicht/MacOSX/