Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

How would I go about using Double Buffering (to create a loading screen) in Panda3D using C++? I've searched Google and found some forums that talk about the concept of swapping buffers, but I haven't seen any that show any type of source code (specifically Panda3D/C++). I'd like to try and stay away from using pure OpenGL code and work it through Panda3D, but if I have no other choice, then I'll have to go with OpenGL coding.

share|improve this question
    
According to the documentation, it looks like Panda3D gives you a double buffered rendering context by default; you shouldn't have to do anything. Maybe you should tell us what you're actually trying to do? –  Trevor Powell Nov 20 '11 at 11:46
    
I'm trying to create a loading screen. While the loading screen is being shown, the game is drawn in the second buffer, then copied over to the first. I don't know how to implement this into Panda3D. –  Josh Vega Nov 20 '11 at 21:36
    
I think you're confused about what double-buffering is and what it's for. Everything you draw is always drawn into an offscreen buffer (often called a 'back buffer'), and then the front and back buffers are swapped. This happens in every frame of every game; it's so that you don't see flickering as you would if the new frame was being drawn straight to the screen. You don't have to do anything special to get this: it happens automatically under OpenGL and similar modern graphics libraries. –  Trevor Powell Nov 20 '11 at 21:42
    
Oh...ok, so how do I setup a loading screen then? –  Josh Vega Nov 22 '11 at 22:06
add comment

2 Answers

Usually 3D engines like Panda3D handle trivial details like double buffering for you automatically. You only have to start tweaking the back-buffer settings if you want things like triple-buffering.

share|improve this answer
add comment

You just need to have an image on top of everything, so you won't see new things popping up one after another.

The default Panda3d nodes for GUI/HUD are render2d, aspect2d and pixel2d. Attach an image NodePath to one of them.

Manual explains each in detail.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.