FreeBASIC OpenGL 3D Texture Test

Finally got 3d Texturing working in OpenGL under FreeBASIC. Loads up 8 256x256 bitmaps, smashes them together into a 256x256x8 buffer, and uses that to create a 3d texture. In this demo the texture coordinates are roughly equal to the world coordinates (the z-world coordinates are doubled for emphasis) and the R-values are clamped to [0,1], while S and T values are allowed to wrap. This is done so that extreme z-values don’t end up blending the ice and the lava textures. Since the GPU will aut
Back to Top