On 10/13/2011 06:28 PM, Carsten Neumann wrote:
On 10/13/2011 08:46 AM, Michael Raab wrote:
Today I tried to build OpenSG2.0 with OSGCOMPAT_ENABLE. I finally got it
compiling. The only thing that went wrong were the SHL_*_compat examples. I
tried to fix them, changed source code is attached.
thanks for sending these! I'll apply the changes tomorrow.
hmm, looking closer I'm not sure if these examples are meant to build
with OSGCOMPAT_ENABLE, so possibly the correct fix is to exclude them?
Gerrit, could you have a look please? I'm attaching a patch that
contains Michael's changes.
Cheers,
Carsten
diff --git a/Source/System/State/Shader/SHL/testSHLBumpMap_compat.cpp b/Source/System/State/Shader/SHL/testSHLBumpMap_compat.cpp
index 9fd0ed4..db35024 100644
--- a/Source/System/State/Shader/SHL/testSHLBumpMap_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLBumpMap_compat.cpp
@@ -27,7 +27,7 @@
#include "OSGMaterialChunk.h"
#include "OSGTextureObjChunk.h"
#include "OSGTextureEnvChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
// vertex shader program for bump mapping in surface local coordinates
static std::string _vp_program =
@@ -160,7 +160,7 @@ int main(int argc, char **argv)
matc->setShininess(100);
matc->setLit(true);
- OSG::SHLChunkUnrecPtr shl = OSG::SHLChunk::create();
+ OSG::SimpleSHLChunkUnrecPtr shl = OSG::SimpleSHLChunk::create();
shl->setVertexProgram(_vp_program);
shl->setFragmentProgram(_fp_program);
diff --git a/Source/System/State/Shader/SHL/testSHLEarth_compat.cpp b/Source/System/State/Shader/SHL/testSHLEarth_compat.cpp
index 1179993..148b978 100644
--- a/Source/System/State/Shader/SHL/testSHLEarth_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLEarth_compat.cpp
@@ -28,7 +28,7 @@
#include "OSGMaterialChunk.h"
#include "OSGTextureObjChunk.h"
#include "OSGTextureEnvChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
// ------------------- global vars ----------------------
@@ -38,7 +38,7 @@ static OSG::SimpleSceneManager *_mgr;
// The scene
static OSG::NodeRecPtr _scene;
-static OSG::SHLChunkRecPtr _shl = NULL;
+static OSG::SimpleSHLChunkUnrecPtr _shl = NULL;
static OSG::Int32 _animation = 1;
// forward declaration so we can have the interesting stuff upfront
@@ -123,7 +123,7 @@ int doMain(int argc, char **argv)
tex_earth_clouds_env->setEnvMode(GL_MODULATE);
- _shl = OSG::SHLChunk::create();
+ _shl = OSG::SimpleSHLChunk::create();
if(!_shl->readVertexProgram("Earth.vp"))
fprintf(stderr, "Couldn't read vertex program 'Earth.vp'\n");
diff --git a/Source/System/State/Shader/SHL/testSHLGeometryShader_compat.cpp b/Source/System/State/Shader/SHL/testSHLGeometryShader_compat.cpp
index fb8bc4a..ddf547c 100644
--- a/Source/System/State/Shader/SHL/testSHLGeometryShader_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLGeometryShader_compat.cpp
@@ -25,7 +25,7 @@
#include "OSGImage.h"
#include "OSGChunkMaterial.h"
#include "OSGMaterialChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
@@ -116,7 +116,7 @@ int doMain(int argc, char **argv)
// Create the shader material
OSG::ChunkMaterialUnrecPtr cmat = OSG::ChunkMaterial::create();
- OSG::SHLChunkUnrecPtr shl = OSG::SHLChunk::create();
+ OSG::SimpleSHLChunkUnrecPtr shl = OSG::SimpleSHLChunk::create();
shl->setProgramParameter(GL_GEOMETRY_INPUT_TYPE_EXT,
GL_TRIANGLES);
diff --git a/Source/System/State/Shader/SHL/testSHLLights_compat.cpp b/Source/System/State/Shader/SHL/testSHLLights_compat.cpp
index 4d53e6f..b7a903f 100644
--- a/Source/System/State/Shader/SHL/testSHLLights_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLLights_compat.cpp
@@ -25,7 +25,7 @@
#include "OSGImage.h"
#include "OSGChunkMaterial.h"
#include "OSGMaterialChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
// vertex shader program for bump mapping in surface local coordinates
@@ -149,7 +149,7 @@ static OSG::NodeRecPtr _scene;
static OSG::PointLightRecPtr _point1_core;
static OSG::PointLightRecPtr _point2_core;
static OSG::PointLightRecPtr _point3_core;
-static OSG::SHLChunkUnrecPtr shl;
+static OSG::SimpleSHLChunkUnrecPtr shl;
// forward declaration so we can have the interesting stuff upfront
@@ -164,7 +164,7 @@ typedef void (OSG_APIENTRY *OSGGLUNIFORMMATRIXFVARBPROC)(GLint location,
static
void updateSpecialParameter(
- OSG::SHLChunk::GetUniformLocProc getUniformLocation,
+ OSG::SimpleSHLChunk::GetUniformLocProc getUniformLocation,
OSG::DrawEnv *action,
GLuint program )
{
@@ -228,7 +228,7 @@ int doMain(int argc, char **argv)
matc->setShininess(100);
matc->setLit(true);
- shl = OSG::SHLChunk::create();
+ shl = OSG::SimpleSHLChunk::create();
shl->setVertexProgram(_vp_program);
shl->setFragmentProgram(_fp_program);
@@ -240,7 +240,7 @@ int doMain(int argc, char **argv)
// how to add your own parameter callbacks!
shl->addParameterCallback(
"OSGSpecialParameter",
- OSG::SHLChunk::ParamFunctor(updateSpecialParameter));
+ OSG::SimpleSHLChunk::ParamFunctor(updateSpecialParameter));
cmat->addChunk(matc);
cmat->addChunk(shl);
diff --git a/Source/System/State/Shader/SHL/testSHLProcLights_compat.cpp b/Source/System/State/Shader/SHL/testSHLProcLights_compat.cpp
index ceefc0d..01d0b8c 100644
--- a/Source/System/State/Shader/SHL/testSHLProcLights_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLProcLights_compat.cpp
@@ -26,7 +26,7 @@
#include "OSGImage.h"
#include "OSGChunkMaterial.h"
#include "OSGMaterialChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
#include "OSGGLFuncProtos.h"
@@ -161,7 +161,7 @@ int setupGLUT( int *argc, char *argv[] );
// Shows how to add your own parameter callbacks.
-static void light0Active(OSG::SHLChunk::GetUniformLocProc fULoc,
+static void light0Active(OSG::SimpleSHLChunk::GetUniformLocProc fULoc,
OSG::DrawEnv *pEnv,
GLuint uiProg)
{
@@ -178,7 +178,7 @@ static void light0Active(OSG::SHLChunk::GetUniformLocProc fULoc,
}
}
-static void light1Active(OSG::SHLChunk::GetUniformLocProc fULoc,
+static void light1Active(OSG::SimpleSHLChunk::GetUniformLocProc fULoc,
OSG::DrawEnv *pEnv,
GLuint uiProg)
{
@@ -195,7 +195,7 @@ static void light1Active(OSG::SHLChunk::GetUniformLocProc fULoc,
}
}
-static void light2Active(OSG::SHLChunk::GetUniformLocProc fULoc,
+static void light2Active(OSG::SimpleSHLChunk::GetUniformLocProc fULoc,
OSG::DrawEnv *pEnv,
GLuint uiProg)
{
@@ -241,16 +241,16 @@ int doMain(int argc, char **argv)
matc->setShininess(100);
matc->setLit(true);
- OSG::SHLChunkUnrecPtr shl = OSG::SHLChunk::create();
+ OSG::SimpleSHLChunkUnrecPtr shl = OSG::SimpleSHLChunk::create();
shl->setVertexProgram(_vp_program);
shl->setFragmentProgram(_fp_program);
shl->addParameterCallback("Light0Active",
- OSG::SHLChunk::ParamFunctor(&light0Active));
+ OSG::SimpleSHLChunk::ParamFunctor(&light0Active));
shl->addParameterCallback("Light1Active",
- OSG::SHLChunk::ParamFunctor(&light1Active));
+ OSG::SimpleSHLChunk::ParamFunctor(&light1Active));
shl->addParameterCallback("Light2Active",
- OSG::SHLChunk::ParamFunctor(&light2Active));
+ OSG::SimpleSHLChunk::ParamFunctor(&light2Active));
cmat->addChunk(matc);
cmat->addChunk(shl);
diff --git a/Source/System/State/Shader/SHL/testSHLSharedParameters_compat.cpp b/Source/System/State/Shader/SHL/testSHLSharedParameters_compat.cpp
index 0482301..b087801 100644
--- a/Source/System/State/Shader/SHL/testSHLSharedParameters_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHLSharedParameters_compat.cpp
@@ -27,9 +27,8 @@
#include "OSGImage.h"
#include "OSGChunkMaterial.h"
#include "OSGMaterialChunk.h"
-#include "OSGSHLChunk.h"
-#include "OSGSHLParameterChunk.h"
-
+#include "OSGSimpleSHLChunk.h"
+#include "OSGSimpleSHLVariableChunk.h"
// vertex shader program for
static std::string _vp_program =
@@ -96,7 +95,7 @@ static OSG::SimpleSceneManager *_mgr;
static OSG::NodeRecPtr _scene;
static OSG::Int32 _animation = 1;
-static OSG::SHLParameterChunkRecPtr _shlparameter = NULL;
+static OSG::SimpleSHLVariableChunkRecPtr _shlparameter = NULL;
// forward declaration so we can have the interesting stuff upfront
@@ -124,7 +123,7 @@ int doMain(int argc, char **argv)
OSG::GeometryUnrecPtr geo = OSG::makeBoxGeo(0.5, 0.5, 0.5, 1, 1, 1);
// share the chunk
- OSG::SHLChunkUnrecPtr shl = OSG::SHLChunk::create();
+ OSG::SimpleSHLChunkUnrecPtr shl = OSG::SimpleSHLChunk::create();
shl->setVertexProgram(_vp_program);
shl->setFragmentProgram(_fp_program);
@@ -160,8 +159,8 @@ int doMain(int argc, char **argv)
// ok use one SHLChunk and n SHLParameterChunks
// Assing a different "SurfaceColor" parameter to each geometry.
- OSG::SHLParameterChunkUnrecPtr shlparameter =
- OSG::SHLParameterChunk::create();
+ OSG::SimpleSHLVariableChunkUnrecPtr shlparameter =
+ OSG::SimpleSHLVariableChunk::create();
shlparameter->setSHLChunk(shl);
shlparameter->setUniformParameter("SurfaceColor", color);
diff --git a/Source/System/State/Shader/SHL/testSHL_compat.cpp b/Source/System/State/Shader/SHL/testSHL_compat.cpp
index 35e92fa..3054df6 100644
--- a/Source/System/State/Shader/SHL/testSHL_compat.cpp
+++ b/Source/System/State/Shader/SHL/testSHL_compat.cpp
@@ -27,7 +27,7 @@
#include "OSGMaterialChunk.h"
#include "OSGTextureObjChunk.h"
#include "OSGTextureEnvChunk.h"
-#include "OSGSHLChunk.h"
+#include "OSGSimpleSHLChunk.h"
@@ -72,7 +72,7 @@ int main(int argc, char **argv)
matc->setShininess(100);
matc->setLit(true);
- OSG::SHLChunkUnrecPtr shl = OSG::SHLChunk::create();
+ OSG::SimpleSHLChunkUnrecPtr shl = OSG::SimpleSHLChunk::create();
shl->readVertexProgram(argv[1]);
shl->readFragmentProgram(argv[2]);
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users