When should I use STD140 in OpenGL?
问题 When do I use the STD140 for uniform blocks in OpenGL? Although I am not a 100% sure, I believe there is an alternative to it which can achieve the same thing, called "Shared". Is it just preference for the coder? Or are there reasons to use one over the other? 回答1: Uniform buffer objects are described in http://www.opengl.org/registry/specs/ARB/uniform_buffer_object.txt The data storage for a uniform block can be declared to use one of three layouts in memory: packed , shared , or std140 .