Tag Info

Hot answers tagged

8

Your interviewer was talking, with his own words, about bindless API. nVidia made nice presentations recently about all that, which they call direct state access (1, 2). This does not replace VBOs. EDIT: Actually, let's consider Trevor Powell's suggestion: This seems like some people could definitely decide to drop VBOs, in favor of attribute-less ...


7

You need to translate them before scaling them. Otherwise, the entire coordinate space is scaled. For example: // Scale the coordinate space by two. Matrix4f.scale( 2, 2, 2 ); // Now because of the scale this is the same as translating by 2 in every axis. Matrix4f.translate( 1, 1, 1 ); // Actually means Matrix4f.translate( 2, 2, 2 ) here. When you ...


3

Assuming that location is the uniform location you've already retrieved from the shader, and vec is your vector, then in C++11 you can do: glUniform3fv(location, vec.size(), reinterpret_cast<GLfloat *>(vec.data())); Prior to C++11: glUniform3fv(location, vec.size(), reinterpret_cast<GLfloat *>(&vec[0])); The "old" method will work in ...


1

You're not missing anything. The normal matrix exists in case the upper-left 3x3 of your regular model-view transformation is unsuitable for transforming normals (that is, contains non-uniform scale or other craziness). If you know the upper-left 3x3 is always suitable for use in the transformation of normals, there's no reason to bother with a separate ...


1

You don't specify what rendering method you want to use. Standard rasterisation of a 3D mesh? Or do you have a volume representation of the model and your renderer uses that directly? If you render a volume, check this: http://http.developer.nvidia.com/GPUGems/gpugems_ch39.html especially 39.2. The effect in the picture you provide is mainly subsurface ...


1

After your glClear call you can render a full-screen quad with your texture (loaded like you would any other). You may want to disable writing to the depth buffer to avoid odd rendering issues.



Only top voted, non community-wiki answers of a minimum length are eligible