Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
OpenSceneGraph 3.0: Beginner's Guide

You're reading from   OpenSceneGraph 3.0: Beginner's Guide This book is a concise introduction to the main features of OpenSceneGraph which then leads you into the fundamentals of developing virtual reality applications. Practical instructions and explanations accompany you every step of the way.

Arrow left icon
Product type Paperback
Published in Dec 2010
Publisher Packt
ISBN-13 9781849512824
Length 412 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (22) Chapters Close

OpenSceneGraph 3.0
Credits
1. Foreword
About the Authors
2. Acknowledgement
About the Reviewers
3. www.PacktPub.com
4. Preface
1. The Journey into OpenSceneGraph FREE CHAPTER 2. Compilation and Installation of OpenSceneGraph 3. Creating Your First OSG Program 4. Building Geometry Models 5. Managing Scene Graph 6. Creating Realistic Rendering Effects 7. Viewing the World 8. Animating Scene Objects 9. Interacting with Outside Elements 10. Saving and Loading Files 11. Developing Visual Components 12. Improving Rendering Efficiency Pop quiz—Answers Index

Avoiding conflicting modifications


We have discussed OSG's multithread implementation and thread safety in a very simple and easy way. The theory of the processing architecture is really out of the scope of this book. But in order to show the importance of maintaining data variance of scene objects, we need to briefly talk about the threading model.

OSG can make the draw traversal, which transfers data to the OpenGL pipeline run in a separated thread. It must be synchronized with other draw traversals in every frame, but part of the draw traversal can usually overlap the update traversal coming from the next frame, which improves the rendering efficiency and reduces frame latency. That means that the frame() method of osgViewer::Viewer will return while the drawing work is still active. Data changes in update callbacks could then conflict with the unfinished rendering process and cause unexpected behaviors, and even crashes.

OSG supplies a solution in the setDataVariance() method, which...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime