OpenGL Instancing

preview_player
Показать описание
Shows OpenGL instanced rendering. This instanced example drawing tutorial renders the same cube geometry using two different uniform matrix shader arguments.
Рекомендации по теме
Комментарии
Автор

Valuable lesson... Need to go recode with this in mind. Still, it does seem that you're trading speed for memory because you're adding all these matrix multiplications to the paintgl() when you could be passing them as uniforms and letting the shader multiply them.

ryklin
Автор

Wow, this is the essence of instantiation.

peki_ooooooo
Автор

I thought instancing meant one draw for everything.

ORagnar
Автор

Really cool! Better than learning from books.

LesterShipMirOleg
Автор

Not sure if my hardware is the cause or if glm just has updated since this video (probably the later), but I had to use glm::radians(degrees) for both fovy parameter in glm::perspective and for the angle in glm::rotate to get the same results. I imagine these parameters in 2013 were using degrees but they now use radians.

JasonEwton
Автор

Hey Jamie, strangley enough i have both cubes spawning and such but when i have the second cube on a rotation of 126* one of the cube's faces seem to disappear, i replaced the angle with 26* and now it works fine? haha

gnagtats
Автор

hmm odd why is my left cube getting chopped off. I am using same transformations as the video. seems like its too close to the camera even though same perspective projection is being used.

mindstreamx
Автор

So does the computer multiply 'projectionMatrix * translationMatrix * rotationMatrix' from right to left? Because if you did the math from left to right then that would mean you take the projection matrix first and multiply it by translation matrix and then finally multiply that output by rotation matrix which, since the rotation matrix is being multiplied last, would give you undesirable results.

bgzdevtips
Автор

This appear to not be working in 2018, all I get is black window :- (

DariuszMakowski
Автор

1:47:
if the GL-wall is open then its useless.

dariusduesentrieb