Display lists
Display lists
Just, a small question. Why doesn't Irrlicht use display lists for rendering static meshes in opengl? They are really simple to implement. By adding display lists my framerate increased from 55 to 187 fps. (Although i'm currently wasting a huge amount of memory as i am building a display list for each MeshSceneNode instead of for each mesh or meshbuffer)
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My OpenGL knowledge is small, my D3D knowledge non-existent, but are using saying that Irrlicht is using immediate mode rendering for drawing static meshes? I find that hard to believe, but if it is in fact the case could you share your code for using display lists instead?
One other thing, you say for static meshes. Does that correctly lead me to believe it uses display lists for dynamic(animated) meshes? I simply cannot believe it would use display lists for dynamic geometry and not static. As far as I know (which isn't very far when it comes to low-level 3d) display lists are good for static geometry but can't handle dynamic geometry(that's why vertex arrays are in niko's planned feature list, I assume).
One other thing, you say for static meshes. Does that correctly lead me to believe it uses display lists for dynamic(animated) meshes? I simply cannot believe it would use display lists for dynamic geometry and not static. As far as I know (which isn't very far when it comes to low-level 3d) display lists are good for static geometry but can't handle dynamic geometry(that's why vertex arrays are in niko's planned feature list, I assume).
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
No, Irrlicht never uses display lists, nor does it use vertex arrays or vertex buffers. It always uses direct mode rendering which makes it kinda slow.Electron wrote:My OpenGL knowledge is small, my D3D knowledge non-existent, but are using saying that Irrlicht is using immediate mode rendering for drawing static meshes? I find that hard to believe, but if it is in fact the case could you share your code for using display lists instead?
One other thing, you say for static meshes. Does that correctly lead me to believe it uses display lists for dynamic(animated) meshes? I simply cannot believe it would use display lists for dynamic geometry and not static. As far as I know (which isn't very far when it comes to low-level 3d) display lists are good for static geometry but can't handle dynamic geometry(that's why vertex arrays are in niko's planned feature list, I assume).
I'm uploading the code right now. (You may have to change some stuff or add some things to make it work as I also did other changes to my Irrlicht version, just try it out)
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Ok, here it is: http://www.8ung.at/splugs/displayLists.zip
The code is still a bit ugly but it works.
The code is still a bit ugly but it works.
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
This could be really really sweet, though I'm still quite surprised that if you were able to do this easily that niko hasn't already, but THANK YOU.
What about D3D rendering (which I know 0 about). I don't even know if DX uses displa lists, but what is niko doing there? My D3D framerates are usu only a couple of frames higher than my OGL ones
What about D3D rendering (which I know 0 about). I don't even know if DX uses displa lists, but what is niko doing there? My D3D framerates are usu only a couple of frames higher than my OGL ones
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
I don't know about D3D, to be honest, I even removed it from my Irrlicht sources as I have no interest in coding and optimizing everything I change twice.Electron wrote:This could be really really sweet, though I'm still quite surprised that if you were able to do this easily that niko hasn't already, but THANK YOU.
What about D3D rendering (which I know 0 about). I don't even know if DX uses displa lists, but what is niko doing there? My D3D framerates are usu only a couple of frames higher than my OGL ones
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
hmm
It compiles fine, but when I simply rebuild Hello World using the modified engine Irrlicht tells me that it cannot open the texture file of default font, except it doesn't say #DefaultFont it gives me a weird string of characters. Something in there somewhere seems to be messing up filenames (perhaps something I did wrong?)
It compiles fine, but when I simply rebuild Hello World using the modified engine Irrlicht tells me that it cannot open the texture file of default font, except it doesn't say #DefaultFont it gives me a weird string of characters. Something in there somewhere seems to be messing up filenames (perhaps something I did wrong?)
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
A dll was produced, but an incomplete one. I rebuilt everything again and things came out better, but I still get the following warning (I'm using Dev-cpp)
make.exe [warning] clock skewing detected. Dll may be incomplete
or somethign like that.
I tried it on the Quake3 map example and it seems fine, although I didn't notice a large change in my frame rate. What sort of scene did you have when you got that drastic fps increase?
Trying it on another example I had made with a bunch of .x models, the .x models seemed to lose their animation + the texture on the bsp(same one as in the Quake3 map example) didn't seem to load (though lightmap did)
Not sure what's going on there, compiled with the original dll it works fine.
Have you tested anything with animated models?
Oh I was rebuilding (4th time) again as writing this and I just got it to rebuild without that clock skewing error
make.exe [warning] clock skewing detected. Dll may be incomplete
or somethign like that.
I tried it on the Quake3 map example and it seems fine, although I didn't notice a large change in my frame rate. What sort of scene did you have when you got that drastic fps increase?
Trying it on another example I had made with a bunch of .x models, the .x models seemed to lose their animation + the texture on the bsp(same one as in the Quake3 map example) didn't seem to load (though lightmap did)
Not sure what's going on there, compiled with the original dll it works fine.
Have you tested anything with animated models?
Oh I was rebuilding (4th time) again as writing this and I just got it to rebuild without that clock skewing error
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars
Oh, btw. display lists are currently only implemented in CMeshSceneNode and not in any other type of node (check the code).
Dunno about the .x thing, removed that along with DirectX (i'm using my own format anyways)
EDIT: Oops, I see why you have problems with textures. The textures have to be set in the SMeshBuffers before rendering for the first time. And yes, I did test it with an animated MD2 file in the scene. No problems as that should use the old code.
Dunno about the .x thing, removed that along with DirectX (i'm using my own format anyways)
EDIT: Oops, I see why you have problems with textures. The textures have to be set in the SMeshBuffers before rendering for the first time. And yes, I did test it with an animated MD2 file in the scene. No problems as that should use the old code.
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Unfortunately...Ok, here it is: http://www.8ung.at/splugs/displayLists.zip
The code is still a bit ugly but it works.
It's an ERROR 404
Hmm, all user pages seem to be down right now... and i can't access ftp eithernitroman wrote:Unfortunately...Ok, here it is: http://www.8ung.at/splugs/displayLists.zip
The code is still a bit ugly but it works.
It's an ERROR 404
Raw data for raw nerves
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Oh yeah, duh. When I've got a chance maybe I'll see if I can implement it for Octree.l0calh05t wrote:Oh, btw. display lists are currently only implemented in CMeshSceneNode and not in any other type of node (check the code).
Ok, thanks. I'll see if everything works fine now.l0calh05t wrote: EDIT: Oops, I see why you have problems with textures. The textures have to be set in the SMeshBuffers before rendering for the first time. And yes, I did test it with an animated MD2 file in the scene. No problems as that should use the old code.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.
Crucible of Stars
Crucible of Stars