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.
CNullDriver.h:745: warning: converting of negative value '-0x00000000000000001' to 'irr::u32'
CNullDriver.h:745: warning: converting of negative value '-0x00000000000000001' to 'irr::u32'
CIrrDeviceMacOSX.h: In constructor `irr::CIrrDeviceMacOSX::CCursorControl::CCursorControl(const irr::core::dimension2d<irr::u32>&, irr::CIrrDeviceMacOSX*)':
CIrrDeviceMacOSX.h:217: warning: 'irr::CIrrDeviceMacOSX::CCursorControl::IsVisible' will be initialized after
CIrrDeviceMacOSX.h:214: warning: 'irr::core::dimension2d<irr::f32> irr::CIrrDeviceMacOSX::CCursorControl::InvWindowSize'
CIrrDeviceMacOSX.h:109: warning: when initialized here
COpenGLSLMaterialRenderer.cpp: In destructor `virtual irr::video::COpenGLSLMaterialRenderer::~COpenGLSLMaterialRenderer()':
COpenGLSLMaterialRenderer.cpp:98: error: no matching function for call to 'min_(GLint&, int)'
COpenGLSLMaterialRenderer.cpp:111: error: no matching function for call to 'min_(GLint&, int)'
COpenGLSLMaterialRenderer.cpp: In member function `virtual bool irr::video::COpenGLSLMaterialRenderer::setPixelShaderConstant(const irr::c8*, const irr::s32*, int)':
COpenGLSLMaterialRenderer.cpp:658: error: invalid conversion from 'const irr::s32*' to 'const GLint*'
COpenGLSLMaterialRenderer.cpp:658: error: initializing argument 3 of 'void irr::video::COpenGLExtensionHandler::extGlUniform1iv(GLint, GLsizei, const GLint*)'
COpenGLSLMaterialRenderer.cpp:661: error: invalid conversion from 'const irr::s32*' to 'const GLint*'
COpenGLSLMaterialRenderer.cpp:661: error: initializing argument 3 of 'void irr::video::COpenGLExtensionHandler::extGlUniform2iv(GLint, GLsizei, const GLint*)'
COpenGLSLMaterialRenderer.cpp:664: error: invalid conversion from 'const irr::s32*' to 'const GLint*'
COpenGLSLMaterialRenderer.cpp:664: error: initializing argument 3 of 'void irr::video::COpenGLExtensionHandler::extGlUniform3iv(GLint, GLsizei, const GLint*)'
COpenGLSLMaterialRenderer.cpp:667: error: invalid conversion from 'const irr::s32*' to 'const GLint*'
COpenGLSLMaterialRenderer.cpp:667: error: initializing argument 3 of 'void irr::video::COpenGLExtensionHandler::extGlUniform4iv(GLint, GLsizei, const GLint*)'
COpenGLSLMaterialRenderer.cpp:675: error: invalid conversion from 'const irr::s32*' to 'const GLint*'
COpenGLSLMaterialRenderer.cpp:675: error: initializing argument 3 of 'void irr::video::COpenGLExtensionHandler::extGlUniform1iv(GLint, GLsizei, const GLint*)'
make: *** [COpenGLSLMaterialRenderer.o] Error 1
Intel x86 version doesn't have these errors. v1.8 have only one bug on x86 related to "long GLuint", this is unacceptable variable for Clang compiler, but I fixed it in trunk some time ago.
Yeah, the errors are due to different compiler and pickiness of this one (gcc?). I fixed the errors, at least it should go through now. Basically just an explicit reinterpretation cast for the pointers and avoiding GLint in our min_ templates. NullDriver and OSX device warnings are just warnings, so should work anyway.
Well, as I said, this is not specific to PPC, but a general problem which might arise on any platform where the compiler is not sure whether GLint and int are exactly the same. Not even sure what the C++ standard says at this point. Now we're at least on the safe side and if this even helps those PPC people, why not.
In file included from COpenGLDriver.cpp:26:
MacOSX/CIrrDeviceMacOSX.h:22: error: stray '@' in program
MacOSX/CIrrDeviceMacOSX.h:23: error: stray '@' in program
MacOSX/CIrrDeviceMacOSX.h:24: error: stray '@' in program
CNullDriver.h: In constructor `irr::video::CNullDriver::SOccQuery::SOccQuery(irr::scene::ISceneNode*, const irr::scene::IMesh*)':
CNullDriver.h:745: warning: converting of negative value '-0x00000000000000001' to 'irr::u32'
CNullDriver.h:745: warning: converting of negative value '-0x00000000000000001' to 'irr::u32'
COpenGLTexture.h: In constructor `irr::video::COpenGLTexture::SStatesCache::SStatesCache()':
COpenGLTexture.h:71: warning: 'irr::video::COpenGLTexture::SStatesCache::IsCached' will be initialized after
COpenGLTexture.h:69: warning: 'irr::s8 irr::video::COpenGLTexture::SStatesCache::LODBias'
COpenGLTexture.h:58: warning: when initialized here
MacOSX/CIrrDeviceMacOSX.h: In constructor `irr::CIrrDeviceMacOSX::CCursorControl::CCursorControl(const irr::core::dimension2d<irr::u32>&, irr::CIrrDeviceMacOSX*)':
MacOSX/CIrrDeviceMacOSX.h:217: warning: 'irr::CIrrDeviceMacOSX::CCursorControl::IsVisible' will be initialized after
MacOSX/CIrrDeviceMacOSX.h:214: warning: 'irr::core::dimension2d<irr::f32> irr::CIrrDeviceMacOSX::CCursorControl::InvWindowSize'
MacOSX/CIrrDeviceMacOSX.h:109: warning: when initialized here
COpenGLDriver.h: In constructor `irr::video::COpenGLDriver::COpenGLDriver(const irr::SIrrlichtCreationParameters&, irr::io::IFileSystem*, irr::CIrrDeviceMacOSX*)':
COpenGLDriver.h:587: warning: 'irr::video::COpenGLDriver::Params' will be initialized after
COpenGLDriver.h:434: warning: 'irr::video::COpenGLCallBridge* irr::video::COpenGLDriver::BridgeCalls'
COpenGLDriver.cpp:477: warning: when initialized here
COpenGLDriver.cpp: In member function `virtual irr::u32 irr::video::COpenGLDriver::getOcclusionQueryResult(irr::scene::ISceneNode*) const':
COpenGLDriver.cpp:1450: warning: converting of negative value '-0x00000000000000001' to 'irr::u32'
COpenGLDriver.cpp: In member function `virtual void irr::video::COpenGLDriver::drawStencilShadowVolume(const irr::core::array<irr::core::vector3df, irr::core::irrAllocator<irr::core::vector3df> >&, bool, irr::u32)':
COpenGLDriver.cpp:3812: warning: passing negative value '-0x00000000000000001' for converting 1 of 'void glStencilMask(GLuint)'
COpenGLDriver.cpp:3813: warning: passing negative value '-0x00000000000000001' for converting 3 of 'void glStencilFunc(GLenum, GLint, GLuint)'
COpenGLDriver.cpp: In member function `virtual void irr::video::COpenGLDriver::drawStencilShadow(bool, irr::video::SColor, irr::video::SColor, irr::video::SColor, irr::video::SColor)':
COpenGLDriver.cpp:3939: warning: passing negative value '-0x00000000000000001' for converting 3 of 'void glStencilFunc(GLenum, GLint, GLuint)'
make: *** [COpenGLDriver.o] Error 1
Your compiler support Objective-C? Which MacOSX and XCode versions? Maybe try to install the latest available XCode for Your platform? As I remember MacOSX 10.5 support PowerPC.
Are these @ signs necessary in the header file? Looks like some special forward declaration. The problem here is that the OSX device header is included in COpenGLDriver.cpp, which is not an obj-c file, but a pure C++ file. Hence it's largely illegal to put the @ signs there. If it's required or favorable just put some ifdefs to check for an obj-c compiler.
Some of the other warnings are now also fixed
@xeno74
Do You use XCode project from Irrlicht trunk? or prepare Your own project file? Please check if COpenGLDriver.cpp is signed as (ObjC++) in Your project.
Forward declaration in Objective-C is require for newer MacOSX SDKs (compiler say "Redefinition as 'VAR_NAME' as differend kind of symbol", but in project file COpenGLDriver.cpp is signed as Objective-C++ file so it's fine. "#ifdef __OBJC__" isn't good, because if we include this file from COpenGLDriver.cpp (C++) and CIrrDeviceMacOSX.mm (ObjC++) this macro isn't usefull when we have ifdef brackets for whole header file which inform compiler that this file is already included. This is also not usefull in current state when I signed in XCode project COpenGLDriver.cpp as ObjC++. If older XCode doesn't support sign file type as another (I think that this cause current @ problem) maybe we should change these types to void and casting them to properly types in CIrrDeviceMacOSX.mm? In the latest trunk I added ifdef for SDK version 10.6 and I think that this is safe sdk version in this case. I hope that this solve some of PPC compilation issues.
Nadro wrote:@xeno74
Do You use XCode project from Irrlicht trunk? or prepare Your own project file? Please check if COpenGLDriver.cpp is signed as (ObjC++) in Your project.
I can't use the XCode project from trunk because it doesn't work on Tiger. I've tried to open it with XCode 2.0 but it doesn't open. I use the Linux way to compile Irrlicht on OS X.
Thats why You have these problems. If You use standard makefile You must check how compile ObjC files with them (You must add to Your makefile files from sources/Irrlicht/MacOSX and select PPC arch + properly SDK), but the better idea is to create custom XCode project.