I am using the same coordinate system DX and Blitz use, because I needed to be able to test my transformation commands again Blitz's. You may notice that I flip the z axis in some routines. Movement should be identical to Blitz.
Z-ordering is something I realize is necessary, but don't expect to get there for a while.
I finished vertex arrays. Let me explain vertex colors.
The engine calculates vertex colors for OpenGL based on the position, normal, and original color of the vertex. Calculating these colors will NOT erase your original vertex colors. If you color a vertex (255,0,0), it will always stay that way. The engine stores a second list of colors that represent what OpenGL actually draws, and are not accessible to the user. The trick here is that the engine only recalculates these vertex lights if the mesh changes or moves, or if a light within a certain range moves. This allows us to use custom vertex lights for real-time flashes. Cartography Shop static meshes are vertex-lit to begin with. A level can be loaded with the vertex colors CShop calculates, and then static meshes can be dynamically lit by gunfire without losing the original shading. This was impossible in Blitz3D.
I have uploaded a new version. Lights and arrays are still calculated every frame in this version, but I am going to optimize it now.
Rendering commands have been moved to render.bb.
Z-ordering is something I realize is necessary, but don't expect to get there for a while.
I finished vertex arrays. Let me explain vertex colors.
The engine calculates vertex colors for OpenGL based on the position, normal, and original color of the vertex. Calculating these colors will NOT erase your original vertex colors. If you color a vertex (255,0,0), it will always stay that way. The engine stores a second list of colors that represent what OpenGL actually draws, and are not accessible to the user. The trick here is that the engine only recalculates these vertex lights if the mesh changes or moves, or if a light within a certain range moves. This allows us to use custom vertex lights for real-time flashes. Cartography Shop static meshes are vertex-lit to begin with. A level can be loaded with the vertex colors CShop calculates, and then static meshes can be dynamically lit by gunfire without losing the original shading. This was impossible in Blitz3D.
I have uploaded a new version. Lights and arrays are still calculated every frame in this version, but I am going to optimize it now.
Rendering commands have been moved to render.bb.