First Look

Some more info, the engine is written in c++ using the code::blocks IDE (which is awesome), and I will not be using the STL at all, and if the engine actually gets to a respectful state, I plan on releasing it under some open source license 🙂

Following is an example of a main function, initiating the engine and loading some meshes.

int main ( int argc, char** argv )
{
    CRenderer *renderer;
    CMesh mesh;
    CFlyCamera camera;

    bool running = true;

    renderer = new COpenGLSDLRenderer;
    renderer->init();

    mesh.load("platform.mesh");

    renderer->addMesh(&mesh, CVector3f(0.0f, 0.0f, 0.0f));
    renderer->addMesh(&mesh, CVector3f(0.8f, 0.1f, 0.0f));
    renderer->addMesh(&mesh, CVector3f(0.8f, 0.2f, 0.8f));
    renderer->addMesh(&mesh, CVector3f(0.0f, 0.3f, 0.8f));

    camera.set(CVector3f(0.0f, 0.0f, -2.0f), 3.4f, 0.0f, 0.0f);
    camera.setInput(&input);
    renderer->setCamera(&camera);

    while(running)
    {
        running = handelEvents();
        camera.updateMovement();
        renderer->startScene();
        renderer->renderMeshNodes();
        renderer->endScene();
    }

    delete renderer;
    return 0;
}

untitled

I have created a binary mesh file, which is basically a list of vertex data, texels and polygonal stuff, and most likely will evolve a lot through the early stage of the engines development, and as you can see in the screen shot, there is no texturing yet.

Advertisements