Fairly quick update today. I've added support for basic diffuse texturing to both the level editor and the game. The editor is very much bodged to support, but the game is handling it properly.
I've added Texture and TexScale properties to the StaticMesh entity type. You can see them ringed in the next screenshot:
At the moment in the editor the available texture (grass) is just hardcoded loaded, like the proxy meshes, but can add some UI for this later on.
So you just set the texture string ID on an object ("grass") and set the TexScale to size the texture correctly, and its good to go.
What I have had to do is, on export to the game file format, output multiple "internalmesh" objects, grouped by texture so that you end up with a mesh per texture. The game was already set up to load multiple internal meshes and static mesh instances, so this was pretty seamless from the game side.
I've also added a feature to the editor so that whatever object(s) are selected shoot a ray down from their centre to the nearest floor.
Makes it a lot easier to see where things are in the world and was a pretty trivial change, since I already had all the ray casting against entities code working for the select tool.
That's all for now. Thanks for stopping by.