# Tag Info

### Get vector length with GLM

Sorry folks for posting such a trivial issue! The issue is solved. I was using the wrong function. Here goes the correct one: ...
• 1,029

### Multiple viewports with modern OpenGL?

If you are writing your own Vertex/Fragment Shader there is another additional possibility to do this. It is much more complicated but might be useful for you and/or others. Additionally it speeds up ...
• 323
Accepted

### Multiple viewports with modern OpenGL?

Rendering to different viewports (parts) of the same screen can be done as follows: For example splitting screen into four parts and rendering the same scene four times to each corner with different ...
• 2,037

### Multiple viewports with modern OpenGL?

This is a copy of @narthex's answer, except with only the viewports since that is all you need. I'm not sure why the frame buffer / blend stuff is included in his answer. ...
• 333
Accepted

### Ray-tracing the Cornell Box results in really inconsistent image

Two symptoms There appear to be two problems with the image. The background is showing through along the line between adjacent triangles. The colour displayed is not always from the closest ...
• 5,882
Accepted

### Three quaternions interpolation with barycentric coordinates

Defining the problem The weighted arithmetic mean $\mu$, of a set of vectors, minimizes squared L2 norm of the error ($v_i$) to all elements of the set.  \begin{split} v_i &= \...
Accepted

It seems to me, to be that your different positions and normals are not in the same space. Having them in the same space is important because else it might think the normal is pointing left while it ...
• 1,575
Accepted

### Am I passing the correct matrices for my shader? openGL/C++

I wasn't placing the lightposition into view space before passing it in. vec4 LightPosition_view=view*LightPosition; //put lp into view space with the rest When ...
• 203

### understanding glm::perspective vs glm::ortho

I don't understand why, if I make the first argument to glm::lookAt be glm::vec3(0.0f, 0.0f, 2.0f), I see nothing. It's because of the up vector. If you think about the look-at operation, you specify ...
• 6,450