Advertisement Jump to content
Sign in to follow this  

OpenGL How to use SSBO to send scene data?

This topic is 700 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, 


I'm a long time visitor but I'm finally in need to post here. :)


So, I just started to learn OpenGL, with the idea to make a path tracer with Compute Shaders, and then maybe use it as a secondary renderer for my engine (alongside the current DirectX 11 one).


I've already made a simple cornell box with spheres, based on the SmallPT code, but now, I want to go to the next level: display actual meshes, and use an acceleration structure.


From what I've read a bit everywhere on the web, the best (if not the only) way to transfer big amounts of data to the shader in OpenGL is to use SSBO. However, I can't really find proper explanations on

how to use it.


So, my question is: how do I effectively use SSBO to send a big array of triangles to my compute shader ?




Here is the source of my project:


Compute shader is in file compute.comp and most of the OpenGL code is in raytracer.cpp, other classes are from the base project (a basic CPU path tracer that I made before that).

Feel free to suggest improvements, I'm always learning new things :)



PS: Now that I've made my first post, I'd like to thank MVP and L.Spiro for all those posts that helped me in the past  ^_^



Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!