From c3e5da64f380e10c0d1e98ee9f32b52f1590f316 Mon Sep 17 00:00:00 2001 From: Fatbag Date: Sun, 5 Feb 2012 22:00:17 -0600 Subject: [PATCH] Corrected 2 hopefully last behaviors in libvitaboy Renderer: * The texture now blends the way it should (switched GL_CLAMP_TO_EDGE to GL_REPEAT) * The Shannon texture showed the face was being mirrored --- Libraries/libvitaboy/Renderer.cpp | 4 ++-- Libraries/libvitaboy/mesh.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/libvitaboy/Renderer.cpp b/Libraries/libvitaboy/Renderer.cpp index f0cebfb..8dad4f7 100644 --- a/Libraries/libvitaboy/Renderer.cpp +++ b/Libraries/libvitaboy/Renderer.cpp @@ -44,8 +44,8 @@ int LoadGLTextures() // Load Bitmaps And Convert To Textures glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); return true; // Return Success } diff --git a/Libraries/libvitaboy/mesh.cpp b/Libraries/libvitaboy/mesh.cpp index b6b6920..a077c02 100644 --- a/Libraries/libvitaboy/mesh.cpp +++ b/Libraries/libvitaboy/mesh.cpp @@ -36,7 +36,7 @@ void ReadMesh(Mesh_t& Mesh){ printf("TextureVertexCount: %u\n", Mesh.TextureVertexCount); Mesh.TextureVertexData = (TextureVertex_t*) malloc(Mesh.TextureVertexCount * sizeof(TextureVertex_t)); for(unsigned i=0; i