I personally prefer to use the unsigned char * BmpToTexture( char *, int *, int * ) from OSU’s graphic design class. Another way is to write down the function by ourselves. There is some open source code to do that users can download the. ![]() Users need to write a function to load the image into the program. Users should save the image as a 24-bit format and put it in the current working directory to load the image into the program. The Bitmap file can be converted from other types of images such as PNG, JPEG, and GIF. Each value of the texture 2D array is called texel. OpenGL supports bitmap texture, which is a 2D array of unsigned char Texture. Hopefully, users can have a better understanding of the purpose of each step in the texture mapping process. This blog introduces beginners with basic concepts of texture mapping. Texture can also be distorted for a visual effect. Texture mapping is fun and beneficial but it can be challenging for beginners. Texture mapping is a process of stretching a texture onto a 3D object the applied texture will follow the 3D object as it transforms.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |