The Idea
Keep it Easy :)
Okay so the next tutorial in the series went on to talk about textures and how they are applied to polygons. This also introduced a new library for importing the texture data from a file into an OpenGL Texture2D. The library I have decided to use is called SOIL( Simple OpenGL Image Library ). The first part went through how textures relate to OpenGL and the graphics pipeline, which meant starting off with our own predefined values which could then be used for applying as a texture. This is shown below, I created an array of values to represent a black and white texture. After doing this the tutorial then went on to explain how to use the SOIL library. This was fairly simple and once it was implemented allowed for the application of any texture to my rectangle. Below you can see the original rectangle with a funky texture applied to it. Now that I am at this stage the next real step is into the maths part of openGL. I have been through the maths of 3D co-ordinate systems before and instead I am going to jump straight in with a new project that I'm hoping to implement. The IdeaI have decided to integrate a 3rd party model loader into my OpenGL project, which will more than likely be Assimp. This allows for the loading of tons of different file types where as if I implemented my own it would be two or three at most. There is a draw back to this however, as it has such variety then the loading of the models will be fairly slow. Instead of doing this I am hoping to create a converter into binary files that way the Assimp library can be used to get all the data i need for the various types and then I can output this information into a binary file. This means I can use these binary files into my own programs and the load time will be minuscule but will allow for me to use models of different types. This will be a lot of work and I have a lot of other ideas floating round at the moment so I will see how far I get with it. I'm hoping to get to the point where I havw a base project from which to do any sort of OpenGL work from.
Keep it Easy :)
0 Comments
Leave a Reply. |
Archives
May 2020
Categories
All
|