How to use Irrlicht with Objective-C?

  • How to use Irrlicht with Objective-C? rightfold

    Irrlicht uses namespaces, a C++ feature not available in Objective-C:

    In the Irrlicht Engine, everything can be found in the namespace 'irr'. So if
    you want to use a class of the engine, you have to write irr:: before the name
    of the class. For example to use the IrrlichtDevice write: irr::IrrlichtDevice.
    To get rid of the irr:: in front of the name of every class, we tell the
    compiler that we use that namespace from now on, and we will not have to write
    irr:: anymore.
    using namespace irr;

    How can I still use Objecive-C with Irrlicht? Thanks.

  • There is a forum thread in which some people are trying to get the OpenGL ES branch to compile for iPhone; there are some instructions there, so you might have success with it in Objective-C.

    Here is another thread which covers some Objective-C Irrlicht problems.

    At this point it's probably blatantly obvious I'm just searching around to try and help you. If these didn't help I'll just delete my answer, since I am obviously not (yet) a Mac guy. :(

c++ objective-c
Related questions and answers
  • of the screen, and made of 'X's. you can collide with this wall 4 times before losing. When you collide with the wall you can no longer move, and are basically are stuck in that column of the screen until you pop out into an open space, known as a ' ' (space) character. You lose one life for each INITIAL collision with the X wall, and do not lose another until you have popped out and been freed from it. As an added touch i have made it so after you collide while traveling down the randomly generated map (or rather as the walls move uppward while your character stays put) the X chars you've

  • different objects in my game: plane, obstacle, player, bullet and I designed them like this: class Player : public GlObject{ private: std::string name; public: Player(); Bullet fire() const; //this method is unique to the class player void generate_mesh(); } Now in the game engine I want to have a general object list where I can check for example for collision, move objects, and so... the polygons to the rendering engine I designed my objects like this: class GlObject{ private: idEnum ObjId; //other identifiers public: void move_obj(); //the movements are the same

  • I have been playing around with Ogre3d and trying to integrate bullet physics. I have previously somewhat successfully got this functionality working with irrlicht and bullet and I am trying to base this on what I had done there, but modifying it to fit with Ogre. It is working but not correctly and I would like some help to understand what it is I am doing wrong. I have a state system and when... code shows the changes I made to get accurate physics. void GameState::createScene() { m_pSceneMgr->createLight("Light")->setPosition(75,75,75); // Physics // As a test we want a floor plane

  • I want to be able to (only) define game states using Lua script, but I'm not sure how I should do it. Here's what I have in mind currently: For each state, I will create a .lua file that contains a class (table) that has the same name as the file name. Each table must have a set of event handlers: onEnter (called when the state is entered), onUpdate (called every frame) and onExit (called when exiting the state). So if I want to have a MainMenuState, I will have a file called "MainMenuState.lua" which will contain something like this: MainMenuState = {} MainMenuState["onEnter"] = function

  • I've decided I want to write a central ResourceManager/ResourceCache class for my hobby game engine, but am having trouble designing a caching scheme. The idea is that the ResourceManager has... in advance of first use. Here is a bit a sketch of the classes I am using: typedef unsigned int ResourceId; // Resource is an abstract data type. class Resource { Resource(); virtual... can't think of a decent scheme to use, or the right data-structures required to quickly manage them. Could someone who has implemented a system like this give an overview of how their's worked

  • Basically when placed in the same file this works fine, but if placed in separate files (and I have tested this) just after Init() is called, the pointer to ID3D10* device's value is suddenly...(); }; #endif If I call Init() from game.cpp, the code works fine, if I call cube->init(), just as this function is entered (not when the other one is left), the device pointer suddenly has an address of 0x00000000. Thanks in advance for any help you can give. Both functions are identical - copy pasted.

  • onscreen, in the shape of the terrain rectangle, but there are no regular lines etc. Here's the code I use for rendering: void ShaderProgram::Draw() { using namespace AntiMatter; if( ! m... into a shader program, for use with glDrawArrays. My vertex data already exists in a VertexBufferObject that uses the following data structure to create a vertex buffer: class CustomVertex { public... ); glBindVertexArray( m_nVaoHandle ); glDrawArrays( GL_TRIANGLES, 0, m_nNumTris ); glBindVertexArray(0); glUseProgram(0); } Can anyone see errors or omissions in either the VAO creation code

  • a decision which Components to register (and how to organize them). For example, GameSubsystemRender can register Renderable Components. pro. Components know nothing about how they are used. Low coupling. A. We can add new GameSubsystem. For example, let's add GameSubsystemTitles that registers all ComponentTitle and guarantees that every title is unique and provides interface to quering objects by title. Of course, ComponentTitle should not be rewrited or inherited in this case. B. We can reorganize existing GameSubsystems. For example, GameSubsystemAudio, GameSubsystemRender

  • i was able to compile and link V8 against my game and code interpretation works fine. However I want to divide my code and the game loop should exist in one thread and the scripting engine should run in a second thread alongside my game loop. I am using SDL and therefore tried this code to spawn a new thread SDL_CreateThread(ScriptingEngine::SpawnMain, NULL); where the following code is my... line 716: i::Isolate* isolate = env->GetIsolate();. Has anyone a clue how I can fix this or what the exact problem is?

Data information