Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h	(revision 3102)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Camera.h	(revision 3147)
@@ -22,9 +22,9 @@
 public:
 
+	enum {LEFT_PLANE, RIGHT_PLANE, BOTTOM_PLANE, TOP_PLANE, NEAR_PLANE, FAR_PLANE};
+
 	Frustum() {};
 
 	Frustum(const Matrix4x4 &trafo);
-
-	enum { LEFT_PLANE, RIGHT_PLANE, BOTTOM_PLANE, TOP_PLANE, NEAR_PLANE, FAR_PLANE};
 
 	/** Resizes the current frustum so that it fully encloses the given polyhedron
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.cpp	(revision 3116)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.cpp	(revision 3147)
@@ -360,5 +360,7 @@
 							 const std::string &filename, 
 							 CGprofile profile,
-							 const std::string &functionName)
+							 const std::string &functionName,
+							 PROGRAM_TYPE programType):
+mProgramType(programType)
 {
 	mProgram = cgCreateProgramFromFile(context, 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp	(revision 3146)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderManager.cpp	(revision 3147)
@@ -207,7 +207,14 @@
 	const string fullName = "src/shaders/" + filename + ".cg";
 	
-	ShaderProgram *p = 
-		new ShaderProgram(sCgContext, fullName, 
-		                  isFragment ? sCgFragmentProfile : sCgVertexProfile, funcName);
+	ShaderProgram *p;
+
+	if (isFragment)
+	{
+		p = new ShaderProgram(sCgContext, fullName, sCgFragmentProfile, funcName, ShaderProgram::FRAGMENT_PROGRAM);
+	}
+	else
+	{
+		p = new ShaderProgram(sCgContext, fullName, sCgVertexProfile, funcName, ShaderProgram::VERTEX_PROGRAM);
+	}
 
 	if (GetShaderProgram(name))
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h	(revision 2964)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Texture.h	(revision 3147)
@@ -15,4 +15,10 @@
 {
 public:
+	
+	enum {FORMAT_INVALID, FORMAT_RGB, FORMAT_RGBA};
+	
+	enum {CLAMP, REPEAT};
+
+
 	/** Constructor loading texture from file
 	*/
@@ -24,9 +30,4 @@
 	*/
 	void *GetImage() const;
-	
-	enum { FORMAT_INVALID, FORMAT_RGB, FORMAT_RGBA };
-	
-	enum { CLAMP, REPEAT };
-
 	/** Returns width of texture.
 	*/
@@ -41,18 +42,22 @@
 	*/
 	std::string GetName() const;
-
+	/** Returns byte size of a row of the image.
+	*/
 	int GetRowLength() const;
-
+	/** Returns byte size of one pixel
+	*/
 	int GetPixelSize() const;
-	
+	/** Returns byte size of the image
+	*/
 	inline int GetByteSize() const;
 	/** Bind the texture.
 	*/
 	void Bind() const;
-
+	/** Sets the boundary mode for the s texture coordinate parameter.
+	*/
 	void SetBoundaryModeS(int mode) { mBoundaryModeS = mode; }
+	/** Sets the boundary mode for the T texture coordinate parameter.
+	*/
 	void SetBoundaryModeT(int mode) { mBoundaryModeT = mode; }
-
-	//void SetUseMipMap(bool useMipMap) { mUseMipMap = useMipMap; }
 
 	int GetBoundaryModeS() const { return mBoundaryModeS; }
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 3146)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 3147)
@@ -98,4 +98,5 @@
 	//float4 col = float4(centerNormal * 0.5f + float3(0.5f), 0);
 	//float4 col = float4(centerNormal, 0);
+
 	// push through the current depth
 	col.w = centerDepth.x;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.h	(revision 3115)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ShaderProgram.h	(revision 3147)
@@ -220,4 +220,7 @@
 public:
 
+	enum PROGRAM_TYPE {FRAGMENT_PROGRAM, VERTEX_PROGRAM};
+
+
 	ShaderProgram(CGprogram program): mProgram(program) {}
 
@@ -225,5 +228,6 @@
 		          const std::string &filename, 
 				  CGprofile profile,
-				  const std::string &functionName);
+				  const std::string &functionName,
+				  PROGRAM_TYPE type);
 
 	~ShaderProgram() { if (mProgram != NULL) cgDestroyProgram(mProgram); }
@@ -276,10 +280,19 @@
 	*/
 	void Bind();
+	/** Releases all texture resources.
+	*/
+	void Release();
+
 	/** Returns true if this program is valid.
 	*/
-	inline bool IsValid() const { return mProgram != NULL; }
-	/** Releases all texture resources.
-	*/
-	void Release();
+	inline bool IsValid() const {return mProgram != NULL;}
+	
+
+	/** Returns type of program (fragment program or vertex program}
+	*/
+	inline PROGRAM_TYPE GetProgramType() const {return mProgramType;}
+	/** See get
+	*/
+	inline void SetProgramType(PROGRAM_TYPE type) {mProgramType = type;}
 
 
@@ -301,4 +314,6 @@
 	CGParameterArray mTextureParams;
 	CGParameterArray mParameters;
+
+	PROGRAM_TYPE mProgramType;
 };
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp	(revision 3114)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Material.cpp	(revision 3147)
@@ -74,4 +74,7 @@
 void Technique::SetFragmentProgram(ShaderProgram *p) 
 { 
+	if (p->GetProgramType() == ShaderProgram::VERTEX_PROGRAM)
+		cerr << "warning: assigning a vertex program as fragment program!" << endl;
+
 	mFragmentProgram = p;
 	mFragmentProgramParameters.Reset();
@@ -82,5 +85,8 @@
 void Technique::SetVertexProgram(ShaderProgram *p) 
 { 
-	mVertexProgram = p; 
+	if (p->GetProgramType() == ShaderProgram::FRAGMENT_PROGRAM)
+		cerr << "warning: assigning a fragment program as vertex program!" << endl;
+
+	mVertexProgram = p;
 	mVertexProgramParameters.Reset();
 	mVertexProgramParameters.SetProgram(p);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 3117)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 3147)
@@ -15,8 +15,7 @@
 public:
 
-	enum FORMAT { RGB_UBYTE, RGBA_UBYTE, RGB_FLOAT_16, RGBA_FLOAT_16, RGB_FLOAT_32, RGBA_FLOAT_32 };
-
-	enum WRAP_TYPE { WRAP_REPEAT, WRAP_CLAMP_TO_EDGE };
-	enum FILTER_TYPE { FILTER_NEAREST, FILTER_LINEAR };
+	enum FORMAT {RGB_UBYTE, RGBA_UBYTE, RGB_FLOAT_16, RGBA_FLOAT_16, RGB_FLOAT_32, RGBA_FLOAT_32};
+	enum WRAP_TYPE {WRAP_REPEAT, WRAP_CLAMP_TO_EDGE};
+	enum FILTER_TYPE {FILTER_NEAREST, FILTER_LINEAR};
 
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h	(revision 3102)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/RenderTraverser.h	(revision 3147)
@@ -52,4 +52,7 @@
 public:
 
+	/// types of traversers
+	enum {CULL_FRUSTUM, STOP_AND_WAIT, CHC, CHCPLUSPLUS, NUM_TRAVERSAL_TYPES};
+
 	/** Default constructor.
 	*/
@@ -62,5 +65,4 @@
 	void RenderScene();
 
-	enum {CULL_FRUSTUM, STOP_AND_WAIT, CHC, CHCPLUSPLUS, NUM_TRAVERSAL_TYPES};
 	/** Returns the type of the traversal.
    	    The type is one of
