You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(48) |
Sep
(181) |
Oct
(147) |
Nov
(12) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(2) |
Feb
(4) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(9) |
Aug
(80) |
Sep
(7) |
Oct
|
Nov
|
Dec
(4) |
2007 |
Jan
(5) |
Feb
(4) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Johan S. <jo...@us...> - 2007-03-13 13:58:42
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv724/src Modified Files: GLProgram.cpp Log Message: Fix exception error message. Index: GLProgram.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/GLProgram.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** GLProgram.cpp 20 Feb 2007 10:01:34 -0000 1.35 --- GLProgram.cpp 13 Mar 2007 13:58:33 -0000 1.36 *************** *** 529,535 **** const GLint location = glGetAttribLocation( programHandle_, name ); if ( location == -1 ) { ! std::string s = "Varying variable "; s += name; ! s += " was not found or illegal.\n(Hint starting with gl_ is not allowed.)"; throw std::invalid_argument( s ); } --- 529,535 ---- const GLint location = glGetAttribLocation( programHandle_, name ); if ( location == -1 ) { ! std::string s = "Attribute variable "; s += name; ! s += " was not found or illegal.\n(It might have been optimized away.)"; throw std::invalid_argument( s ); } |
From: Johan S. <jo...@us...> - 2007-03-13 13:58:33
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv691/src Modified Files: textureCreation.cpp Log Message: Fix one channel format Index: textureCreation.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/textureCreation.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** textureCreation.cpp 11 Jul 2006 07:59:16 -0000 1.14 --- textureCreation.cpp 13 Mar 2007 13:58:18 -0000 1.15 *************** *** 51,58 **** if (components == 1) { ! internalformat = GL_FLOAT_R32_NV; ! format = GL_RED; ! // internalformat=GL_ALPHA32F_ARB; ! //format = GL_ALPHA; } else if (components == 2) --- 51,58 ---- if (components == 1) { ! // internalformat = GL_FLOAT_R32_NV; ! // format = GL_RED; ! internalformat=GL_ALPHA32F_ARB; ! format = GL_ALPHA; } else if (components == 2) |
From: Johan S. <jo...@us...> - 2007-03-13 13:58:02
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32743/src Modified Files: RenderBuffer.cpp Log Message: Added getBufId(). Index: RenderBuffer.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/RenderBuffer.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RenderBuffer.cpp 25 Nov 2005 11:18:16 -0000 1.4 --- RenderBuffer.cpp 13 Mar 2007 13:57:42 -0000 1.5 *************** *** 111,114 **** --- 111,119 ---- } + unsigned int RenderBuffer::getBufId() const + { + return bufId_; + } + void RenderBuffer::attachToCurrentFrameBuffer(int colAttachment) { |
From: Johan S. <jo...@us...> - 2007-03-13 13:57:58
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32743/include/shallows Modified Files: RenderBuffer.hpp Log Message: Added getBufId(). Index: RenderBuffer.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/RenderBuffer.hpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** RenderBuffer.hpp 25 Nov 2005 11:18:15 -0000 1.8 --- RenderBuffer.hpp 13 Mar 2007 13:57:42 -0000 1.9 *************** *** 64,68 **** unsigned int getHeight() const; int getInternalFormat() const; ! protected: virtual void attachToCurrentFrameBuffer(int colAttachment); --- 64,68 ---- unsigned int getHeight() const; int getInternalFormat() const; ! unsigned int getBufId() const; protected: virtual void attachToCurrentFrameBuffer(int colAttachment); |
From: Johan S. <jo...@us...> - 2007-02-23 10:45:34
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv12583/include/shallows Added Files: shallowsfwd.hpp Log Message: Initital revision. --- NEW FILE: shallowsfwd.hpp --- #ifndef SHALLOWSFWD_HPP #define SHALLOWSFWD_HPP namespace shallows { class RenderTarget; class OffScreenRenderTarget; class RenderTexture2D; class RenderBuffer; class FrameBuffer; class OffScreenRenderTarget; class GLProgram; class OnScreenBuffer; class OnScreenRenderTarget; class Texture; class Texture1D; class Texture2D; class Texture3D; } #endif |
From: Jon H. <jon...@us...> - 2007-02-20 10:01:43
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv20233/shallows/src Modified Files: GLProgram.cpp Log Message: Allows the user to omit specifying framebuffer Index: GLProgram.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/GLProgram.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** GLProgram.cpp 4 Dec 2006 10:25:30 -0000 1.34 --- GLProgram.cpp 20 Feb 2007 10:01:34 -0000 1.35 *************** *** 218,222 **** glActiveTextureARB((GLenum) (GL_TEXTURE0_ARB)); CHECK_GL_DEBUG; ! frameBuffer_->validateCompleteness(); CHECK_GL_DEBUG; glUseProgram(programHandle_); --- 218,223 ---- glActiveTextureARB((GLenum) (GL_TEXTURE0_ARB)); CHECK_GL_DEBUG; ! if (frameBuffer_) ! frameBuffer_->validateCompleteness(); CHECK_GL_DEBUG; glUseProgram(programHandle_); |
From: Trond H. <tr...@us...> - 2007-02-19 10:15:53
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22799/src Modified Files: Program.cpp Log Message: Fixed min/max compilation error on windows Index: Program.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/Program.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** Program.cpp 19 Jan 2007 13:18:48 -0000 1.30 --- Program.cpp 19 Feb 2007 10:14:36 -0000 1.31 *************** *** 40,44 **** using namespace shallows::internal; ! namespace shallows { --- 40,47 ---- using namespace shallows::internal; ! #ifdef UNIX ! using std::min; ! using std::max; ! #endif namespace shallows { *************** *** 116,120 **** return std::string(); ! int end = std::min( posFS > posGS ? posFS : programText.length(), posVS > posGS ? posVS : programText.length() ); --- 119,123 ---- return std::string(); ! int end = min( posFS > posGS ? posFS : programText.length(), posVS > posGS ? posVS : programText.length() ); *************** *** 132,136 **** return std::string(); ! int end = std::min( posGS > posVS ? posGS : programText.length(), posFS > posVS ? posFS : programText.length() ); --- 135,139 ---- return std::string(); ! int end = min( posGS > posVS ? posGS : programText.length(), posFS > posVS ? posFS : programText.length() ); *************** *** 148,152 **** return std::string(); ! int end = std::min( posVS > posFS ? posVS : programText.length(), posGS > posFS ? posGS : programText.length() ); --- 151,155 ---- return std::string(); ! int end = min( posVS > posFS ? posVS : programText.length(), posGS > posFS ? posGS : programText.length() ); |
From: Trond H. <tr...@us...> - 2007-02-19 10:13:54
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22361/src Modified Files: OffScreenBuffer.cpp Log Message: An unsigned int was tested for negativity in an for statement. Index: OffScreenBuffer.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/OffScreenBuffer.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** OffScreenBuffer.cpp 19 Jan 2007 13:18:48 -0000 1.24 --- OffScreenBuffer.cpp 19 Feb 2007 10:13:48 -0000 1.25 *************** *** 426,430 **** if (colAttachable<0 || targets[colAttachable].lock()!=off_rt) { ! for (int i=targets.size()-1; i>=0; i--) { if (targets[i].expired()) --- 426,430 ---- if (colAttachable<0 || targets[colAttachable].lock()!=off_rt) { ! for (int i=int(targets.size()-1); i>=0; i--) { if (targets[i].expired()) *************** *** 464,468 **** { off_buff->activate(); ! const int num_att_points=off_buff->targets_.size(); int availible[16]; int used[16]; --- 464,468 ---- { off_buff->activate(); ! const int num_att_points=int(off_buff->targets_.size()); int availible[16]; int used[16]; *************** *** 485,489 **** decided[i]=-1; } ! for (unsigned int i=num_att_points-1; i>=0; i--) { if (targets[i].expired()) --- 485,489 ---- decided[i]=-1; } ! for (int i=num_att_points-1; i>=0; i--) { if (targets[i].expired()) |
From: Johan S. <jo...@us...> - 2007-01-19 13:25:53
|
Update of /cvsroot/shallows/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24872 Modified Files: CMakeLists.txt config.h.cmake Log Message: More COMPILING_SHALLOWS fixes for Win32 Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/shallows/shallows/CMakeLists.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CMakeLists.txt 19 Jan 2007 13:18:46 -0000 1.4 --- CMakeLists.txt 19 Jan 2007 13:25:49 -0000 1.5 *************** *** 31,36 **** if(WIN32) ! set(DllExport "__declspec( dllexport )" ) ! add_definitions(-DNOMINMAX) endif(WIN32) --- 31,36 ---- if(WIN32) ! #set(DllExport "__declspec( dllexport )" ) ! add_definitions(-DNOMINMAX -DCOMPILING_SHALLOWS) endif(WIN32) Index: config.h.cmake =================================================================== RCS file: /cvsroot/shallows/shallows/config.h.cmake,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.h.cmake 15 Sep 2006 09:04:08 -0000 1.2 --- config.h.cmake 19 Jan 2007 13:25:49 -0000 1.3 *************** *** 4,7 **** #cmakedefine HAVE_CGGL 1 ! #cmakedefine DllExport --- 4,15 ---- #cmakedefine HAVE_CGGL 1 ! #ifdef _WIN32 ! #ifdef COMPILING_SHALLOWS ! #define DllExport __declspec( dllexport ) ! #else ! #define DllExport __declspec( dllimport ) ! #endif ! #else ! #define DllExport ! #endif |
From: Johan S. <jo...@us...> - 2007-01-19 13:18:57
|
Update of /cvsroot/shallows/shallows/include/shallows/internal In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22330/include/shallows/internal Modified Files: Shader.hpp 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: Shader.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/internal/Shader.hpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Shader.hpp 4 Dec 2006 10:25:10 -0000 1.6 --- Shader.hpp 19 Jan 2007 13:18:47 -0000 1.7 *************** *** 1,62 **** ! /********************************************************************** ! * ! * File: ! * ! * Created: ! * ! * Version: $Id$ ! * ! * Authors: Trond R. Hagen <tr...@si...>, ! * Jon Mikkelsen Hjelmervik <ja...@si...>, ! * Johan S. Seland <jo...@if...> ! * ! * This file is part of the Shallows library. ! * Copyright (C) 2005 by SINTEF. All rights reserved. ! * ! * This library is free software; you can redistribute it and/or ! * modify it under the terms of the GNU General Public License ! * ("GPL") version 2 as published by the Free Software Foundation. ! * See the file LICENSE.GPL at the root directory of this source ! * distribution for additional information about the GNU GPL. ! * ! * For using Shallows with software that can not be combined with the ! * GNU GPL, please contact SINTEF for aquiring a commercial license ! * and support. ! * ! * SINTEF, Pb 124 Blindern, N-0314 Oslo, Norway ! * http://www.sintef.no ! *********************************************************************/ ! ! #ifndef _SHADER_HPP_ ! #define _SHADER_HPP_ ! #include "shallows/config.h" ! ! #include <string> ! namespace shallows { ! namespace internal { ! ! class DllExport Shader ! { ! public: ! ! enum ShaderType {VertexShader, FragmentShader, GeometryShader}; ! ! Shader(ShaderType shaderType); ! virtual ~Shader(); ! ! /** Reads a shader from a string. Replaces the source code in a shader object and compiles the shader object. ! \param shaderText String containing the shader code. ! \return bool Everything went OK. */ ! virtual bool read(std::string shaderText) = 0; ! ! protected: ! Shader(); ! ! ShaderType shaderType_; ! ! }; ! } // namespace internal ! } // namespace shallows ! ! #endif // _SHADER_H_ ! --- 1,124 ---- ! /********************************************************************** ! ! * ! ! * File: ! ! * ! ! * Created: ! ! * ! ! * Version: $Id$ ! ! * ! ! * Authors: Trond R. Hagen <tr...@si...>, ! ! * Jon Mikkelsen Hjelmervik <ja...@si...>, ! ! * Johan S. Seland <jo...@if...> ! ! * ! ! * This file is part of the Shallows library. ! ! * Copyright (C) 2005 by SINTEF. All rights reserved. ! ! * ! ! * This library is free software; you can redistribute it and/or ! ! * modify it under the terms of the GNU General Public License ! ! * ("GPL") version 2 as published by the Free Software Foundation. ! ! * See the file LICENSE.GPL at the root directory of this source ! ! * distribution for additional information about the GNU GPL. ! ! * ! ! * For using Shallows with software that can not be combined with the ! ! * GNU GPL, please contact SINTEF for aquiring a commercial license ! ! * and support. ! ! * ! ! * SINTEF, Pb 124 Blindern, N-0314 Oslo, Norway ! ! * http://www.sintef.no ! ! *********************************************************************/ ! ! ! ! #ifndef _SHADER_HPP_ ! ! #define _SHADER_HPP_ ! ! #include "shallows/config.h" ! ! ! ! #include <string> ! ! namespace shallows { ! ! namespace internal { ! ! ! ! class DllExport Shader ! ! { ! ! public: ! ! ! ! enum ShaderType {VertexShader, FragmentShader, GeometryShader}; ! ! ! ! Shader(ShaderType shaderType); ! ! virtual ~Shader(); ! ! ! ! /** Reads a shader from a string. Replaces the source code in a shader object and compiles the shader object. ! ! \param shaderText String containing the shader code. ! ! \return bool Everything went OK. */ ! ! virtual bool read(std::string shaderText) = 0; ! ! ! ! protected: ! ! Shader(); ! ! ! ! ShaderType shaderType_; ! ! ! ! }; ! ! } // namespace internal ! ! } // namespace shallows ! ! ! ! #endif // _SHADER_H_ ! ! ! |
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]")); |
From: Johan S. <jo...@us...> - 2007-01-19 13:18:53
|
Update of /cvsroot/shallows/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22330 Modified Files: CMakeLists.txt 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: CMakeLists.txt =================================================================== RCS file: /cvsroot/shallows/shallows/CMakeLists.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CMakeLists.txt 4 Dec 2006 10:26:16 -0000 1.3 --- CMakeLists.txt 19 Jan 2007 13:18:46 -0000 1.4 *************** *** 4,10 **** --- 4,14 ---- set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /work/lib) set(CMAKE_BUILD_TYPE "Debug" ) + set(Boost_INCLUDE_DIR "h:/boost/include/boost-1_33_1" ) + find_package(Boost REQUIRED) find_package(OpenGL REQUIRED) + include_directories(include ${Boost_INCLUDE_DIRS}) + link_libraries(${OPENGL_LIBRARIES}) # Platform specifics if(UNIX) *************** *** 17,23 **** include(CheckIncludeFiles) check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) ! if(NOT HAVE_BOOST_SHARED_PTR_HPP) ! message(FATAL_ERROR "shared_ptr not found. Install boost.") ! endif(NOT HAVE_BOOST_SHARED_PTR_HPP) check_include_file_cxx(Magick++.h HAVE_MAGICK) --- 21,27 ---- include(CheckIncludeFiles) check_include_file_cxx(boost/shared_ptr.hpp HAVE_BOOST_SHARED_PTR_HPP) ! #if(NOT HAVE_BOOST_SHARED_PTR_HPP) ! # message(FATAL_ERROR "shared_ptr not found. Install boost.") ! #endif(NOT HAVE_BOOST_SHARED_PTR_HPP) check_include_file_cxx(Magick++.h HAVE_MAGICK) *************** *** 26,35 **** check_include_files(Cg/cgGL.h HAVE_CGGL) configure_file(config.h.cmake include/shallows/config.h) # Define our sources file(GLOB SHALLOWS_SRC "src/*cpp") ! include_directories(include) #add_library(shallows ${SHALLOWS_SRC}) add_library(shallows SHARED ${SHALLOWS_SRC}) ! SET_SOURCE_FILES_PROPERTIES(${SHALLOWS_SRC} COMPILE_FLAGS -pthread) \ No newline at end of file --- 30,44 ---- check_include_files(Cg/cgGL.h HAVE_CGGL) + if(WIN32) + set(DllExport "__declspec( dllexport )" ) + add_definitions(-DNOMINMAX) + endif(WIN32) + configure_file(config.h.cmake include/shallows/config.h) # Define our sources file(GLOB SHALLOWS_SRC "src/*cpp") ! #add_library(shallows ${SHALLOWS_SRC}) add_library(shallows SHARED ${SHALLOWS_SRC}) ! #SET_SOURCE_FILES_PROPERTIES(${SHALLOWS_SRC} COMPILE_FLAGS) \ No newline at end of file |
From: Johan S. <jo...@us...> - 2007-01-05 13:01:02
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv8146/include/shallows Modified Files: GLProgram.hpp Log Message: validate_attrib is now public. Index: GLProgram.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/GLProgram.hpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** GLProgram.hpp 4 Dec 2006 10:25:10 -0000 1.24 --- GLProgram.hpp 5 Jan 2007 13:00:56 -0000 1.25 *************** *** 131,134 **** --- 131,146 ---- /** Return the underlying OpenGL program handle. */ unsigned int getProgramHandle(); + + /** Validate that a uniform name is legal, and does not specify the name + * of a texture. + * \return The location of the uniform + */ + int validate_uniform( const char* name ) const throw (std::invalid_argument, shallows::shallows_runtime_error ); + + /** Validate that a vertex attribute name is valid for the current shader. + * \return The location of the vertex attribute. + */ + int validate_attrib( const char* name ) const throw (std::invalid_argument); + protected: unsigned int programHandle_; *************** *** 160,173 **** const throw (std::invalid_argument ); - /** Validate that a uniform name is legal, and does not specify the name - * of a texture. - * \return The location of the uniform - */ - int validate_uniform( const char* name ) const throw (std::invalid_argument, shallows::shallows_runtime_error ); - /** Validate that a vertex attribute name is valid for the current shader. - * \return The location of the vertex attribute. - */ - int validate_attrib( const char* name ) const throw (std::invalid_argument); }; --- 172,176 ---- |
From: Johan S. <jo...@us...> - 2006-12-04 10:26:20
|
Update of /cvsroot/shallows/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14973 Modified Files: CMakeLists.txt Log Message: Set default build type to debug. Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/shallows/shallows/CMakeLists.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** CMakeLists.txt 15 Sep 2006 09:04:28 -0000 1.2 --- CMakeLists.txt 4 Dec 2006 10:26:16 -0000 1.3 *************** *** 3,6 **** --- 3,7 ---- # Add any additional system library paths here set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} /work/lib) + set(CMAKE_BUILD_TYPE "Debug" ) find_package(OpenGL REQUIRED) |
From: Johan S. <jo...@us...> - 2006-12-04 10:25:33
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14593/src Modified Files: Program.cpp GLProgram.cpp GLShader.cpp Log Message: Added removeOutputTarget function, Preliminary support for Geometry Shaders. Index: GLProgram.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/GLProgram.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** GLProgram.cpp 23 Aug 2006 09:59:43 -0000 1.33 --- GLProgram.cpp 4 Dec 2006 10:25:30 -0000 1.34 *************** *** 57,73 **** } void GLProgram::read( const std::string programText, const std::string defines ) { ! if ( vertexShader_.get() != 0 ) { ! glDetachShader( programHandle_, vertexShader_->getShaderID() ); ! vertexShader_.reset( NULL ); ! } ! assert( vertexShader_.get() == 0 ); ! ! if ( fragmentShader_.get() != 0 ) { ! glDetachShader( programHandle_, fragmentShader_->getShaderID() ); ! fragmentShader_.reset( NULL ); ! } ! assert( fragmentShader_.get() == 0 ); log_.clear(); --- 57,74 ---- } + void + GLProgram::detachShader( pGLShader shader ) { + if ( shader.get() != 0 ) { + glDetachShader( programHandle_, shader->getShaderID() ); + shader.reset( NULL ); + } + assert( shader.get() == 0 ); + } + void GLProgram::read( const std::string programText, const std::string defines ) { ! detachShader( vertexShader_ ); ! detachShader( geometryShader_ ); ! detachShader( fragmentShader_ ); log_.clear(); *************** *** 75,78 **** --- 76,80 ---- //buildUniformsMap( defines + programText ); string vertexShaderSource = Program::getVertexShaderSource( programText, defines ); + string geometryShaderSource = Program::getGeometryShaderSource( programText, defines ); string fragmentShaderSource = Program::getFragmentShaderSource( programText, defines ); *************** *** 80,83 **** --- 82,86 ---- // The semantics here is due to the shaders being auto_ptr's. vertexShader_ = initShader( vertexShader_, internal::Shader::VertexShader, vertexShaderSource ); + //geometryShader_ = initShader( geometryShader_, internal::Shader::GeometryShader, geometryShaderSource ); fragmentShader_ = initShader( fragmentShader_, internal::Shader::FragmentShader, fragmentShaderSource ); Index: Program.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/Program.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Program.cpp 11 Jul 2006 07:59:16 -0000 1.28 --- Program.cpp 4 Dec 2006 10:25:29 -0000 1.29 *************** *** 43,55 **** namespace shallows { ! Program::Program() : ! uniforms( uniformsNameToType_ ), useViewportTexCoords_(true) { ! int max_draw_buffers, max_color_attachments; ! glGetIntegerv(GL_MAX_DRAW_BUFFERS, &max_draw_buffers); ! glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_attachments); ! // renderTargets_.resize(max_draw_buffers); ! renderTarget_.resize(max_draw_buffers); } --- 43,55 ---- namespace shallows { ! Program::Program() : ! uniforms( uniformsNameToType_ ), useViewportTexCoords_(true) { ! int max_draw_buffers, max_color_attachments; ! glGetIntegerv(GL_MAX_DRAW_BUFFERS, &max_draw_buffers); ! glGetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, &max_color_attachments); ! // renderTargets_.resize(max_draw_buffers); ! renderTarget_.resize(max_draw_buffers); } *************** *** 59,76 **** void Program::readFile( const char *filename, const char *defines ) { ! std::ifstream file( filename ); ! ! if ( !file ) { ! std::string s = filename; ! s += " was not found."; ! throw file_not_found( s ); ! } ! ! std::istreambuf_iterator<char> begin(file), end; ! std::string src(begin, end); ! std::string str_def; if (defines) ! str_def=std::string(defines); read(src, str_def); } --- 59,76 ---- void Program::readFile( const char *filename, const char *defines ) { ! std::ifstream file( filename ); ! ! if ( !file ) { ! std::string s = filename; ! s += " was not found."; ! throw file_not_found( s ); ! } ! ! std::istreambuf_iterator<char> begin(file), end; ! std::string src(begin, end); ! std::string str_def; if (defines) ! str_def=std::string(defines); read(src, str_def); } *************** *** 78,83 **** void Program::read( std::string programText ) { ! std::string s; ! read(programText, s); } --- 78,83 ---- void Program::read( std::string programText ) { ! std::string s; ! read(programText, s); } *************** *** 85,134 **** Program::getLog() const { ! return log_; } ! void Program::clearLog() { ! log_.clear(); } - std::string Program::getVertexShaderSource( const std::string programText, const std::string defines ) { ! /* In a programText we allow both the [Vertex shader] and the [Fragment shader] ! * to come first. ! */ ! int posVS = static_cast<int>(programText.find("[Vertex shader]")); ! int posFS = static_cast<int>(programText.find("[Fragment shader]")); ! std::string result = programText.substr(posVS+15, (posFS<posVS ? programText.length() : posFS) - posVS-15); ! return defines + result; } std::string Program::getFragmentShaderSource( const std::string programText, const std::string defines ) { ! /* In a programText we allow both the [Vertex shader] and the [Fragment shader] ! * to come first. ! */ ! int posVS = static_cast<int>(programText.find("[Vertex shader]")); ! int posFS = static_cast<int>(programText.find("[Fragment shader]")); ! std::string result = programText.substr(posFS+17, (posVS<posFS ? programText.length() : posVS) - posFS-17); ! return defines + result; } ! void Program::addToLog(const std::string &s) { ! log_.append(s); } ! void Program::setFrameBuffer(boost::shared_ptr<FrameBuffer> fb) { ! frameBuffer_=fb; } --- 85,170 ---- Program::getLog() const { ! return log_; } ! void Program::clearLog() { ! log_.clear(); ! } ! ! void ! Program::findSourcePositions( std::string programText, int& posVS, int& posGS, int& posFS ) { ! struct notFoundToInf { ! int operator()( int i ) { ! if ( i == -1 ) ! return std::numeric_limits<int>::max(); ! else ! return i; ! } ! } f; ! posVS = static_cast<int>(programText.find("[Vertex shader]")); ! posGS = static_cast<int>(programText.find("[Geometry shader]")); ! posFS = static_cast<int>(programText.find("[Fragment shader]")); ! } ! ! std::string ! Program::getGeometryShaderSource( const std::string programText, const std::string defines ) { ! int posVS, posGS, posFS; ! findSourcePositions( programText, posVS, posGS, posFS ); ! ! if ( posGS == -1 ) ! return std::string(); ! ! int end = std::min( posFS > posGS ? posFS : programText.length(), ! posVS > posGS ? posVS : programText.length() ); ! ! std::string result = programText.substr(posGS+17, end - posGS-17); ! ! return defines + result; } std::string Program::getVertexShaderSource( const std::string programText, const std::string defines ) { ! int posVS, posGS, posFS; ! findSourcePositions( programText, posVS, posGS, posFS ); ! ! if ( posVS == -1 ) ! return std::string(); ! ! int end = std::min( posGS > posVS ? posGS : programText.length(), ! posFS > posVS ? posFS : programText.length() ); ! std::string result = programText.substr(posVS+15, end - posVS-15); ! return defines + result; } std::string Program::getFragmentShaderSource( const std::string programText, const std::string defines ) { ! int posVS, posGS, posFS; ! findSourcePositions( programText, posVS, posGS, posFS ); ! if ( posFS == -1 ) ! return std::string(); ! ! int end = std::min( posVS > posFS ? posVS : programText.length(), ! posGS > posFS ? posGS : programText.length() ); ! std::string result = programText.substr(posFS+17, end - posFS-17); ! ! return defines + result; } ! void Program::addToLog(const std::string &s) { ! log_.append(s); } ! void Program::setFrameBuffer(boost::shared_ptr<FrameBuffer> fb) { ! frameBuffer_=fb; } *************** *** 136,208 **** Program::setOutputTarget( unsigned int colorNum, boost::shared_ptr<RenderTarget> target ) { ! CHECK_GL_DEBUG; ! if (colorNum >= renderTarget_.size() || colorNum<0) ! { ! std::string s = "Invalid colorNum used in Program::setOutputTarget "; ! s+= colorNum; ! s+= " not in range [0.."; ! s+= (char)(renderTarget_.size())-1; ! s+= "]"; ! throw std::invalid_argument( s ); ! } ! CHECK_GL_DEBUG; ! if(frameBuffer_.get() == 0) ! { ! throw std::invalid_argument( "cannot attach rendertarget before framebuffer"); ! } ! CHECK_GL_DEBUG; ! frameBuffer_->validateRenderTarget(*target.get()); ! renderTarget_[colorNum]=target; ! CHECK_GL_DEBUG; } ! void Program::activateRenderTargets() { ! //We allow the user to use a program without specifying frameBuffer ! if (frameBuffer_.get() == 0) ! return; ! int numRenderTargets=0; ! frameBuffer_->activate(); ! OffScreenBuffer *off_buf = ! dynamic_cast<OffScreenBuffer *>(frameBuffer_.get()); ! for (int i=0; i<(int)(renderTarget_.size()); i++) ! { ! if (renderTarget_[i].get()!=0) ! { ! if (numRenderTargets!= i) ! { ! throw std::runtime_error("Missing rendertargets"); ! } ! numRenderTargets++; ! } ! } ! ! if (off_buf!=0) ! { ! boost::shared_ptr<shallows::OffScreenRenderTarget> rt[16]; ! // unsigned int enums[16]; ! for (int i=0; i<numRenderTargets; i++) ! rt[i]=boost::dynamic_pointer_cast<OffScreenRenderTarget> ! (renderTarget_[i]); ! off_buf->attachRenderTarget(rt, numRenderTargets); ! // attach(off_buf, rt, enums, numRenderTargets); ! // glDrawBuffers(numRenderTargets, enums); ! } ! const OnScreenBuffer *on_buf = ! dynamic_cast<OnScreenBuffer *>(frameBuffer_.get()); ! if (on_buf != 0) ! { ! if (numRenderTargets > 1) ! { ! throw not_implemented("MRT not implemented for on screen buffers"); ! } ! const OnScreenRenderTarget *on_rt = ! dynamic_cast<OnScreenRenderTarget *> ! (renderTarget_[0].get()); ! glDrawBuffer(on_rt->getLastBufferEnum()); ! } } --- 172,261 ---- Program::setOutputTarget( unsigned int colorNum, boost::shared_ptr<RenderTarget> target ) { ! CHECK_GL_DEBUG; ! if (colorNum >= renderTarget_.size() || colorNum<0) ! { ! std::string s = "Invalid colorNum used in Program::setOutputTarget "; ! s+= colorNum; ! s+= " not in range [0.."; ! s+= (char)(renderTarget_.size())-1; ! s+= "]"; ! throw std::invalid_argument( s ); ! } ! CHECK_GL_DEBUG; ! if(frameBuffer_.get() == 0) ! { ! throw std::invalid_argument( "cannot attach rendertarget before framebuffer"); ! } ! CHECK_GL_DEBUG; ! frameBuffer_->validateRenderTarget(*target.get()); ! renderTarget_[colorNum] = target; ! CHECK_GL_DEBUG; } + void + Program::removeOutputTarget( unsigned int colorNum ) { + CHECK_GL_DEBUG + if (colorNum >= renderTarget_.size() || colorNum<0) { + std::string s = "Invalid colorNum used in Program::removeOutputTarget "; + s+= colorNum; + s+= " not in range [0.."; + s+= (char)(renderTarget_.size())-1; + s+= "]"; + throw std::invalid_argument( s ); + } + + renderTarget_[colorNum].reset(); + CHECK_GL_DEBUG; + } ! ! ! void Program::activateRenderTargets() { ! //We allow the user to use a program without specifying frameBuffer ! if (frameBuffer_.get() == 0) ! return; ! int numRenderTargets=0; ! frameBuffer_->activate(); ! OffScreenBuffer *off_buf = ! dynamic_cast<OffScreenBuffer *>(frameBuffer_.get()); ! for (int i=0; i<(int)(renderTarget_.size()); i++) ! { ! if (renderTarget_[i].get()!=0) ! { ! if (numRenderTargets!= i) ! { ! throw std::runtime_error("Missing rendertargets"); ! } ! numRenderTargets++; ! } ! } ! if (off_buf!=0) ! { ! boost::shared_ptr<shallows::OffScreenRenderTarget> rt[16]; ! // unsigned int enums[16]; ! for (int i=0; i<numRenderTargets; i++) ! rt[i]=boost::dynamic_pointer_cast<OffScreenRenderTarget> ! (renderTarget_[i]); ! ! off_buf->attachRenderTarget(rt, numRenderTargets); ! // attach(off_buf, rt, enums, numRenderTargets); ! // glDrawBuffers(numRenderTargets, enums); ! } ! const OnScreenBuffer *on_buf = ! dynamic_cast<OnScreenBuffer *>(frameBuffer_.get()); ! if (on_buf != 0) ! { ! if (numRenderTargets > 1) ! { ! throw not_implemented("MRT not implemented for on screen buffers"); ! } ! const OnScreenRenderTarget *on_rt = ! dynamic_cast<OnScreenRenderTarget *> ! (renderTarget_[0].get()); ! glDrawBuffer(on_rt->getLastBufferEnum()); ! } } *************** *** 211,293 **** ! void Program::renderQuad() { ! if (useViewportTexCoords_) ! { ! int viewport[4]; ! glGetIntegerv(GL_VIEWPORT, viewport); ! min_u_=0.0f; ! min_v_=0.0f; ! max_u_=(float)(viewport[2]); ! max_v_=(float)(viewport[3]); ! } ! ! glBegin(GL_QUADS); ! glTexCoord2f(min_u_, min_v_); ! glVertex3f(-1.0f, -1.0f, 0.5f); ! glTexCoord2f(max_u_, min_v_); ! glVertex3f(1.0f, -1.0f, 0.5f); ! glTexCoord2f(max_u_, max_v_); ! glVertex3f(1.0f, 1.0f, 0.5f); ! glTexCoord2f(min_u_, max_v_); ! glVertex3f(-1.0f, 1.0f, 0.5f); ! glEnd(); ! } ! void ! Program::getTexCoords(float &min_u, float &min_v, ! float &max_u, float &max_v) const { ! min_u=min_u_; ! min_v=min_v_; ! max_u=max_u_; ! max_v=max_v_; } ! void ! Program::setTexCoords(float min_u, float min_v, ! float max_u, float max_v) { ! min_u_=min_u; ! min_v_=min_v; ! max_u_=max_u; ! max_v_=max_v; ! useViewportTexCoords_=false; } ! void Program::useViewportTexCoords() { ! const OffScreenBuffer *off_buf = ! dynamic_cast<OffScreenBuffer *>(frameBuffer_.get()); ! int viewport[4]; ! if (off_buf != 0) ! { ! viewport[0]=0; ! viewport[1]=0; ! off_buf->getSize(viewport[2], viewport[3]); ! } else ! { ! glGetIntegerv(GL_VIEWPORT, viewport); ! } ! min_u_=(float)(viewport[0]); ! min_v_=(float)(viewport[1]); ! max_u_=(float)(viewport[2]); ! max_v_=(float)(viewport[3]); ! useViewportTexCoords_=true; } ! void Program::useNormalizedTexCoords() { ! min_u_=0.0f; ! min_v_=0.0f; ! max_u_=1.0f; ! max_v_=1.0f; ! useViewportTexCoords_=false; } --- 264,346 ---- ! void Program::renderQuad() { ! if (useViewportTexCoords_) ! { ! int viewport[4]; ! glGetIntegerv(GL_VIEWPORT, viewport); ! min_u_=0.0f; ! min_v_=0.0f; ! max_u_=(float)(viewport[2]); ! max_v_=(float)(viewport[3]); ! } ! glBegin(GL_QUADS); ! glTexCoord2f(min_u_, min_v_); ! glVertex3f(-1.0f, -1.0f, 0.5f); ! glTexCoord2f(max_u_, min_v_); ! glVertex3f(1.0f, -1.0f, 0.5f); ! glTexCoord2f(max_u_, max_v_); ! glVertex3f(1.0f, 1.0f, 0.5f); ! glTexCoord2f(min_u_, max_v_); ! glVertex3f(-1.0f, 1.0f, 0.5f); ! glEnd(); ! } ! ! void ! Program::getTexCoords(float &min_u, float &min_v, ! float &max_u, float &max_v) const { ! min_u=min_u_; ! min_v=min_v_; ! max_u=max_u_; ! max_v=max_v_; } ! void ! Program::setTexCoords(float min_u, float min_v, ! float max_u, float max_v) { ! min_u_=min_u; ! min_v_=min_v; ! max_u_=max_u; ! max_v_=max_v; ! useViewportTexCoords_=false; } ! void Program::useViewportTexCoords() { ! const OffScreenBuffer *off_buf = ! dynamic_cast<OffScreenBuffer *>(frameBuffer_.get()); ! int viewport[4]; ! if (off_buf != 0) ! { ! viewport[0]=0; ! viewport[1]=0; ! off_buf->getSize(viewport[2], viewport[3]); ! } else ! { ! glGetIntegerv(GL_VIEWPORT, viewport); ! } ! min_u_=(float)(viewport[0]); ! min_v_=(float)(viewport[1]); ! max_u_=(float)(viewport[2]); ! max_v_=(float)(viewport[3]); ! useViewportTexCoords_=true; } ! void Program::useNormalizedTexCoords() { ! min_u_=0.0f; ! min_v_=0.0f; ! max_u_=1.0f; ! max_v_=1.0f; ! useViewportTexCoords_=false; } *************** *** 299,308 **** NameTypeMap::const_iterator i = uniformsNameToType_.begin(); while ( i != uniformsNameToType_.end() ) { ! out << i->first << " --> " << i->second << std::endl; ! i++; } return out.str(); ! } } // namespace shallows --- 352,361 ---- NameTypeMap::const_iterator i = uniformsNameToType_.begin(); while ( i != uniformsNameToType_.end() ) { ! out << i->first << " --> " << i->second << std::endl; ! i++; } return out.str(); ! } } // namespace shallows Index: GLShader.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/GLShader.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GLShader.cpp 24 Jun 2005 10:40:16 -0000 1.3 --- GLShader.cpp 4 Dec 2006 10:25:30 -0000 1.4 *************** *** 59,62 **** --- 59,66 ---- shader_ = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); } + // else if ( shaderType_ == GeometryShader ) + // { + // shader_ = glCreateShaderObjectARB(GL_GEOMETRY_SHADER_EXT); + // } else assert( false && "Invalid shaderType given" ); |
From: Johan S. <jo...@us...> - 2006-12-04 10:25:14
|
Update of /cvsroot/shallows/shallows/include/shallows/internal In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14482/include/shallows/internal Modified Files: Shader.hpp Log Message: Added removeOutputTarget function, Preliminary support for Geometry Shaders. Index: Shader.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/internal/Shader.hpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Shader.hpp 23 Sep 2005 13:35:08 -0000 1.5 --- Shader.hpp 4 Dec 2006 10:25:10 -0000 1.6 *************** *** 40,44 **** public: ! enum ShaderType {VertexShader, FragmentShader}; Shader(ShaderType shaderType); --- 40,44 ---- public: ! enum ShaderType {VertexShader, FragmentShader, GeometryShader}; Shader(ShaderType shaderType); |
From: Johan S. <jo...@us...> - 2006-12-04 10:25:14
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv14482/include/shallows Modified Files: GLProgram.hpp Program.hpp Log Message: Added removeOutputTarget function, Preliminary support for Geometry Shaders. Index: GLProgram.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/GLProgram.hpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** GLProgram.hpp 23 Aug 2006 09:59:43 -0000 1.23 --- GLProgram.hpp 4 Dec 2006 10:25:10 -0000 1.24 *************** *** 137,140 **** --- 137,141 ---- pGLShader vertexShader_; pGLShader fragmentShader_; + pGLShader geometryShader_; /** Init a shader. Will throw compile_error if the compile fails. *************** *** 143,146 **** --- 144,151 ---- std::string source ); + /** Detach a shader + * */ + void detachShader( pGLShader shader ); + // void buildUniformsMap( std::string shaderSource ); Index: Program.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/Program.hpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Program.hpp 11 Sep 2006 11:45:19 -0000 1.24 --- Program.hpp 4 Dec 2006 10:25:10 -0000 1.25 *************** *** 173,180 **** --- 173,187 ---- virtual void useNormalizedTexCoords(); + /** Fetch the Vertex Shader source from a string. */ static std::string getVertexShaderSource( std::string programText, std::string defines = "" ); + + /** Fetch the Geometry Shader source from a string. + * */ + static std::string getGeometryShaderSource( std::string programText, + std::string defines = "" ); + /** Fetch the Fragment Shader source from a string. */ *************** *** 182,185 **** --- 189,195 ---- std::string defines = "" ); + /** Find the position of the different shader marker tokens in the source sringr ) */ + static void findSourcePositions( std::string ProgramText, int& posVS, int& posGS, int& posFS ); + typedef std::map<std::string, std::string> NameTypeMap; *************** *** 205,208 **** --- 215,222 ---- boost::shared_ptr<RenderTarget> target ); + /** Remove an outputtarget from a shader. + */ + void removeOutputTarget( unsigned int colorNum ); + /** Set the texture to be used as input by the program. \param name The logical name of the parameter defined |
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); } |
From: Jon H. <jon...@us...> - 2006-09-15 09:16:38
|
Update of /cvsroot/shallows/shallows/include/shallows/utils In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23384/include/shallows/utils Modified Files: Timer.hpp Log Message: gcc defines __unix, not UNIX Index: Timer.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/utils/Timer.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Timer.hpp 25 Sep 2005 21:34:26 -0000 1.4 --- Timer.hpp 15 Sep 2006 09:16:33 -0000 1.5 *************** *** 33,37 **** #include "shallows/config.h" ! #ifdef UNIX #include <sys/time.h> #include <unistd.h> --- 33,37 ---- #include "shallows/config.h" ! #ifdef __unix #include <sys/time.h> #include <unistd.h> *************** *** 66,70 **** double static getCurrentTime() { ! #ifdef UNIX struct timeval tv; struct timezone tz; --- 66,70 ---- double static getCurrentTime() { ! #ifdef __unix struct timeval tv; struct timezone tz; |
From: Jon H. <jon...@us...> - 2006-09-15 09:04:32
|
Update of /cvsroot/shallows/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19159 Modified Files: CMakeLists.txt Log Message: Changed names for Cg and ImageMagic. Made library threaded Index: CMakeLists.txt =================================================================== RCS file: /cvsroot/shallows/shallows/CMakeLists.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CMakeLists.txt 25 Jul 2006 13:50:27 -0000 1.1 --- CMakeLists.txt 15 Sep 2006 09:04:28 -0000 1.2 *************** *** 20,27 **** endif(NOT HAVE_BOOST_SHARED_PTR_HPP) ! check_include_file_cxx(Magick++.h HAVE_MAGICK_H) ! check_include_files(png.h HAVE_PNG_H) ! check_include_files(Cg/cg.h HAVE_CG_CG_H) ! check_include_files(Cg/cgGL.h HAVE_CG_CGGL_H) configure_file(config.h.cmake include/shallows/config.h) --- 20,27 ---- endif(NOT HAVE_BOOST_SHARED_PTR_HPP) ! check_include_file_cxx(Magick++.h HAVE_MAGICK) ! check_include_files(png.h HAVE_PNG) ! check_include_files(Cg/cg.h HAVE_CG) ! check_include_files(Cg/cgGL.h HAVE_CGGL) configure_file(config.h.cmake include/shallows/config.h) *************** *** 32,33 **** --- 32,34 ---- #add_library(shallows ${SHALLOWS_SRC}) add_library(shallows SHARED ${SHALLOWS_SRC}) + SET_SOURCE_FILES_PROPERTIES(${SHALLOWS_SRC} COMPILE_FLAGS -pthread) \ No newline at end of file |
From: Jon H. <jon...@us...> - 2006-09-15 09:04:12
|
Update of /cvsroot/shallows/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv19127 Modified Files: config.h.cmake Log Message: Changed names for Cg and ImageMagic Index: config.h.cmake =================================================================== RCS file: /cvsroot/shallows/shallows/config.h.cmake,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.h.cmake 25 Jul 2006 13:50:27 -0000 1.1 --- config.h.cmake 15 Sep 2006 09:04:08 -0000 1.2 *************** *** 1,6 **** ! #cmakedefine HAVE_MAGICK_H 1 ! #cmakedefine HAVE_PNG_H 1 ! #cmakedefine HAVE_CG_CG_H 1 ! #cmakedefine HAVE_CG_CGGL_H 1 #cmakedefine DllExport --- 1,6 ---- ! #cmakedefine HAVE_MAGICK 1 ! #cmakedefine HAVE_PNG 1 ! #cmakedefine HAVE_CG 1 ! #cmakedefine HAVE_CGGL 1 #cmakedefine DllExport |
From: dyken <dy...@us...> - 2006-09-12 21:54:21
|
Update of /cvsroot/shallows/shallows/src In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22818/src Modified Files: RenderTexture2D.cpp Log Message: Added intial functionality to specify which mipmap level one wants to render to. Index: RenderTexture2D.cpp =================================================================== RCS file: /cvsroot/shallows/shallows/src/RenderTexture2D.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** RenderTexture2D.cpp 25 Nov 2005 11:18:16 -0000 1.10 --- RenderTexture2D.cpp 12 Sep 2006 21:54:14 -0000 1.11 *************** *** 39,43 **** RenderTexture2D::RenderTexture2D(texture_ptr tex) ! : texture_(tex) { if (tex.get()==0) --- 39,44 ---- RenderTexture2D::RenderTexture2D(texture_ptr tex) ! : texture_(tex), ! mipmap_level_(0) { if (tex.get()==0) *************** *** 49,52 **** --- 50,58 ---- RenderTexture2D::~RenderTexture2D() { ; } + void + RenderTexture2D::setMipmapLevel( unsigned int level ) + { + mipmap_level_ = level; + } void RenderTexture2D::bindToCurrentFrameBuffer(int colAttachment) *************** *** 61,70 **** GL_COLOR_ATTACHMENT0_EXT+colAttachment, GL_TEXTURE_RECTANGLE_ARB, ! texture_->getTextureID(), 0); } else { glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT+colAttachment, ! GL_TEXTURE_2D, texture_->getTextureID(), 0); } } --- 67,76 ---- GL_COLOR_ATTACHMENT0_EXT+colAttachment, GL_TEXTURE_RECTANGLE_ARB, ! texture_->getTextureID(), mipmap_level_); } else { glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT+colAttachment, ! GL_TEXTURE_2D, texture_->getTextureID(), mipmap_level_); } } *************** *** 129,133 **** GL_COLOR_ATTACHMENT0_EXT+colAttachment, target, ! texture_->getTextureID(), 0); CHECK_GL; } --- 135,139 ---- GL_COLOR_ATTACHMENT0_EXT+colAttachment, target, ! texture_->getTextureID(), mipmap_level_); CHECK_GL; } |
From: dyken <dy...@us...> - 2006-09-12 21:54:21
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22818/include/shallows Modified Files: RenderTexture2D.hpp Log Message: Added intial functionality to specify which mipmap level one wants to render to. Index: RenderTexture2D.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/RenderTexture2D.hpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RenderTexture2D.hpp 25 Nov 2005 11:18:15 -0000 1.16 --- RenderTexture2D.hpp 12 Sep 2006 21:54:14 -0000 1.17 *************** *** 60,63 **** --- 60,66 ---- virtual unsigned int getLastBufferEnum() const; + void + setMipmapLevel( unsigned int level ); + unsigned int getWidth() const; unsigned int getHeight() const; *************** *** 74,77 **** --- 77,81 ---- void operator=(const RenderTexture2D &b) {}; boost::shared_ptr<shallows::Texture2D> texture_; + unsigned int mipmap_level_; }; // |
From: dyken <dy...@us...> - 2006-09-11 11:45:28
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23876/include/shallows Modified Files: Program.hpp Log Message: buildUniformsMap pure virtual commented out (isn't implemented in GLProgram) Index: Program.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/Program.hpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Program.hpp 3 Feb 2006 09:15:00 -0000 1.23 --- Program.hpp 11 Sep 2006 11:45:19 -0000 1.24 *************** *** 394,398 **** /** Build a map of the uniforms. */ ! virtual void buildUniformsMap( std::string shaderSource ) = 0; /** uniformsNameToType store the name and type of every unifom in the --- 394,398 ---- /** Build a map of the uniforms. */ ! //virtual void buildUniformsMap( std::string shaderSource ) = 0; /** uniformsNameToType store the name and type of every unifom in the |
From: Johan S. <jo...@us...> - 2006-08-23 09:59:47
|
Update of /cvsroot/shallows/shallows/include/shallows In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15096/include/shallows Modified Files: GLProgram.hpp Log Message: Remove boost::regex dependency. Index: GLProgram.hpp =================================================================== RCS file: /cvsroot/shallows/shallows/include/shallows/GLProgram.hpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** GLProgram.hpp 3 Feb 2006 09:14:52 -0000 1.22 --- GLProgram.hpp 23 Aug 2006 09:59:43 -0000 1.23 *************** *** 143,147 **** std::string source ); ! void buildUniformsMap( std::string shaderSource ); /** Validate that a texture parameter, and that the texture is --- 143,147 ---- std::string source ); ! // void buildUniformsMap( std::string shaderSource ); /** Validate that a texture parameter, and that the texture is |