Hi guys, I have more basic questions and need your help!
I come from a Blitz3D background, where 3D commands seem much easier to use. I need help on how to deal with multiple 3D objects/entities in GLBasic. How does GLBasic know which object I want to, say, rotate? The X_ROTATION command doesn't seem to have a parameter to select the object. The helpfile states that the command "Rotates the next 3D object..." How does it know what the "next" object is? Is there a command to select an object to be the "next" object?
Another question (which may be related to the above question) - do I have to X_SETTEXTURE every time I go through a game loop?
Thanks!
OpenGL (which is what GLBasic uses) is a state machine, which means, that once you have set something it will stay active for all following objects, until you change it again. GLBasic is in most cases exactly the same. So once you have set e.g. X_ROTATION or X_TEXTURE this will affect all objects that you draw after this command. Normally a new frame will delete all states, so you need to set them again each frame. Setting a state (like setting a textur) is slow, so only set it if its really necessary, e.g. if you have 3 objects that use the same texture, set this texture once and then draw all 3 objects.
Since you come from Blitz3D you will find GLBasic a bit complicated and harder to use, just dont think in Blitz' entitys, GLB 3D just works the same way like GLB 2D. I recommend trying to understand it, its worth it, since its powerful!
If you really want to stick with the idea of an entity system, you can try one of the ES that got developed for GLB:
Gernots big ES (http://www.glbasic.com/forum/index.php?topic=1165.0)
My small ESlite (http://www.kanonet.de/downloads/libesl)
Thanks for the explanation, kanonet!
I found it rather strange after using the 3D stuff in DBPro... You do get used to it though!
Bigsofty's OpenB3D http://www.glbasic.com/forum/index.php?topic=6982.0 (http://www.glbasic.com/forum/index.php?topic=6982.0) might be of use to you while you get used to GLB's way of doing things. It's windows only I believe & may not be any use to you but just in case I thought I will mention it.
Lee
Wow, good to know that such a program exists!
However, I'm interested more in programming now for the mobile platform rather than Windows.
Thanks, Lee! :)