Main forum > Bug Reports
Problem with the maximum number of 3D objects.
spacefractal:
confirmed.
howover if you have access to the source code and download it. Not sure why Gernot limit it, since its could been higher. its currectly limited to 4096. If you ask me, this should been possible to change to whatever limit, so its a array issue.
But if you have download the source code, you can change this line in the file rainbows3d.h to a higher value:
#define GLR_MAX_OBJECTS 0x1000
0x1000 is set to extractly 4096 and not sure its possible to REDIM it.
You can actuelly download the source code and recompile it.
SnooPI:
Indeed, recompiling the source code could be a good idea, but my code will not be portable from one version to another :(
Moreover, it's unfortunate that memory allocations are static and not dynamic (no difference between a cube or a complex object) and I guess it's the same for all other resources: sprites, sounds, ...
For now I think I will dynamically allocate / deallocate objects in real time in my program (trying not to have too much slowdown).
Thanks for the confirmation Spacefractal.
spacefractal:
There is a _build.bat for every platform, which will compile the whole platform. Then done then you can build as normal. There is a limit of 4096 objects in this case, but would been nice if you can set it to any number by your self. but for now, this is the way for go.
Kitty Hello:
You need more than 4000 different 3D objects? Really?
SnooPI:
Yes, it's not so strange :)
Here are some reasons:
1 / We can only assign one texture per object (it's also a problem for the lightmapping).
2 / You have implemented a frustrum optimization by object (thanks, needless to do it), so it's interesting for speed.
3 / For example, games like Minecraft require a lot of objects.
4 / Moreover, what is important for the speed (and the memory) in Opengl is not the number of objects but the complexity of each object.
But rest assured, on the maps where I need more, I will assign them on the fly (I hope without much slowdown).
Thank you for your interest and long life to GLB on Steam :good:
--- EDIT ---
Hmm ... after Gernot's intervention, I thought about it and maybe I was wrong.
I'm looking for too much speed, I'll see my algorithm again tomorrow.
Thank you Gernot you helped me without even answering me :D
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version