Browse Source

Removed Ogres MultiRenderTarget

Marko Pintera 13 years ago
parent
commit
f6bd2d79a6

+ 0 - 2
CamelotGLRenderer/CamelotGLRenderer.vcxproj

@@ -151,7 +151,6 @@
     <ClInclude Include="Include\CmGLContext.h" />
     <ClInclude Include="Include\CmGLDefaultHardwareBufferManager.h" />
     <ClInclude Include="Include\CmGLDepthStencilBuffer.h" />
-    <ClInclude Include="Include\CmGLMultiRenderTarget.h" />
     <ClInclude Include="Include\CmGLFrameBufferObject.h" />
     <ClInclude Include="Include\CmGLGpuProgram.h" />
     <ClInclude Include="Include\CmGLGpuProgramManager.h" />
@@ -195,7 +194,6 @@
     <ClCompile Include="Source\CmGLContext.cpp" />
     <ClCompile Include="Source\CmGLDefaultHardwareBufferManager.cpp" />
     <ClCompile Include="Source\CmGLDepthStencilBuffer.cpp" />
-    <ClCompile Include="Source\CmGLMultiRenderTarget.cpp" />
     <ClCompile Include="Source\CmGLFrameBufferObject.cpp" />
     <ClCompile Include="Source\CmGLGpuProgram.cpp" />
     <ClCompile Include="Source\CmGLGpuProgramManager.cpp" />

+ 0 - 6
CamelotGLRenderer/CamelotGLRenderer.vcxproj.filters

@@ -132,9 +132,6 @@
     <ClInclude Include="Include\CmGLSLProgramRTTI.h">
       <Filter>Header Files\RTTI</Filter>
     </ClInclude>
-    <ClInclude Include="Include\CmGLMultiRenderTarget.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
     <ClInclude Include="Include\CmGLRenderWindowManager.h">
       <Filter>Header Files</Filter>
     </ClInclude>
@@ -242,9 +239,6 @@
     <ClCompile Include="CmGLPlugin.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
-    <ClCompile Include="Source\CmGLMultiRenderTarget.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
     <ClCompile Include="Source\CmGLRenderWindowManager.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>

+ 0 - 54
CamelotGLRenderer/Include/CmGLMultiRenderTarget.h

@@ -1,54 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-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.
------------------------------------------------------------------------------
-*/
-
-#ifndef __GLMULTIRENDERTARGET_H__
-#define __GLMULTIRENDERTARGET_H__
-
-#include "CmGLFrameBufferObject.h"
-
-namespace CamelotEngine {
-	/** MultiRenderTarget for GL. Requires the FBO extension.
-	*/
-	class CM_RSGL_EXPORT GLMultiRenderTarget : public MultiRenderTarget
-	{
-	public:
-		GLMultiRenderTarget(GLRTTManager *manager, const String &name);
-		~GLMultiRenderTarget();
-
-		virtual void getCustomAttribute_internal( const String& name, void *pData );
-
-		bool requiresTextureFlipping() const { return true; }
-	private:
-		virtual void bindSurfaceImpl(UINT32 attachment, RenderTexture *target);
-		virtual void unbindSurfaceImpl(UINT32 attachment); 
-		GLFrameBufferObject fbo;
-	};
-
-}
-
-#endif // __GLTEXTURE_H__

+ 1 - 1
CamelotGLRenderer/Include/CmGLRenderTexture.h

@@ -48,7 +48,7 @@ namespace CamelotEngine
 		virtual ~GLRenderTexture();
 
 		bool requiresTextureFlipping() const { return true; }
-		virtual void getCustomAttribute_internal(const String& name, void* pData);
+		virtual void getCustomAttribute(const String& name, void* pData);
 
 	protected:
 		GLFrameBufferObject* mFB;

+ 1 - 1
CamelotGLRenderer/Include/CmGLTexture.h

@@ -47,7 +47,7 @@ namespace CamelotEngine {
 
         GLuint getGLID() const;
 		
-		void getCustomAttribute_internal(const String& name, void* pData);
+		void getCustomAttribute(const String& name, void* pData);
 
 		/** Return hardware pixel buffer for a surface. This buffer can then
 			be used to copy data from and to a particular level of the texture.

+ 1 - 1
CamelotGLRenderer/Include/CmWin32Window.h

@@ -61,7 +61,7 @@ namespace CamelotEngine {
 		// Method for dealing with resize / move & 3d library
 		virtual void windowMovedOrResized(void);
 
-		void getCustomAttribute_internal( const String& name, void* pData );
+		void getCustomAttribute( const String& name, void* pData );
 
         /** Used to set the active state of the render target.
         */

+ 0 - 73
CamelotGLRenderer/Source/CmGLMultiRenderTarget.cpp

@@ -1,73 +0,0 @@
-/*
------------------------------------------------------------------------------
-This source file is part of OGRE
-    (Object-oriented Graphics Rendering Engine)
-For the latest info, see http://www.ogre3d.org/
-
-Copyright (c) 2000-2011 Torus Knot Software Ltd
-
-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 "CmRenderTexture.h"
-#include "CmGLMultiRenderTarget.h"
-#include "CmGLPixelFormat.h"
-#include "CmGLHardwarePixelBuffer.h"
-
-namespace CamelotEngine {
-
-	GLMultiRenderTarget::GLMultiRenderTarget(GLRTTManager *manager, const String &name):
-		MultiRenderTarget(name),
-		fbo(0 /* TODO: multisampling on MRTs? */)
-	{
-	}
-
-	GLMultiRenderTarget::~GLMultiRenderTarget()
-	{
-	}
-
-	void GLMultiRenderTarget::bindSurfaceImpl(UINT32 attachment, RenderTexture *target)
-	{
-		/// Check if the render target is in the rendertarget->FBO map
-        GLFrameBufferObject *fbobj = 0;
-        target->getCustomAttribute_internal("FBO", &fbobj);
-		assert(fbobj);
-		fbo.bindSurface(attachment, fbobj->getSurface(0));
-
-		mWidth = fbo.getWidth();
-		mHeight = fbo.getHeight();
-	}
-
-	void GLMultiRenderTarget::unbindSurfaceImpl(UINT32 attachment)
-	{
-		fbo.unbindSurface(attachment);
-
-		mWidth = fbo.getWidth();
-		mHeight = fbo.getHeight();
-	}
-
-	void GLMultiRenderTarget::getCustomAttribute_internal(const String& name, void *pData)
-	{
-		if(name == "FBO")
-        {
-            *static_cast<GLFrameBufferObject **>(pData) = &fbo;
-        }
-	}
-}

+ 2 - 2
CamelotGLRenderer/Source/CmGLRenderSystem.cpp

@@ -528,14 +528,14 @@ namespace CamelotEngine {
 
 		// Switch context if different from current one
 		GLContext *newContext = 0;
-		target->getCustomAttribute_internal("GLCONTEXT", &newContext);
+		target->getCustomAttribute("GLCONTEXT", &newContext);
 		if(newContext && mCurrentContext != newContext) 
 		{
 			switchContext(newContext);
 		}
 
 		GLFrameBufferObject *fbo = 0;
-		target->getCustomAttribute_internal("FBO", &fbo);
+		target->getCustomAttribute("FBO", &fbo);
 		if(fbo)
 			fbo->bind();
 		else

+ 1 - 2
CamelotGLRenderer/Source/CmGLRenderTexture.cpp

@@ -29,7 +29,6 @@ THE SOFTWARE.
 #include "CmGLPixelFormat.h"
 #include "CmGLDepthStencilBuffer.h"
 #include "CmGLHardwarePixelBuffer.h"
-#include "CmGLMultiRenderTarget.h"
 
 namespace CamelotEngine 
 {
@@ -65,7 +64,7 @@ namespace CamelotEngine
 		mFB->bindDepthStencil(glDepthStencilBuffer->getGLRenderBuffer());
 	}
 
-	void GLRenderTexture::getCustomAttribute_internal(const String& name, void* pData)
+	void GLRenderTexture::getCustomAttribute(const String& name, void* pData)
 	{
 		if(name=="FBO")
 		{

+ 1 - 1
CamelotGLRenderer/Source/CmGLRenderWindowManager.cpp

@@ -21,7 +21,7 @@ namespace CamelotEngine
 
 		mRenderSystem->attachRenderTarget(*win);
 		GLContext* context;
-		win->getCustomAttribute_internal("GLCONTEXT", &context);
+		win->getCustomAttribute("GLCONTEXT", &context);
 		mRenderSystem->registerContext(context);
 
 		RenderWindowPtr winPtr(win);

+ 1 - 1
CamelotGLRenderer/Source/CmGLTexture.cpp

@@ -299,7 +299,7 @@ namespace CamelotEngine {
 		return mSurfaceList[idx];
 	}
 	//---------------------------------------------------------------------------------------------
-	void GLTexture::getCustomAttribute_internal(const String& name, void* pData)
+	void GLTexture::getCustomAttribute(const String& name, void* pData)
 	{
 		THROW_IF_NOT_RENDER_THREAD;
 

+ 1 - 1
CamelotGLRenderer/Source/CmWin32Window.cpp

@@ -744,7 +744,7 @@ namespace CamelotEngine {
 		}
 	}
 
-	void Win32Window::getCustomAttribute_internal( const String& name, void* pData )
+	void Win32Window::getCustomAttribute( const String& name, void* pData )
 	{
 		if( name == "GLCONTEXT" ) {
 			*static_cast<GLContext**>(pData) = mContext;