Xaphier Report post Posted October 4, 2005 Hi everyone! I added frame buffer support to the cvs version of the client. Perhaps somebody wants to test it. To enable it, compile the client with -DUSE_FRAMEBUFFER. Every comment is welcome. Share this post Link to post Share on other sites
Lachesis Report post Posted October 5, 2005 What does it actually do? Share this post Link to post Share on other sites
Grum Report post Posted October 5, 2005 (edited) Can't compile it together with -DMEMORY_DEBUG for some reason I can't fathom. When using it on a GF MX 440 Go, it segfaults: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 9165)] 0x0000000000000000 in ?? () (gdb) bt full #0 Â 0x0000000000000000 in ?? () No symbol table info available. #1 Â 0x0000000000426683 in make_color_framebuffer (width=1024, height=512, Â Â FBO=0x70a22c, FBORenderBuffer=0x70a230, FBOTexture=0x70a234) Â Â at framebuffer.c:32 No locals. #2 Â 0x000000000044eb8f in make_reflection_framebuffer (width=1, height=7381548) Â Â at reflection.c:339 No locals. #3 Â 0x00000000004341ff in init_stuff () at init.c:735 Â Â Â Â __FUNCTION__ = "init_stuff" #4 Â 0x000000000043c6a3 in main (argc=1, argv=0x70a22c) at main.c:223 No locals. EDIT: looks like it's calling a function at NULL, so it's probably because this chipset doesn't provide an extension you're using. Edited October 5, 2005 by Grum Share this post Link to post Share on other sites
Learner Report post Posted October 5, 2005 Can't compile it together with -DMEMORY_DEBUG for some reason I can't fathom. When using it on a GF MX 440 Go, it segfaults: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 16384 (LWP 9165)] 0x0000000000000000 in ?? () (gdb) bt full #0 0x0000000000000000 in ?? () No symbol table info available. #1 0x0000000000426683 in make_color_framebuffer (width=1024, height=512, FBO=0x70a22c, FBORenderBuffer=0x70a230, FBOTexture=0x70a234) at framebuffer.c:32 No locals. #2 0x000000000044eb8f in make_reflection_framebuffer (width=1, height=7381548) at reflection.c:339 No locals. #3 0x00000000004341ff in init_stuff () at init.c:735 __FUNCTION__ = "init_stuff" #4 0x000000000043c6a3 in main (argc=1, argv=0x70a22c) at main.c:223 No locals. EDIT: looks like it's calling a function at NULL, so it's probably because this chipset doesn't provide an extension you're using. 205725[/snapback] Really dumb question, did you remember to do a full recompile after changing the compile options? Share this post Link to post Share on other sites
Grum Report post Posted October 5, 2005 Really dumb question, did you remember to do a full recompile after changing the compile options? Yes Share this post Link to post Share on other sites
Xaphier Report post Posted October 5, 2005 @Lachesis The scene is mirrored renderd, into a frame buffer and then used as texture for the water tiles. Nothing big. @Grum I found the bug, but can't commit to cvs at the moment. Don't know why Share this post Link to post Share on other sites
Grum Report post Posted October 5, 2005 It's a problem with berlios, I can't update cvs either. Share this post Link to post Share on other sites
Learner Report post Posted October 5, 2005 It's a problem with berlios, I can't update cvs either. 205765[/snapback] They do that regularly. You just have to wait for it to come back online. Share this post Link to post Share on other sites
Xaphier Report post Posted October 6, 2005 Bugfix uploaded. Please try again Share this post Link to post Share on other sites
Grum Report post Posted October 6, 2005 (edited) Okay, thanks Xaphier, it now properly complains I don't have GL_EXT_framebuffer_object, and continues. Unfortunately, for obvious reasons I can't tell you if the framebuffer code works EDIT: but frame rate drops from >= 30 to about 2 when I enable USE_FRAMEBUFFER Edited October 6, 2005 by Grum Share this post Link to post Share on other sites
Lachesis Report post Posted October 6, 2005 The compile problem with -DMEMORY_DEBUG was subtle but interesting. We have to be careful when the redefine of malloc & co. takes place, as it shall affect our own files yet only our own. stdlib.h defines prototypes for malloc, free and calloc, which causes compile errors when elmemory.h is included before stdlib.h. I modified global.h to get around this, but we still need to be careful. Share this post Link to post Share on other sites
Lhibou Report post Posted October 6, 2005 Compil errors GL_FRAMEBUFFER_EXT GL_FRAMEBUFFER_COMPLETE_EXT undeclared identifier on WXPSP2 with MSVC 6.0 Share this post Link to post Share on other sites
Xaphier Report post Posted October 6, 2005 OK, I added the #defines for the frame buffer. Now it should work with old opengl headers. Share this post Link to post Share on other sites
Lhibou Report post Posted October 6, 2005 OK, I added the #defines for the frame buffer. Now it should work with old opengl headers. 206027[/snapback] THx, compilation OK. I upgraded my drivers because I did'nt have GL_EXT_framebuffer_object. I note an important drop of FPS. With my GeForce FX 5200 (128MB), I was before at 16-17 FPS and now 4-5 FPS. With my GeForce 6610 XL (12! MB), before 50-60 fps, and now 35-45 FPS. Is it possible to add an option to desactivate using framebuffer? Share this post Link to post Share on other sites
Xaphier Report post Posted October 6, 2005 It's there. Options -> advanced video -> toggle frame buffer Share this post Link to post Share on other sites
Entropy Report post Posted October 6, 2005 The idea is to use this method and generate waving reflections and such, because otherwise it's not really worth it. Share this post Link to post Share on other sites
ttlanhil Report post Posted October 7, 2005 The idea is to use this method and generate waving reflections and such, because otherwise it's not really worth it. 206131[/snapback] ahh, so that's the goal. nifty. some sort of sine function with adjustable amplitude/strength for normal waves, as well as rings around where raindrops land would be good. also, if possible to adjust the alpha of the framebuffer itself, we can have partly-see-through water Share this post Link to post Share on other sites
Lachesis Report post Posted October 7, 2005 (edited) Lhibou, if you miss those defines you have an outdated glext.h. You can get a recent one from the SGI webpage: http://oss.sgi.com/projects/ogl-sample/registry/ Though it is probably convenient to put those defines into gl_init.h I have to say I don't like it one bit. Then we can as well ship our own copy of glext.h along with the client sources, which though still not wise at least would be better. P.S. Now after having nagged a bit, can we have reflections of particles? Edited October 7, 2005 by Lachesis Share this post Link to post Share on other sites
Xaphier Report post Posted October 7, 2005 Short answer: Yes, no problem, I can do this. We also can add view dependent refraction and caustics. But before I would like to know if there are problems with the frame buffer or not. And yes, I know it is slower than befor, but befor speeding it up I am looking for bugs. Share this post Link to post Share on other sites
Lhibou Report post Posted October 7, 2005 Lhibou, if you miss those defines you have an outdated glext.h. You can get a recent one from the SGI webpage: http://oss.sgi.com/projects/ogl-sample/registry/ Though it is probably convenient to put those defines into gl_init.h I have to say I don't like it one bit. Then we can as well ship our own copy of glext.h along with the client sources, which though still not wise at least would be better. P.S. Now after having nagged a bit, can we have reflections of particles? 206456[/snapback] Lachesis, thx for the information. Yesterday I did'nt find where to dl the.h. Share this post Link to post Share on other sites
Entropy Report post Posted October 8, 2005 P.S. Now after having nagged a bit, can we have reflections of particles? 206456[/snapback] Some particles might look wrong though... Like fountains particles and such. Share this post Link to post Share on other sites
Lachesis Report post Posted October 11, 2005 Wrong in what way? Btw, the particles are far from being perfect, the additive blending obviously doesnt work with fog, and the constant size regardless from distance makes them look odd when very close or very far. Share this post Link to post Share on other sites
Entropy Report post Posted October 11, 2005 Wrong in what way? Like waterfall particles flowing up in the reflection. Share this post Link to post Share on other sites
Kendai Report post Posted October 11, 2005 Like waterfall particles flowing up in the reflection. 208423[/snapback] That's how water droplets look though when falling, since it's a direct reflection. However, you might want to add "splashes" and such to make it more realistic, otherwise it may very well look "wrong." You want to make sure the water surface is clearly noticeable, or it would look like the particles are rushing towards each other in perfect mirror unison. Not sure if that made sense, so don't mind it if it doesn't. Share this post Link to post Share on other sites
Wytter Report post Posted October 12, 2005 Can I have a screenshot? I only have my notebook here, and the graphics is teh sukc! Share this post Link to post Share on other sites