vsg-dev / osg2vsg

Adapter library for converting OpenSceneGraph Images and 3D models to VulkanSceneGraph
MIT License
43 stars 15 forks source link

Simplified glinterop example #51

Closed tomhog closed 5 years ago

tomhog commented 5 years ago

By default it loads textures/osglogo.png from the VSG_FILE_PATH. It needs to be a png with transparency. The image will be loaded as an osg image and set as the image on the shareTexture. That texture is shareing memory with the shareColorimage and so it gets displayed in the vsg window using it in a descriptor.

The other mode is activated with option --osgrtt it instead creates and osg scene that renders into an osg texture a postDrawCallback is then used to copy the texture into the sharedTexture which same as above is linked to the vsg image and so displayed in the vsg window