Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    421605

Untitled

Sign in to follow this  
Evil Steve

51 views

Meh, I can't be bothered doing my own game coding stuff recently. I tend to open the project file, tinker for 5 minutes, then leave it alone. As such, I've not done much work with my engine at all recently.

I've written a model converter programe, currently it only supports .md2 files. All it does it converts a model file to my own custom format, which is similar to MD2 at the moment, but simpler to load in. It's frame based, like MD2 - the file consists of a series of frame headers which specify the frame name and list of vertices. The vertices in the file are the same format as the vertices used to actually render, so it's just a case of reading a chunk of data from the file into the internal struct. The file format also has an index list chunk, so that's just read into a static index buffer.

I really need to tidy up the scene code, I don't like the way it works. Scene objects each have a context which is used for rendering, but there's really no need to have a context at all. Also, since all meshes currently have the same context class type, rendering different types of meshes (E.g. skinned meshes, ones that need a vertex / pixel shader) will be a pain in future, which is something I really want to avoid.

I really want something simple like:
Tick()
{
Update game logic (may add / remove objects from scene)
Sort scene (Should be low cost, scene won't drastically change on a per-frame basis)
Render scene
}

Render()
{
ObjectList = SceneGraph::GetContent
foreach Object obj in ObjectList
obj.Render()
}

Nice and simple that way. My renderer will make sure that render states aren't set at the wrong time (To minimise state swapping), so objects can just blindly set all states, vertex buffers, textures, etc they need in the Render() call.

I also really want to get meshes in and working reasonably well so I can do some real performance testing. Just something simple like rendering 50 different meshes, some translucent, while having the camera orbiting them all, with some text on screen.

Right, enough gibbering from me...
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now