OpenSceneGraph to VulkanSceneGraph
Smart pointers
| OSG | VSG | Notes |
|---|---|---|
osg::ref_ptr<T> |
vsg::ref_ptr<T> |
|
osg::observer_ptr<T> |
vsg::observer_ptr<T> |
Base classes
| OSG | VSG | Notes |
|---|---|---|
osg::Referenced |
vsg::Object |
|
osg::Object |
vsg::Object |
|
META_Object, META_Node |
vsg::Inherit<T> |
OSG uses C macros while VSG uses Curiously Recurring Template Pattern |
vsg::Allocator |
Only VSG has memory allocator. |
Data classes
| OSG | VSG | Notes |
|---|---|---|
vsg::Data |
Base class with no OSG equivalent | |
osg::Image |
vsg::Value<T>, vsg::Array<T>, vsg::Array2D<>, vsg::Array3D<T> |
|
osg::Uniform |
vsg::Value<T>, vsg::Array<T>, vsg::Array2D<>, vsg::Array3D<T> |
|
osg::Array<T> |
vsg::Array<T> |
|
osg::IndexArray<T> |
vsg::Array<T> |
Scene graph nodes
| OSG | VSG | Notes |
|---|---|---|
osg::Node |
vsg::Node |
|
osg::Group |
vsg::Group |
|
osg::Switch |
vsg::Switch |
|
osg::LOD |
vsg::LOD |
|
osg::PagedLOD |
vsg::PagedLOD |
|
osg::Transform |
vsg::Transform |
Both base classes for providing model transforms |
osg::MatrixTransform |
vsg::MatrixTransform |
|
osg::MatrixTransform |
vsg::AbsoluteTransform |
osg::MatrixTransform::setReferenceFrame(ABSOLUTE_RF) equivalent to vsg::AbsoluteTransform |
osg::PositionAttitudeTransform |
No VSG equivalent | |
osg::AutoTransform |
No VSG equivalent | |
osg::Billboard |
No VSG equivalent - use instanced geometry and vertex shader. |
Geometry
| OSG | VSG | Notes |
|---|---|---|
osg::Drawable |
vsg::Command |
|
osg::Geometry |
vsg::Geometry |
|
osg::DrawArrays |
vsg::Draw |
|
osg::DrawElements |
vsg::DrawIndexed |
|
vsg::Commands |
No OSG equivalent. | |
vsg::VertexDraw |
No direct OSG equivalent, closest is osg::Geometry | |
vsg::VertexIndexDraw |
No OSG equivalent, closest is osg::Geometry. | |
vsg::BindVertexBuffers |
No OSG equivalent. | |
vsg::BindIndexBuffers |
No OSG equivalent. |
State
| OSG | VSG | Notes |
|---|---|---|
osg::StateSet |
vsg::StateGroup |
osg::Group with an osg::StateSet is broadly similar to vsg::StateGroup |
osg::StateAttribute |
vsg::StateCommand |
Both are state base classes, but only vaguely similar |
osg::Texture, osg::Texture1D, osg::Texture2D, osg::Texture3D, osg::TextureCubeMap, Texture2DArray |
vsg::DescriptorImage, vsg::ImageView, vsg::Image |
No direct mapping but together fulfill the same role. |
osg::Uniform |
vsg::DescriptorBuffer |
|
osg::Light, osg::LightSource |
vsg::Light, vsg::AmbientLight, vsg::DirectionalLight, vsg;:PointLight, vsg::SpotLight |
Text
| OSG | VSG | Notes |
|---|---|---|
osgText::Font |
vsg::Font |
|
osgText::Text |
vsg::Text |
|
osgText::Text3D |
No VSG equivalent | |
vsg::TextGroup |
No OSG equivalent for efficient rendering of large number of labels |
IO
| OSG | VSG | Notes |
|---|---|---|
osgDB::readObjectFile(..) |
vsg::read(..) |
|
osgDB::readNodeFile(..) |
vsg::read_cast<vsg::Node>(..) |
|
osgDB::readImageFile(..) |
vsg::read_cast<vsg::Data>(..) |
|
osgDB::writeObjectFile(..) |
vsg::write(..) |
|
osgDB::writeNodeFile(..) |
vsg::write(..) |
|
osgDB::writeImageFile(..) |
vsg::write(..) |
|
osgDB::Options |
vsg::Options |
|
osgDB::FileCache |
vsg::Options::fileCache |
|
osgDB::ObjectCache |
vsg::SharedObjects |
|
osgDB::ReaderWriter |
vsg::ReaderWriter |
|
osgDB::Registry |
vsg::ObjectFactory |
|
std::string & UTF8 |
vsg::Path |
OSG must be compiled with OSG_USE_UTF8_FILENAME, vsg::Path works like std::filesystem::path |
osgDB::DatabasePager |
vsg::DatabasePager |
Application
| OSG | VSG | Notes |
|---|---|---|
osg::Camera |
vsg::Camera |
|
osgViewer::View |
vsg::View |
|
osgViewer::Viewer |
vsg::Viewer |
|
osgViewer::CompositeViewer |
vsg::Viewer |
|
osgGA::TrackballManipulator |
vsg::Trackball |
|
vsg::CommandGraph |
No OSG equivalent | |
vsg::RenderGraph |
No OSG equivalent | |
vsg::RecordAndSubmitTask |
No OSG equivalent | |
vsg::ExecuteCommands |
No OSG equivalent |
Threading
| OSG | VSG | Notes |
|---|---|---|
OpenThreads::Thread |
std::thread | |
OpenThreads::Mutex |
std::mutex | |
OpenThreads::ScopedLock |
std::lock_guard | |
OpenThreads::Atomic |
std::atomic | |
OpenThreads::Condition |
std::condition_variable | |
OpenThreads::Barrier |
vsg::Barrier |
|
OpenThreads::Block |
vsg::Latch |
|
OpenThreads::Affinity |
vsg::Affinity |
|
osg::OperationThread |
vsg::OperationThread |
|
osg::OperationThread |
vsg::OperationQueue |
|
osg::Operation |
vsg::Operation |
|
vsg::ActivityStatus |
No OSG equivalent, used to cooperatively release barriers & blocks. | |
vsg::FrameBlock |
No direct OSG equivalent, loosely OpenThreads::Block. |
| Prev : Ray Tracing | Next: Next Chapter : Application |