[fixed] Building trunk in OS X in 64-bit with 10.6 SDK

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
balrog
Posts: 3
Joined: Mon Jun 06, 2011 4:09 pm

[fixed] Building trunk in OS X in 64-bit with 10.6 SDK

Post by balrog »

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
Last edited by balrog on Mon Jun 06, 2011 7:25 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, thanks for the report. From a quick view it seems to be all fine, I'll patch the code tonight.
balrog
Posts: 3
Joined: Mon Jun 06, 2011 4:09 pm

Post by balrog »

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.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, I was still working on the other part, which is now commited. The sRGB part does not need to handle this case differently, the define results in the same number. So either one that exists is fine. And sorry for overlooking the burningsvideo change. I'll commit that in a few minutes.
balrog
Posts: 3
Joined: Mon Jun 06, 2011 4:09 pm

Post by balrog »

Now I'm getting this error:

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)'
EDIT 2:
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/
Post Reply