Still lost on how to start a little bit.

Hello, I am taking interest in developing using openGL and may take this thing as a career later on who knows. I am currently using the openTK library and started with learnopengl tutorials, I am doing fine translating from cpp to c#, but the thing is I still don’t get the hang of transformations/rotation and stuff like these, so I started to look for some linear algebra playlists on youtube and got some university book as-well but I am kinda lost on when to start reading openGL tutorials and stuff, I really don’t like being interrupted with some math that I don’t know then go back and forth and lose ties with the code in order to understand some math and then go back to coding…etc so I decided to contribute a day or 2 for pure mathematics in order to be formally introduced to this particular math genre. So I decided to watch khan academy’s playlist for linear algebra, then maybe watch some computer graphics lectures on youtube also to somehow get the hang of stuff…I am a civil Engineer so I have used linear algebra indirectly in my forces/statics and also took some planar geometry course in college as-well… So any advice/tips on how to take openGL seriously enough for me?

[QUOTE=WorldDj;1290466]the thing is I still don’t get the hang of transformations/rotation and stuff like these
, so I started to look for some linear algebra playlists on youtube and got some university book as-well but I am kinda lost
…So I decided to watch khan academy’s playlist for linear algebra[/QUOTE]

Yeah, that’s a big detour that’s not going to pay much in terms of dividends w.r.t. learning the minimal subset of matrix math you need to do 3D transforms in OpenGL. I recall about 4 classes out of a full semester worth of general Linear Algebra was useful to me in computer graphics.

What you need is to read a 3D math primer that’s focused on OpenGL. Most importantly, you need a clear mental model of the “big picture” to lock in what you’re doing, what the pieces are, and how to combine them.

I haven’t read it in a while, but I’d recommend reading the Viewing chapter in The OpenGL Programming Guide. It should give you that solid conceptual view of what you’re doing (just transforming vectors between coordinate frames – that’s it!) and how to apply matrices to do it. Since you’ve already taken a linear algebra course, the mechanics of transforming vectors using matrices will be a no-brainer, so you can just focus on the big picture (what the standard coordinate frames are, the transforms that take you from one space to another, etc.) With your level of math, I don’t expect it’ll take you long to have this part down cold.

Yeah, for the huge majority of matrix operations you’ll be doing, you will find that in 3D graphics there are libraries for it. You really just need to know what a matrix is, what it’s used for, that matrix multiplication is not commutative, and the difference between multiplying a matrix by a vector and multiplying a vector by a matrix. Everything else, even in modern APIs which require you to do your own matrix transforms rather than using built-ins, you can just grab a downloaded library rather than rolling your own. Big dirty secret: the Direct3D math libraries will work with OpenGL, and libraries like glm will work with Direct3D - that’s seriously how independent of the API this stuff is.

Rather than sweating the details of linear algebra, you’ll get a better start by going in at the slightly-deeper-end and doing the classic tutorial exercises of drawing a triangle, putting a colour on it, putting a different colour at each vertex, putting a texture on it, multiplying the texture by the colour, then making it spin. That’s actually a huge part of the foundation from which you can shoot for any target you want.

I can echo the advice of mgagain. Although the math behind it is very important and I would definitely recommend learning it for doing “proper work” with OpenGL, I think that you can get very far with only a superficial understanding of the math. More importantly, I believe that just jumping into the code and working with OpenGL a little will help you understand the math more easily. You will be able to “test things out” and see the effects of changing numbers, multiplication orders, etc on the fly.

But of course everybody learns differently. Some people prefer to start with the practical stuff in order to understand the uses of the theory behind it. Other people may prefer to first understand the theory before trying to do the practical work.

A little update, I revisited some linear algebra stuff actually, and is now watching some university lecs I have covered translations, scaling, rotation around point in 2D/ axis in 3D and an arbitrary axis as well and the camera perspectives/perspective space of R^4…Nerdy me :smiley:

Now I may start from the learnopengl tutorials but translate them into my C# world (I program mainly in .NET)