welcome to the gyt engine checkup that nobody cares about i don't care about nobody caring it's nice having a sort of blog
got textures working. colors or anything else like colors in my engine will be handled with textures, as shown above. the downside about the texture stuff i've done so far though is that you can only have one texture image file per model, so you can't have something like blockland where there's like 50 different image files you use for various colors. there probably is a fancy way of doing this by stapling together images and offsetting particular UV values to match different areas of the stapled image, but i'm not going to do that now because what i have is good enough. hint for anyone who is working on this opengl stuff themselves: setting the
normalized parameter in the function glVertexAttribPointer() to true when you load up the textures seems to reduce the stuffty looking blending affect you get when your face is at the edge of two colors that looks something like this:
https://puu.sh/xOGlJ/908c6aae41.pngthings to do after this point:
- make it so the .obj reader detects which image file to use for the texture
- for .obj's without any texture have some sort of blank texture that they pull from so i can continue playing around with shaders/debugging without having to worry about textures
- preload the textures instead of loading them in the
init method so you can do all the loading at the start of the program instead of loading up the textures as you create the objects in-engine
for the curious and ones who are unaware of my previous posts this is not going to be another blockland 2 but instead some sort of quake clone. my engine is progressing at a decent pace i think for someone who knew jack or stuff about opengl only 2 weeks ago
also if you're looking to do collision in your games like i was and thinking to yourself hell i'll make a collision detection thing by implementing homebrew raycasts don't do it because its massively loving complicated involving loads of math you were never taught or never heard about so just go the pusillanimous individual way out and use the bullet physics library to make your life about 50000000000x more easy. plus you could code in physics objects into your game and that never fails to kick ass.