#some opengl struggles of mine
31 messages ยท Page 1 of 1 (latest)
O nice
super interesting!
wow!
Lol
Im trying to make a class or something to set vertices in a location and set their size easier
But im not sure how to implement that
Might use vector addition and subtraction to set coords
How do you set coordinates for each block
Thats what i need
Lets say i have a vertices array but i want to automatically set their coordinates to somewhere else
Would i use vector translation to change the position?
What if i put vertices in a place that, the center becomes 0,0,0
Then translate the model mat4 by the new location i want
Would that work for setting shape location
@errant raft has reached level 7. GG!
I first thought of making every vertex between 1 and 2 then multiplying in a for loop
Then remembered that the model mat4 exists
The model matrix translates and rotates around the shape center right ?
Well im just going to make the vertices around 0,0,0
And translate the model matrix
Its about position lol
Im trying to make classes for everything to make it easier
Textures, shaders, VBO,VAO,EBO, etc
Its impossible to write everything manually everytime
To set VBO,EBO, and VAO i just use 3 lines making classes
The class constructors generate, bind and put data
There is a bind, unbind and delete_ function too
Sadly delete is a C++ keyword
So i need a _ after it
Delete for openGL not the class
I actually didnt know there is a destructor thanks