Daniele Bartolini пре 12 година
родитељ
комит
f481f93dcb

+ 0 - 2
src/renderers/gl/CMakeLists.txt

@@ -3,13 +3,11 @@ cmake_minimum_required(VERSION 2.8)
 project(crown-gl)
 
 set (GL_SRC
-	GLOcclusionQuery.cpp
 	GLRenderer.cpp
 	GLUtils.cpp
 )
 
 set (GL_HEADERS
-	GLOcclusionQuery.h
 	GLRenderer.h
 	GLUtils.h
 )

+ 0 - 72
src/renderers/gl/GLOcclusionQuery.cpp

@@ -1,72 +0,0 @@
-/*
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include <GL/glew.h>
-#include "GLOcclusionQuery.h"
-
-namespace crown
-{
-
-GLOcclusionQuery::GLOcclusionQuery() :
-	mQueryObject(0)
-{
-	glGenQueries(1, &mQueryObject);
-}
-
-GLOcclusionQuery::~GLOcclusionQuery()
-{
-	glDeleteQueries(1, &mQueryObject);
-}
-
-void GLOcclusionQuery::BeginQuery()
-{
-	glBeginQuery(GL_SAMPLES_PASSED, mQueryObject);
-}
-
-void GLOcclusionQuery::EndQuery()
-{
-	glEndQuery(GL_SAMPLES_PASSED);
-}
-
-uint32_t GLOcclusionQuery::GetQueryResult()
-{
-	uint32_t passedCount;
-
-	glGetQueryObjectuiv(mQueryObject, GL_QUERY_RESULT, &passedCount);
-
-	return passedCount;
-}
-
-bool GLOcclusionQuery::IsResultAvailable()
-{
-	uint32_t available;
-
-	glGetQueryObjectuiv(mQueryObject, GL_QUERY_RESULT_AVAILABLE, &available);
-
-	return available != 0;
-}
-
-} // namespace crown
-

+ 0 - 62
src/renderers/gl/GLOcclusionQuery.h

@@ -1,62 +0,0 @@
-/*
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-#include "OcclusionQuery.h"
-
-namespace crown
-{
-
-class GLOcclusionQuery : public OcclusionQuery
-{
-
-public:
-
-	//! See OcclusionQuery
-	GLOcclusionQuery();
-
-	//! See OcclusionQuery
-	~GLOcclusionQuery();
-
-	//! See OcclusionQuery
-	virtual void BeginQuery();
-
-	//! See OcclusionQuery
-	virtual void EndQuery();
-
-	//! See OcclusionQuery
-	virtual uint32_t GetQueryResult();
-
-	//! See OcclusionQuery
-	virtual bool IsResultAvailable();
-
-private:
-
-	GLuint	mQueryObject;
-};
-
-} // namespace crown
-

+ 0 - 1
src/renderers/gl/GLRenderer.cpp

@@ -30,7 +30,6 @@ OTHER DEALINGS IN THE SOFTWARE.
 #include <algorithm>
 
 #include "Types.h"
-#include "GLOcclusionQuery.h"
 #include "GLRenderer.h"
 #include "GLUtils.h"
 #include "Log.h"