From: Johan S. <jo...@us...> - 2007-01-19 13:18:53
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22330/src Modified Files: OffScreenBuffer.cpp Program.cpp ShallowsExt.cpp Log Message: Updated CMakeLists so it cleanly compiles on VS2005. Removed bogus regex dependency in Program.cpp Remover signed/unsigned warnings in OffScreenBuffer Removed use of sprintf(!) in ShallowsExt Index: ShallowsExt.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/ShallowsExt.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ShallowsExt.cpp 6 Dec 2005 14:00:35 -0000 1.11 --- ShallowsExt.cpp 19 Jan 2007 13:18:48 -0000 1.12 *************** *** 31,36 **** ! ! #include <string.h> #include <stdio.h> #ifndef _WIN32 --- 31,36 ---- ! #include <iostream> ! #include <string> #include <stdio.h> #ifndef _WIN32 *************** *** 972,979 **** } } ! ! char buff[100]; ! sprintf(buff, "Necessary extensions were not supported: %s", extension); ! printf(buff); //MessageBox(NULL, buff, "ERROR", MB_OK | MB_ICONERROR); --- 972,978 ---- } } ! ! std::cerr << "Necessary extensions were not supported: " << extension << std::endl; ! //MessageBox(NULL, buff, "ERROR", MB_OK | MB_ICONERROR); *************** *** 986,992 **** if(!generateShaderExtension(extension)) { ! char buff[100]; ! sprintf(buff, "Failed to initialize: %s", extension); ! printf(buff); return false; } --- 985,989 ---- if(!generateShaderExtension(extension)) { ! std::cerr << "Failed to initialize: " << extension << std::endl; return false; } Index: OffScreenBuffer.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/OffScreenBuffer.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** OffScreenBuffer.cpp 14 Dec 2005 17:23:09 -0000 1.23 --- OffScreenBuffer.cpp 19 Jan 2007 13:18:48 -0000 1.24 *************** *** 481,489 **** off_buff->getTargets(); ! for (int i=0; i<numBuffs; i++) { decided[i]=-1; } ! for (int i=num_att_points-1; i>=0; i--) { if (targets[i].expired()) --- 481,489 ---- off_buff->getTargets(); ! for (unsigned int i=0; i<numBuffs; i++) { decided[i]=-1; } ! for (unsigned int i=num_att_points-1; i>=0; i--) { if (targets[i].expired()) *************** *** 492,496 **** used[n_used++]=i; } ! for (int i=0; i<numBuffs; i++) // Check if already bound { boost::shared_ptr<OffScreenRenderTarget> off_rt; --- 492,496 ---- used[n_used++]=i; } ! for (unsigned int i=0; i<numBuffs; i++) // Check if already bound { boost::shared_ptr<OffScreenRenderTarget> off_rt; *************** *** 502,506 **** shallows_invalid_argument("Attempt to attach OnScreenRenderTarget to OffScreenBuffer"); } ! for (int j=0; j<n_used; j++) { if (targets[used[j]].lock()==off_rt) --- 502,506 ---- shallows_invalid_argument("Attempt to attach OnScreenRenderTarget to OffScreenBuffer"); } ! for (unsigned int j=0; j<n_used; j++) { if (targets[used[j]].lock()==off_rt) *************** *** 512,516 **** } } ! for (int i=0; i<numBuffs; i++) // pick unused if possible { if (decided[i]>=0) --- 512,516 ---- } } ! for (unsigned int i=0; i<numBuffs; i++) // pick unused if possible { if (decided[i]>=0) *************** *** 525,529 **** } ! for (int i=0; i<numBuffs; i++) // pick unused if possible { enums[i]=GL_COLOR_ATTACHMENT0_EXT+decided[i]; --- 525,529 ---- } ! for (unsigned int i=0; i<numBuffs; i++) // pick unused if possible { enums[i]=GL_COLOR_ATTACHMENT0_EXT+decided[i]; Index: Program.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/Program.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Program.cpp 4 Dec 2006 10:25:29 -0000 1.29 --- Program.cpp 19 Jan 2007 13:18:48 -0000 1.30 *************** *** 31,35 **** #include "shallows/FrameBuffer.hpp" #include "shallows/shallowsexcept.hpp" - #include "boost/regex.hpp" #include "shallows/RenderTarget.hpp" #include "shallows/internal/GLIncludes.hpp" --- 31,34 ---- *************** *** 96,100 **** void Program::findSourcePositions( std::string programText, int& posVS, int& posGS, int& posFS ) { ! struct notFoundToInf { int operator()( int i ) { if ( i == -1 ) --- 95,99 ---- void Program::findSourcePositions( std::string programText, int& posVS, int& posGS, int& posFS ) { ! /*struct notFoundToInf { int operator()( int i ) { if ( i == -1 ) *************** *** 103,107 **** return i; } ! } f; posVS = static_cast<int>(programText.find("[Vertex shader]")); posGS = static_cast<int>(programText.find("[Geometry shader]")); --- 102,106 ---- return i; } ! } f;*/ posVS = static_cast<int>(programText.find("[Vertex shader]")); posGS = static_cast<int>(programText.find("[Geometry shader]")); |