Basic example of getting data from the shader on to the CPU using glGetBufferSubData

Hey, I’ve been trying to find any comprehensive information on getting data from a shader (i.e, pass in uniform “test1”, change its colour, then send its new value back to the CPU) using either SSBOs, subufferdata, or anything like that, and while I’ve been able to get bits and pieces, I haven’t really got any of it to work (and then got confused, mixed different buffer types etc) after a few days, so I thought I’d ask here. What would a basic constructor, render loop and VS/FX shader for simply passing information back and forth look like? Thanks!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.