Index: GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.h
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.h	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.h	(revision 2769)
@@ -13,12 +13,4 @@
 class Geometry;
 class RenderState;
-
-/** The current render state.
-*/
-class RenderState
-{
-public:
-	bool mTexturesEnabled;
-};
 
 
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/Texture.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/Texture.cpp	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/Texture.cpp	(revision 2769)
@@ -33,14 +33,8 @@
 {
 	startil();
-	string dummy=filename;
-	 
-	string::size_type posOfSpace = filename.find("bmp");
-
-  if (posOfSpace < filename.size()) 
-		dummy=string("../textures/trees/bark8.png");
-
-	if (!ilLoadImage(ILstring(dummy.c_str())))
+	
+	if (!ilLoadImage(ILstring(filename.c_str())))
 	{
-		cerr << "Image load error " << ilGetError() << ": " << dummy << endl;
+		cerr << "Image load error " << ilGetError() << ": " << filename << endl;
 	}
 	else
@@ -75,5 +69,5 @@
 	
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
 
 	//glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
@@ -83,6 +77,6 @@
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 
-	gluBuild2DMipmaps(GL_TEXTURE_2D, 3, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
-	//glTexImage2D(GL_TEXTURE_2D, 0, 3, mWidth, mHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
+	gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, mWidth, mHeight, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
+	//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, mWidth, mHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, mImage);
 }
 
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/Material.h
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/Material.h	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/Material.h	(revision 2769)
@@ -7,39 +7,28 @@
 
 class Texture;
+class RenderState;
 
-class RgbColor 
+
+class RgbaColor 
 {
 
 public:
 
-  float r, g, b;
+	float r, g, b, a;
 
-  RgbColor(): r(0.5f), g(0.5f), b(0.5f)
-  {
-  }
+	RgbaColor(): r(1), g(1), b(1), a(1)
+	{}
 
-  RgbColor(float _r, float _g, float _b): r(_r), g(_g), b(_b)
-  {
-  }
+	RgbaColor(float _r, float _g, float _b, float _a): r(_r), g(_g), b(_b), a(_a)
+	{}
 
-  friend RgbColor
-  RandomColor(float a = 0.0f, float b = 1.0f);
-
-  // Mapping from interval 0.0-1.0 to RGB using "rainbow" color map
-  // (range of hue from 0-240)
-
-  friend RgbColor RainbowColorMapping(float value);
-  
+	friend RgbaColor RandomColor(float a = 0.0f, float b = 1.0f);
 };
 
 
 // Forward declarations
-RgbColor RandomColor(const float a, const float b);
+RgbaColor RandomColor(float a, float b);
 
-// Mapping from interval 0.0-1.0 to RGB using "rainbow" color map
-// (range of hue from 0-240)
-RgbColor RainbowColorMapping(const float value);
 
-  
 
 class Material 
@@ -47,25 +36,30 @@
 public:
 
-  RgbColor mDiffuseColor;
-  RgbColor mSpecularColor;
-  RgbColor mAmbientColor;
-  
-  Material();
-  
-  Material(int id);
+	Material();
 
-  Material(const RgbColor &color);
-  /** Returns unique material id.
-  */
-  int GetId() const;
+	Material(int id);
 
-  friend Material RandomMaterial();
+	Material(const RgbaColor &color);
+	/** Returns unique material id.
+	*/
+	int GetId() const;
 
-  inline Texture *GetTexture() const { return mTexture; }
+	friend Material RandomMaterial();
 
-  void SetTexture(Texture *texture) { mTexture = texture; }
-  /** Renders this material.
-  */
-  void Render();
+	inline Texture *GetTexture() const { return mTexture; }
+
+	void SetTexture(Texture *texture) { mTexture = texture; }
+	/** Renders this material.
+	*/
+	void Render(RenderState *state);
+
+
+	///////////
+
+	RgbaColor mDiffuseColor;
+	RgbaColor mSpecularColor;
+	RgbaColor mAmbientColor;
+
+	bool mAlphaTestEnabled;
 
 protected:
@@ -74,4 +68,6 @@
 	*/
 	void InitMaterial();
+
+	////////////////
 
 	/// unique material id
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.cpp	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.cpp	(revision 2769)
@@ -4,4 +4,5 @@
 #include "Camera.h"
 #include "SceneEntity.h"
+#include "RenderState.h"
 
 
@@ -97,18 +98,4 @@
 
 
-void RenderTraverser::Switch2GLRenderState()
-{
-	// boolean used to avoid unnecessary state changes
-	if (mIsQueryMode)
-	{
-		// switch back to rendermode		
-		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-		glDepthMask(GL_TRUE);
-		glEnable(GL_LIGHTING);
-		mIsQueryMode = false;
-	}
-}
-
-
 OcclusionQuery *RenderTraverser::IssueOcclusionQuery(BvhNode *node, bool wasVisible)
 {
@@ -130,25 +117,12 @@
 	{*/
 
-	// change state so the bounding box gets not actually rendered on the screen
-	Switch2GLQueryState();
+	// change to query mode
+	mRenderState->SetState(RenderState::QUERY);
 	mBvh->RenderBoundingBox(node);
-	Switch2GLRenderState();
+	mRenderState->SetState(RenderState::RENDER);
 
 	query->EndQuery();
 
 	return query;
-}
-
-
-void RenderTraverser::Switch2GLQueryState()
-{	
-	// boolean used to avoid unnecessary state changes
-	if (!mIsQueryMode)
-	{
-		glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-		glDepthMask(GL_FALSE);
-		glDisable(GL_LIGHTING);
-		mIsQueryMode = true;
-	}
 }
 
@@ -189,5 +163,5 @@
 	mStats.Reset();
 	mQueryHandler.ResetQueries();
-	mRenderState->mTexturesEnabled = false;
+	
 	EnqueueNode(mBvh->GetRoot());
 
@@ -201,7 +175,6 @@
 	glDisableClientState(GL_NORMAL_ARRAY);
 
-	glDisable(GL_TEXTURE_2D);
-	glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-	
+	mRenderState->Reset();
+
 	t2 = GetTime();
 	mStats.mRenderTime = TimeDiff(t1, t2);
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.cpp	(revision 2769)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.cpp	(revision 2769)
@@ -0,0 +1,99 @@
+#include "RenderState.h"
+#include "glInterface.h"
+#include "Geometry.h"
+#include "Material.h"
+
+
+namespace CHCDemo 
+{
+
+
+/** Constructor setting render as default state.
+*/
+RenderState::RenderState():
+mAlphaTestEnabled(false), mTexturesEnabled(false), mMode(RENDER) 
+{
+	Reset(); 
+}
+
+	
+bool RenderState::SetState(Mode mode)
+{
+	//-- just change the modewhen necessary
+	if (mode == mMode) return false;
+
+	mMode = mode;
+	//++ state_changes;
+
+	if (mode == QUERY)
+	{
+		//glDisableClientState(GL_NORMAL_ARRAY);
+		glDisable(GL_LIGHTING);
+		glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
+		glDepthMask(GL_FALSE);
+
+
+		/////////
+		//-- handle vbo
+
+		/*glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
+
+		if (Bvh::sCurrentVboId != -1)
+			glBindBufferARB(GL_ARRAY_BUFFER_ARB, Bvh::sCurrentVboId);
+		else
+			glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
+		*/
+
+		SetState(false, false);
+	}
+	else // mode returns to render
+	{
+		/////////////
+		//-- restore render state
+
+		glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
+		glDepthMask(GL_TRUE);
+		glEnable(GL_LIGHTING);
+	}
+
+	return true;
+}
+
+	
+void RenderState::SetState(bool texturing, bool alphaTest)
+{
+	if (mTexturesEnabled && !texturing) 
+	{
+		mTexturesEnabled = false;
+		glDisable(GL_TEXTURE_2D);
+		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+	}
+	else if (!mTexturesEnabled && texturing)
+	{
+		mTexturesEnabled = true;
+		glEnable(GL_TEXTURE_2D);
+		glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+	}
+
+	if (mAlphaTestEnabled && !alphaTest) 
+	{
+		mAlphaTestEnabled = false;
+		glDisable(GL_ALPHA_TEST);
+	}
+	else if (!mAlphaTestEnabled && alphaTest)
+	{
+		mAlphaTestEnabled = true;
+		glEnable(GL_ALPHA_TEST);
+		glAlphaFunc(GL_GEQUAL, 0.5f);
+	}
+}
+
+
+void RenderState::Reset()
+{
+	SetState(false, false);
+	SetState(RENDER);
+}
+
+
+}
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.h
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.h	(revision 2769)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/RenderState.h	(revision 2769)
@@ -0,0 +1,55 @@
+#ifndef __RENDERSTATE_H
+#define __RENDERSTATE_H
+
+
+#include "common.h"
+
+
+namespace CHCDemo 
+{
+
+/** The current render state.
+*/
+class RenderState
+{
+public:
+
+	enum Mode
+	{
+		QUERY,
+		RENDER
+	};
+
+	/** Constructor setting render as default state.
+	*/
+	RenderState();
+	
+	~RenderState() { Reset(); };
+
+	/** This must be called each time before and after an occlusion test.
+		Mode is one of render mode or query mode. Returns true if a state
+		change was issued.
+	*/
+	bool SetState(Mode mode);
+	/** Sets the current render state.
+	*/
+	void SetState(bool texturing, bool alphaTest);
+	/** Returns wether we are in query or render mode
+	*/
+	inline Mode GetMode() const { return mMode; }
+	/** Reset the state.
+	*/
+	void Reset();
+
+protected:
+
+	bool mAlphaTestEnabled;
+	bool mTexturesEnabled;
+
+	Mode mMode;
+};
+
+
+}
+
+#endif // __RENDERSTATE_H
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.cpp	(revision 2766)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/SceneEntity.cpp	(revision 2769)
@@ -3,4 +3,5 @@
 #include "Geometry.h"
 #include "Material.h"
+#include "RenderState.h"
 
 
@@ -19,18 +20,5 @@
 void SceneEntity::Render(RenderState *state)
 {
-	if (!state->mTexturesEnabled && mGeometry->HasTexture())
-	{
-		glEnable(GL_TEXTURE_2D);
-		glEnableClientState(GL_TEXTURE_COORD_ARRAY);
-		state->mTexturesEnabled = true;
-	}
-	else if (state->mTexturesEnabled && !mGeometry->HasTexture())
-	{
-		glDisable(GL_TEXTURE_2D);
-		glDisableClientState(GL_TEXTURE_COORD_ARRAY);
-		state->mTexturesEnabled = false;
-	}
-
-	if (mMaterial) mMaterial->Render();
+	if (mMaterial) mMaterial->Render(state);
 
 	if (mTransform)
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/chc_revisited.vcproj
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/chc_revisited.vcproj	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/chc_revisited.vcproj	(revision 2769)
@@ -354,4 +354,8 @@
 				</File>
 				<File
+					RelativePath=".\RenderState.h"
+					>
+				</File>
+				<File
 					RelativePath=".\SceneEntity.h"
 					>
@@ -400,4 +404,8 @@
 				</File>
 				<File
+					RelativePath=".\RenderState.cpp"
+					>
+				</File>
+				<File
 					RelativePath=".\SceneEntity.cpp"
 					>
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/Material.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/Material.cpp	(revision 2767)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/Material.cpp	(revision 2769)
@@ -3,4 +3,5 @@
 #include "Texture.h"
 #include "glInterface.h"
+#include "RenderState.h"
 
 
@@ -8,7 +9,7 @@
 {
 
-RgbColor RandomColor(float a, float b)
+RgbaColor RandomColor(float a, float b)
 {
-	return RgbColor(a + Random(b), a + Random(b), a + Random(b));
+	return RgbaColor(a + Random(b), a + Random(b), a + Random(b), 1);
 }
 
@@ -17,9 +18,10 @@
 {
 	mTexture = NULL;
+	mAlphaTestEnabled = false;
 
-	mAmbientColor = RgbColor(.2f, .2f, .2f);
-	mDiffuseColor = RgbColor(1.0f, 1.0f, 1.0f);
-	mSpecularColor = RgbColor(0.0f, 0.0f, 0.0f);
-	mSpecularColor = RgbColor(1.0f, 1.0f, 1.0f);
+	mAmbientColor = RgbaColor(.2f, .2f, .2f, 1.0f);
+	mDiffuseColor = RgbaColor(1.0f, 1.0f, 1.0f, 1.0f);
+	//mSpecularColor = RgbaColor(0.0f, 0.0f, 0.0f, 1.0f);
+	mSpecularColor = RgbaColor(0.5f, 0.5f, 0.5f, 1.0f);
 }
 
@@ -38,8 +40,8 @@
 
 
-Material::Material(const RgbColor &color):
+Material::Material(const RgbaColor &color):
 mDiffuseColor(color),
 mAmbientColor(color),
-mSpecularColor(0, 0, 0), 
+mSpecularColor(0, 0, 0, 1), 
 mId(0),
 mTexture(NULL)
@@ -66,6 +68,9 @@
 
 
-void Material::Render()
+//void Material::Render(RenderState *state)
+void Material::Render(RenderState *state)
 {
+	state->SetState(mTexture != NULL, mAlphaTestEnabled);
+
 	if (mTexture)
 		mTexture->Bind();
@@ -73,12 +78,4 @@
 		glBindTexture(GL_TEXTURE_2D, 0);
 
-/*	float amb[] = {0.2f, 0.2f, 0.2f, 1.0f};
-	float dif[] = {1.0f, 1.0f, 1.0f, 1.0f};
-	float spec[] = {1.0f, 1.0f, 1.0f, 1.0f};
-
-	glMaterialfv(GL_FRONT, GL_AMBIENT, (float *)&amb);
-	glMaterialfv(GL_FRONT, GL_DIFFUSE, (float *)&dif);
-	glMaterialfv(GL_FRONT, GL_SPECULAR, (float *)&spec);
-*/
 	glMaterialfv(GL_FRONT, GL_AMBIENT, (float *)&mAmbientColor.r);
 	glMaterialfv(GL_FRONT, GL_DIFFUSE, (float *)&mDiffuseColor.r);
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp	(revision 2768)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/chcdemo.cpp	(revision 2769)
@@ -19,5 +19,5 @@
 #include "CHCPlusPlusTraverser.h"
 #include "Visualization.h"
-
+#include "RenderState.h"
 
 
@@ -80,8 +80,8 @@
 void SetupLighting();
 void DisplayStats();
+void Output(int x, int y, const char *string);
 
 void begin2D();
 void end2D();
-void output(int x, int y, const char *string);
 void keyboard(unsigned char c, int x, int y);
 void drawHelpMessage();
@@ -180,7 +180,6 @@
 		
 	//glEnable(GL_ALPHA_TEST);
-	//glAlphaFunc(GL_GEQUAL, 0.01);
-
 	glDisable(GL_ALPHA_TEST);
+	glAlphaFunc(GL_GEQUAL, 0.1f);
 
 	glFrontFace(GL_CCW);
@@ -263,5 +262,5 @@
 		else 
 		{
-			output(x, y, message[i]);
+			Output(x, y, message[i]);
 			y += 14;
 		}
@@ -734,5 +733,5 @@
 
 
-void output(const int x, const int y, const char *string) 
+void Output(int x, int y, const char *string) 
 {
 	if (string != 0) 
@@ -744,5 +743,5 @@
 		for (i = 0; i < len; ++ i) 
 		{
-			glutBitmapCharacter(GLUT_BITMAP_8_BY_13, string[i]);
+			glutBitmapCharacter(GLUT_BITMAP_HELVETICA_18, string[i]);
 		}
 	}
@@ -841,4 +840,5 @@
 	char msg3[200];
 	char msg4[200];
+	char msg5[200];
 
 
@@ -856,8 +856,8 @@
 	renderTime = traverser->GetStats().mRenderTime * expFactor + (1.0f - expFactor) * renderTime;
 
-	if (renderTime) fps /= (float)renderTime;
-
-	sprintf_s(msg3, "Threshold: %4d, render time: %ld ms (%3.3f fps), issued queries: %d%s", 
-		traverser->GetVisibilityThreshold(), renderTime, fps, traverser->GetStats().mNumIssuedQueries, optstr[useOptimization]);
+	if (renderTime) fps = 1e3f / (float)renderTime;
+
+	sprintf_s(msg2, "threshold: %4d%s", 
+		traverser->GetVisibilityThreshold(), optstr[useOptimization]);
 
 	string str;
@@ -868,6 +868,10 @@
 	CalcDecimalPoint(str2, traverser->GetStats().mNumRenderedTriangles);
 
-	sprintf_s(msg4, "rendered objects %5d (of %5d), rendered triangles: %s (of %s)", 
+	sprintf_s(msg3, "rendered objects: %6d (of %6d), rendered triangles: %s (of %s)", 
 			  traverser->GetStats().mNumRenderedGeometry, sceneEntities.size(), str.c_str(), str2.c_str()); 
+
+	sprintf_s(msg4, "issued queries: %5d", traverser->GetStats().mNumIssuedQueries);
+
+	sprintf_s(msg5, "fps: %6.1f", fps);
 
 
@@ -880,12 +884,14 @@
 	else
 	{
-		glColor3f(1.0f, 1.0f , 1.0f);
-		output(10, winHeight - 10, msg[renderMode]);
+		glColor3f(1.0f, 1.0f, 1.0f);
+		
+		Output(800, 30, msg[renderMode]);
 
 		if(showStatistics)
 		{
-			output(20, winHeight - 70, msg3);
-			output(20, winHeight - 50, msg4);
-			output(20, winHeight - 30, msg2);
+			Output(20, 30, msg2);
+			Output(20, 60, msg3);
+			Output(20, 90, msg4);
+			Output(20, 120, msg5);
 		}
 	}
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/BinaryLoader.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/BinaryLoader.cpp	(revision 2764)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/BinaryLoader.cpp	(revision 2769)
@@ -107,34 +107,24 @@
 		mat->SetTexture(mTextureTable[texId]);
 	
+	str.read(reinterpret_cast<char *>(&mat->mAlphaTestEnabled), sizeof(bool));
 
 	// material
-	/*char hasMaterial;
-	str.read(&hasMaterial, sizeof(char));
+	bool hasMaterial;
+	str.read(reinterpret_cast<char *>(&hasMaterial), sizeof(bool));
 	
 	if (hasMaterial)
 	{
-		Color3f amb(0.0f, 0.0f, 0.0f);
-		Color3f dif(0.5f, 0.5f, 0.5f);
-		Color3f spec(0.0f, 0.0f, 0.0f);
-		Color3f emi(0.0f, 0.0f, 0.0f);
-
-		float shine = 0;
-
-		//str.read(reinterpret_cast<char *>(&amb), sizeof(Color3f));
-		str.read(reinterpret_cast<char *>(&dif), sizeof(Color3f));
-		//str.read(reinterpret_cast<char *>(&emi), sizeof(Color3f));
-		//str.read(reinterpret_cast<char *>(&spec), sizeof(Color3f));
-		//str.read(reinterpret_cast<char *>(&shine), sizeof(float));
-
-		mat->setAmbientColor(amb);
-		mat->setDiffuseColor(dif);
-		mat->setEmissiveColor(emi);
-		mat->setSpecularColor(spec);
-		mat->setShininess(shine);
-
-		app->setMaterial(mat);
-	}
-
-	return app;*/
+		// only write rgb part of the material
+		str.read(reinterpret_cast<char *>(&mat->mAmbientColor), sizeof(Vector3));
+		str.read(reinterpret_cast<char *>(&mat->mDiffuseColor), sizeof(Vector3));
+		str.read(reinterpret_cast<char *>(&mat->mSpecularColor), sizeof(Vector3));
+		
+		/*RgbColor dum;
+		str.read(reinterpret_cast<char *>(&dum), sizeof(RgbColor));
+		str.read(reinterpret_cast<char *>(&dum), sizeof(RgbColor));
+		str.read(reinterpret_cast<char *>(&dum), sizeof(RgbColor));
+		*/
+	}
+
 	return mat;
 }
Index: GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.h
===================================================================
--- GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.h	(revision 2767)
+++ GTP/trunk/App/Demos/Vis/CHC_revisited/RenderTraverser.h	(revision 2769)
@@ -96,10 +96,4 @@
 	*/
 	OcclusionQuery *IssueOcclusionQuery(BvhNode *node, bool wasVisible);
-	/** switches to normal render mode
-	*/
-	void Switch2GLRenderState();
-	/** switches to occlusion query mode (geometry not rendered on the screen)
-	*/
-	void Switch2GLQueryState();
 	/** Retunrs true if the current bvh node intersects the near plane.
 	*/
