This is a request in order to make easier the programming and also in order to correct some inconsistence and mess that for sure Fred and other PB programmers and members are aware about:
We can do this:
Code: Select all
malla.i=CreateCube(0,1); <- The variable 'malla' contains the ID of the cube mesh: MeshID(0)
textura.i=CreateTexture(0,256,256); <- The variable 'textura' contains the ID of the texture: TextureID(0)
material.i=CreateMaterial(0,textura); <- The variable 'material' contains the ID of the material: MaterialID(0)
entidad.i=CreateEntity(0,malla,material,0,0,0); <- The variable 'entidad' contains the ID of the Entity: EntityID(0)
So with:
Code: Select all
malla.i=CreateCube(#PB_Any,1); <- here the variable 'malla' DOES NOT contain the ID of the cube mesh: MeshID(0), but the number of the mesh, i.e. the parameter of the MeshID() function.
So, using #PB_Any changes all the logic scenary for the subsequent code.
In fact, this would touch an old PB philosophy about #PB_Any and IDs in general in some native libs, i know, but i think this matter is important, and it probably could be fixed easely if the returned values (when #PB_Any is used or not used) was always the real internal ID and never a PB number.
Ok, I must admit I really advocate to abolish PB numbers in the PB language, because it would facilitate all the programming, and the code would be more readable, etc.