Lots of code today!
I started by making a “.obj” loader class to load models made with blender.
Then i created a Model class to contain all the vertices info about a model, so that OpenGL can easily draw it.
So i managed to display a simple cube, but the texture of course was missing, so i created a TextureLoader class that can loads pngs thanks to PicoPNG, a third-party open-source library.
Then i modified the shaders to accept the texture as a parameter, and to use it during the rendering.
The result is a textured cube, but there are a few things missing:
1)The cube is stretched like the screen, because i haven’t ported it to camera coordinates yet
2)The cube is flat, because i didn’t put it in perspecive yet
These will be the next two things i’m gonna do.

Nessun commento:
Posta un commento