Compiling Iphone branch

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
biino
Posts: 7
Joined: Mon Apr 13, 2009 1:32 am

Compiling Iphone branch

Post by biino »

Hi,

I'm new to Irrlicht and just got a mac so I thought I'd play around with the various engine's around. Irrlicht seems like familiar territory to me (come from an OpenSceneGraph and Ogre background) so I've started with it.

I've downloaded the latest Iphone branch but have encountered some issues compiling it. I've resolved those issues but I thought I'd post what I've done here in the chance that it might help someone AND get some expert eyes to see if I'm on the right track.

I'm on a Mac 10.5.6
Latest non beta Iphone SDK
Latest Xcode

Issue 1:

error: invalid conversion from 'int' to 'NSOpenGLPixelFormatAttribute'

Compiler seems quite strict with this one. Where I came across this message I simply cast it to a NSOpenGLPixelFormatAttribute. eg
- (NSOpenGLPixelFormatAttribute)depthSize
- windowattribs[9] = (NSOpenGLPixelFormatAttribute)0;

Issue 2:
CMemoryReadFile.cpp No such file or directory

I simply deleted the reference to this file from the project after finding it's not used anywhere.

Issue 3:
no matching function for call to 'irr::video::IVideoDriver::OnResize(irr::core::dimension2d<irr::s32>)'

These were peppered all around the place. I simply changed the types to match the function definitions. In this case I changed it to a u32.

Issue 4:

Code: Select all

while (!format && windowattribs[12]>1)
						{
							windowattribs -= 1;
							format = [[NSOpenGLPixelFormat alloc] initWithAttributes:windowattribs];
						}
In ClrrDeviceMacOSX on line 488
error: incompatible types in assignment of 'int' to 'NSOpenGLPixelFormatAttribute [16]'


This is where I'm not quite sure what to do. Is this pointer arithmetic with windowattribs? I changed this line to

Code: Select all

*windowattribs -= 1;
But I'm not really sure if that's what is intended.

If anyone can offer any advice or thoughts that'd be greatly appreciated. I'm a little reluctant to invest time working out how to piece together an OpenglES application with Irrlicht without knowing if my changes are going to break the engine.

Cheers
Bino
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I guess it should be windowattribs[12] -= 1. Probably most of the stuff will be fixed once I merge from trunk to ogl-es branch. I'll check the code after that, and move this post to bug forum.
Post Reply