OpenGL 3D Game Tutorial 7: Matrices & Uniform Variables

preview_player
Показать описание
LWJGL tutorial series on how to create a 3D Java game with OpenGL!

This week we learn about uniform variables and matrices.

Simple matrix maths:

Euler rotations to matrix conversion:

More matrices:

End of video music- Kai Engel, "Waking Stars":

Рекомендации по теме
Комментарии
Автор

Ha that pun at the end... Loving these tutorials so far!

marcelvanworkum
Автор

Wow - so far these tutorials are REALLY good.  It's a lot to keep in your head at one time but your mad MSPaint skills help alot.  Can't wait to see more!

badwlf
Автор

I usually prefer written tutorials, but since i self-taught myself both programming as well as OpenGL i like watching this to eleminate bad practices i developed over time. Great pace you keep up during your tutorials.

Gordin
Автор

Your tutorials make so much sense. It's amazing.

skittles
Автор

Currently having computer graphics at university. This is perfect addition to the heavy theory. Thanks a lot!

MOLLASUND
Автор

5:44 Vector3f cant be resolved to a type
and Matrix3f
[EDIT] I didnt add lwjgl_util to the referenced libs

NubeBuster
Автор

i started another tutorial and went directly to this episode, you explain your code correctly, it's very nice !

ajen
Автор

16:32I needed 6 seconds to understand the joke.

ThunderWorkStudioAMGE
Автор

16:35 Ive never laughed so hard during a coding tutorial!

porfiliovmj
Автор

At 0:23, why the bindAttributes(); must be called before the link program??

hsunteik
Автор

Your are really pro. Keep doing these videos. I'm a happy learner.

PixelizeSoftwares
Автор

If you're using LWJGL 3 with JOML and your quad won't render after coding the transformation matrix, I find that flipping the matrix buffer in the "loadMatrix" method
in ShaderProgram seems to be causing the problem, and after removing that flip call the quad rendered perfectly. In fact, it seems like you don't even have to flip the buffer.

djlanav
Автор

Just a tip in case you didn't know: You can (on windows) hold control + shift + O to import all that can be found and (on mac) hold command + shift + O to do the same thing.

HappyKillerO
Автор

7:35 My LWJGL requires I use matrix.set() instead of matrix.store() and also requires glUniformMatrix4fv() instead of glUniformMatrix4(). I am using LWJGL 3.2.0 build 12
and GLFW 3.3.0.

RobertMOdell
Автор

Matrices  are one of my favorite things in Maths :D I remember messing around after learning how to get the inverse of 3x3 and ended up making a program for the inverse of nxn :P

Pokabbie
Автор

these tutorials are pure gold. thank you

wootwoot
Автор

haha a Thin Matrix?!!! does that mean that a square matrix is a fat matrix?!!!

that was funny :-) 

codemagnet
Автор

5:13 : : Vector3f couldn't import, and it turns out I needed a *lwjgl-utils.jar* to import it. I'm saying this, because the *lwjgl-utils.jar* is packaged with LWJGL2. Idk if this utils jar contains any information already within LWJGL3 (as I've been following the tutorial using LWJGL3), or if I should be looking for an alternative version of the Vector3f.

roninyasuo
Автор

OMG! This makes so much sense now Thanks so much :)

danibonilla
Автор

I remember when I made a 2D game engine, I used my own code to do the transformations. It used a float array with 9 indices (I think) each corrosponding to:
X Offset, Y Offset, Rotation, Rotation Origin X, Rotation Origin Y, Scale X, Scale Y, FlipX, FlipY
and it worked perfectly. But matrices are so much simpler I'm kinda mad that that matrix library didnt work there.
So yeah, its an understatement to say "Matrices make things easier"


Also yeah, taking Geometry definitely helped me here. I see that it wasn't a complete waste of time.

NoahtheEpicGuy