From: dyken <dy...@us...> - 2006-09-22 11:54:40
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv4600/src Modified Files: Texture2D.cpp Log Message: parameter to glTexParam didn't depend on target type (assumed always GL_TEXTURE_2D), fixed. Index: Texture2D.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/Texture2D.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Texture2D.cpp 26 Sep 2005 12:03:59 -0000 1.10 --- Texture2D.cpp 22 Sep 2006 11:54:34 -0000 1.11 *************** *** 47,63 **** height_ = height; ! if (rectanguar_==false) ! { ! glBindTexture(GL_TEXTURE_2D, textureID_); ! glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, width, height, ! 0, format, (GLenum) type, pixels); ! } else ! { ! glBindTexture(GL_TEXTURE_RECTANGLE_ARB, textureID_); - glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, internalFormat, width, height, - 0, format, (GLenum) type, pixels); - } try { --- 47,55 ---- height_ = height; ! GLenum target = rectanguar_ ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D; ! glBindTexture( target, textureID_ ); ! glTexImage2D( target, 0, internalFormat, width, height, 0, format, (GLenum)type, pixels ); try { *************** *** 71,80 **** throw; } ! glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); ! glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); ! glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ! glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ! ! } --- 63,70 ---- throw; } ! glTexParameteri( target, GL_TEXTURE_WRAP_S, GL_CLAMP); ! glTexParameteri( target, GL_TEXTURE_WRAP_T, GL_CLAMP); ! glTexParameteri( target, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ! glTexParameteri( target, GL_TEXTURE_MAG_FILTER, GL_NEAREST); } |