Просмотр исходного кода

Cleanup: Getting rid of the Core suffix on core thread objects since they're now in their own namespace (Contd.)

BearishSun 9 лет назад
Родитель
Сommit
02dedf10dc
34 измененных файлов с 362 добавлено и 345 удалено
  1. 4 4
      Source/BansheeGLRenderAPI/Include/BsGLGpuBuffer.h
  2. 3 3
      Source/BansheeGLRenderAPI/Include/BsGLGpuParamBlockBuffer.h
  3. 1 1
      Source/BansheeGLRenderAPI/Include/BsGLHardwareBufferManager.h
  4. 3 3
      Source/BansheeGLRenderAPI/Include/BsGLIndexBuffer.h
  5. 2 4
      Source/BansheeGLRenderAPI/Include/BsGLPrerequisites.h
  6. 7 7
      Source/BansheeGLRenderAPI/Include/BsGLRenderAPI.h
  7. 29 29
      Source/BansheeGLRenderAPI/Include/BsGLRenderTexture.h
  8. 9 6
      Source/BansheeGLRenderAPI/Include/BsGLRenderWindowManager.h
  9. 4 4
      Source/BansheeGLRenderAPI/Include/BsGLTexture.h
  10. 9 6
      Source/BansheeGLRenderAPI/Include/BsGLTextureManager.h
  11. 3 3
      Source/BansheeGLRenderAPI/Include/BsGLVertexArrayObjectManager.h
  12. 3 3
      Source/BansheeGLRenderAPI/Include/BsGLVertexBuffer.h
  13. 1 1
      Source/BansheeGLRenderAPI/Include/Win32/BsWin32GLSupport.h
  14. 1 2
      Source/BansheeGLRenderAPI/Include/Win32/BsWin32Prerequisites.h
  15. 54 53
      Source/BansheeGLRenderAPI/Include/Win32/BsWin32RenderWindow.h
  16. 1 1
      Source/BansheeGLRenderAPI/Source/BsGLBuffer.cpp
  17. 9 9
      Source/BansheeGLRenderAPI/Source/BsGLGpuBuffer.cpp
  18. 4 4
      Source/BansheeGLRenderAPI/Source/BsGLGpuParamBlockBuffer.cpp
  19. 13 13
      Source/BansheeGLRenderAPI/Source/BsGLHardwareBufferManager.cpp
  20. 7 7
      Source/BansheeGLRenderAPI/Source/BsGLIndexBuffer.cpp
  21. 23 23
      Source/BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp
  22. 16 13
      Source/BansheeGLRenderAPI/Source/BsGLRenderTexture.cpp
  23. 11 7
      Source/BansheeGLRenderAPI/Source/BsGLRenderWindowManager.cpp
  24. 13 13
      Source/BansheeGLRenderAPI/Source/BsGLTexture.cpp
  25. 14 11
      Source/BansheeGLRenderAPI/Source/BsGLTextureManager.cpp
  26. 7 7
      Source/BansheeGLRenderAPI/Source/BsGLVertexArrayObjectManager.cpp
  27. 9 9
      Source/BansheeGLRenderAPI/Source/BsGLVertexBuffer.cpp
  28. 3 3
      Source/BansheeGLRenderAPI/Source/GLSL/include/BsGLSLGpuProgram.h
  29. 2 2
      Source/BansheeGLRenderAPI/Source/GLSL/include/BsGLSLProgramPipelineManager.h
  30. 10 10
      Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLGpuProgram.cpp
  31. 4 4
      Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLProgramFactory.cpp
  32. 2 2
      Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLProgramPipelineManager.cpp
  33. 4 4
      Source/BansheeGLRenderAPI/Source/Win32/BsWin32GLSupport.cpp
  34. 77 74
      Source/BansheeGLRenderAPI/Source/Win32/BsWin32RenderWindow.cpp

+ 4 - 4
Source/BansheeGLRenderAPI/Include/BsGLGpuBuffer.h

@@ -13,10 +13,10 @@ namespace bs { namespace ct
 	 */
 
 	/**	OpenGL implementation of a generic GPU buffer. */
-	class BS_RSGL_EXPORT GLGpuBufferCore : public GpuBufferCore
+	class BS_RSGL_EXPORT GLGpuBuffer : public GpuBufferCore
 	{
 	public:
-		~GLGpuBufferCore();
+		~GLGpuBuffer();
 
 		/** @copydoc GpuBufferCore::lock */
 		void* lock(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx = 0, UINT32 queueIdx = 0) override;
@@ -48,9 +48,9 @@ namespace bs { namespace ct
 		GLuint getGLFormat() const { return mFormat; }
 
 	protected:
-		friend class GLHardwareBufferCoreManager;
+		friend class GLHardwareBufferManager;
 
-		GLGpuBufferCore(const GPU_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
+		GLGpuBuffer(const GPU_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
 
 		/** @copydoc GpuBufferCore::initialize */
 		void initialize() override;

+ 3 - 3
Source/BansheeGLRenderAPI/Include/BsGLGpuParamBlockBuffer.h

@@ -12,11 +12,11 @@ namespace bs { namespace ct
 	 */
 
 	/**	OpenGL implementation of a GPU parameter buffer (Uniform buffer). */
-	class BS_RSGL_EXPORT GLGpuParamBlockBufferCore : public GpuParamBlockBufferCore
+	class BS_RSGL_EXPORT GLGpuParamBlockBuffer : public GpuParamBlockBufferCore
 	{
 	public:
-		GLGpuParamBlockBufferCore(UINT32 size, GpuParamBlockUsage usage, GpuDeviceFlags deviceMask);
-		~GLGpuParamBlockBufferCore();
+		GLGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage, GpuDeviceFlags deviceMask);
+		~GLGpuParamBlockBuffer();
 
 		/** @copydoc GpuParamBlockBufferCore::writeToGPU */
 		void writeToGPU(const UINT8* data, UINT32 queueIdx = 0) override;

+ 1 - 1
Source/BansheeGLRenderAPI/Include/BsGLHardwareBufferManager.h

@@ -12,7 +12,7 @@ namespace bs { namespace ct
 	 */
 
 	/**	Handles creation of OpenGL specific hardware buffers. */
-    class BS_RSGL_EXPORT GLHardwareBufferCoreManager : public HardwareBufferCoreManager
+    class BS_RSGL_EXPORT GLHardwareBufferManager : public HardwareBufferCoreManager
     {
     public:
 		/**	Converts engine buffer usage flags into OpenGL specific flags. */

+ 3 - 3
Source/BansheeGLRenderAPI/Include/BsGLIndexBuffer.h

@@ -13,11 +13,11 @@ namespace bs { namespace ct
 	 */
 
 	/**	OpenGL implementation of an index buffer. */
-    class BS_RSGL_EXPORT GLIndexBufferCore : public IndexBufferCore
+    class BS_RSGL_EXPORT GLIndexBuffer : public IndexBufferCore
     {
     public:
-		GLIndexBufferCore(const INDEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
-		~GLIndexBufferCore();
+		GLIndexBuffer(const INDEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
+		~GLIndexBuffer();
 
 		/** @copydoc IndexBufferCore::readData */
         void readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx = 0, UINT32 queueIdx = 0) override;

+ 2 - 4
Source/BansheeGLRenderAPI/Include/BsGLPrerequisites.h

@@ -75,15 +75,13 @@ namespace bs { namespace ct
 
     class GLSupport;
     class GLRenderAPI;
-    class GLTextureCore;
+    class GLTexture;
 	class GLVertexBuffer;
-	class GLVertexBufferCore;
-    class GLTextureManager;
     class GLContext;
     class GLRTTManager;
     class GLPixelBuffer;
 	class GLGpuParamBlock;
-	class GLSLGpuProgramCore;
+	class GLSLGpuProgram;
 	class GLVertexArrayObject;
 	struct GLSLProgramPipeline;
 	class GLSLProgramPipelineManager;

+ 7 - 7
Source/BansheeGLRenderAPI/Include/BsGLRenderAPI.h

@@ -145,7 +145,7 @@ namespace bs { namespace ct
 		bool activateGLTextureUnit(UINT16 unit);
 
 		/**	Retrieves the active GPU program of the specified type. */
-		SPtr<GLSLGpuProgramCore> getActiveProgram(GpuProgramType gptype) const;
+		SPtr<GLSLGpuProgram> getActiveProgram(GpuProgramType gptype) const;
 
 		/**	Converts Banshee blend mode to OpenGL blend mode. */
 		GLint getBlendMode(BlendFactor blendMode) const;
@@ -393,12 +393,12 @@ namespace bs { namespace ct
 		GLSLProgramFactory* mGLSLProgramFactory;
 		GLSLProgramPipelineManager* mProgramPipelineManager;
 
-		SPtr<GLSLGpuProgramCore> mCurrentVertexProgram;
-		SPtr<GLSLGpuProgramCore> mCurrentFragmentProgram;
-		SPtr<GLSLGpuProgramCore> mCurrentGeometryProgram;
-		SPtr<GLSLGpuProgramCore> mCurrentHullProgram;
-		SPtr<GLSLGpuProgramCore> mCurrentDomainProgram;
-		SPtr<GLSLGpuProgramCore> mCurrentComputeProgram;
+		SPtr<GLSLGpuProgram> mCurrentVertexProgram;
+		SPtr<GLSLGpuProgram> mCurrentFragmentProgram;
+		SPtr<GLSLGpuProgram> mCurrentGeometryProgram;
+		SPtr<GLSLGpuProgram> mCurrentHullProgram;
+		SPtr<GLSLGpuProgram> mCurrentDomainProgram;
+		SPtr<GLSLGpuProgram> mCurrentComputeProgram;
 
 		const GLSLProgramPipeline* mActivePipeline;
 

+ 29 - 29
Source/BansheeGLRenderAPI/Include/BsGLRenderTexture.h

@@ -9,30 +9,51 @@
 
 #define GL_DEPTH24_STENCIL8_EXT 0x88F0
 
-namespace bs { namespace ct
+namespace bs
 {  
 	/** @addtogroup GL
 	 *  @{
 	 */
 
-	class GLRenderTexture;
+	/**
+	 * OpenGL implementation of a render texture.
+	 *
+	 * @note	Sim thread only.
+	 */
+	class GLRenderTexture : public RenderTexture
+	{
+	public:
+		virtual ~GLRenderTexture() { }
+
+	protected:
+		friend class GLTextureManager;
+
+		GLRenderTexture(const RENDER_TEXTURE_DESC& desc);
+
+		/** @copydoc RenderTexture::getProperties */
+		const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
 
+		RenderTextureProperties mProperties;
+	};
+
+	namespace ct
+	{
 	/**
 	 * OpenGL implementation of a render texture.
 	 *
 	 * @note	Core thread only.
 	 */
-    class BS_RSGL_EXPORT GLRenderTextureCore : public RenderTextureCore
+    class BS_RSGL_EXPORT GLRenderTexture : public RenderTextureCore
     {
 	public:
-		GLRenderTextureCore(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx);
-		virtual ~GLRenderTextureCore();
+		GLRenderTexture(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx);
+		virtual ~GLRenderTexture();
 
 		/** @copydoc RenderTextureCore::getCustomAttribute */
 		void getCustomAttribute(const String& name, void* data) const override;
 
 	protected:
-		friend class GLRenderTexture;
+		friend class bs::GLRenderTexture;
 
 		/** @copydoc RenderTextureCore::initialize */
 		void initialize() override;
@@ -102,27 +123,6 @@ namespace bs { namespace ct
 		GLuint mBlitReadFBO;
 		GLuint mBlitWriteFBO;
     };
-
-	/**
-	 * OpenGL implementation of a render texture.
-	 *
-	 * @note	Sim thread only.
-	 */
-	class GLRenderTexture : public RenderTexture
-	{
-	public:
-		virtual ~GLRenderTexture() { }
-
-	protected:
-		friend class GLTextureManager;
-
-		GLRenderTexture(const RENDER_TEXTURE_DESC& desc);
-
-		/** @copydoc RenderTexture::getProperties */
-		const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
-
-		RenderTextureProperties mProperties;
-	};
-
+	}
 	/** @} */
-}}
+}

+ 9 - 6
Source/BansheeGLRenderAPI/Include/BsGLRenderWindowManager.h

@@ -5,7 +5,7 @@
 #include "BsGLPrerequisites.h"
 #include "BsRenderWindowManager.h"
 
-namespace bs { namespace ct
+namespace bs
 {
 	/** @addtogroup GL
 	 *  @{
@@ -15,21 +15,23 @@ namespace bs { namespace ct
 	class BS_RSGL_EXPORT GLRenderWindowManager : public RenderWindowManager
 	{
 	public:
-		GLRenderWindowManager(GLRenderAPI* renderSystem);
+		GLRenderWindowManager(ct::GLRenderAPI* renderSystem);
 
 	protected:
 		/** @copydoc RenderWindowManager::createImpl() */
 		SPtr<RenderWindow> createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const SPtr<RenderWindow>& parentWindow) override;
 
 	private:
-		GLRenderAPI* mRenderSystem;
+		ct::GLRenderAPI* mRenderSystem;
 	};
 
+	namespace ct
+	{
 	/**	Manager that handles window creation for OpenGL. */
-	class BS_RSGL_EXPORT GLRenderWindowCoreManager : public RenderWindowCoreManager
+	class BS_RSGL_EXPORT GLRenderWindowManager : public RenderWindowCoreManager
 	{
 	public:
-		GLRenderWindowCoreManager(GLRenderAPI* renderSystem);
+		GLRenderWindowManager(GLRenderAPI* renderSystem);
 
 	protected:
 		/** @copydoc RenderWindowCoreManager::createInternal */
@@ -38,6 +40,7 @@ namespace bs { namespace ct
 	private:
 		GLRenderAPI* mRenderSystem;
 	};
+	}
 
 	/** @} */
-}}
+}

+ 4 - 4
Source/BansheeGLRenderAPI/Include/BsGLTexture.h

@@ -13,10 +13,10 @@ namespace bs { namespace ct
 	 */
 
 	/**	OpenGL implementation of a texture. */
-    class BS_RSGL_EXPORT GLTextureCore : public TextureCore
+    class BS_RSGL_EXPORT GLTexture : public TextureCore
     {
     public:
-		virtual ~GLTextureCore();
+		virtual ~GLTexture();
 
 		/**	Returns OpenGL texture target type. */
         GLenum getGLTextureTarget() const;
@@ -39,9 +39,9 @@ namespace bs { namespace ct
 		SPtr<GLPixelBuffer> getBuffer(UINT32 face, UINT32 mipmap);
 
     protected:
-		friend class GLTextureCoreManager;
+		friend class GLTextureManager;
 
-		GLTextureCore(GLSupport& support, const TEXTURE_DESC& desc, const SPtr<PixelData>& initialData, 
+		GLTexture(GLSupport& support, const TEXTURE_DESC& desc, const SPtr<PixelData>& initialData, 
 			GpuDeviceFlags deviceMask);
 
 		/** @copydoc TextureCore::initialize */

+ 9 - 6
Source/BansheeGLRenderAPI/Include/BsGLTextureManager.h

@@ -7,7 +7,7 @@
 #include "BsGLSupport.h"
 #include "BsTextureManager.h"
 
-namespace bs { namespace ct
+namespace bs
 {
 	/** @addtogroup GL
 	 *  @{
@@ -17,7 +17,7 @@ namespace bs { namespace ct
     class BS_RSGL_EXPORT GLTextureManager : public TextureManager
     {
     public:
-        GLTextureManager(GLSupport& support);
+        GLTextureManager(ct::GLSupport& support);
         virtual ~GLTextureManager();
 
 		/**
@@ -29,14 +29,16 @@ namespace bs { namespace ct
 		/** @copydoc TextureManager::createRenderTextureImpl */
 		SPtr<RenderTexture> createRenderTextureImpl(const RENDER_TEXTURE_DESC& desc) override;
 
-        GLSupport& mGLSupport;
+		ct::GLSupport& mGLSupport;
     };
 
+	namespace ct
+	{
 	/** Handles creation of OpenGL textures. */
-	class BS_RSGL_EXPORT GLTextureCoreManager : public TextureCoreManager
+	class BS_RSGL_EXPORT GLTextureManager : public TextureCoreManager
 	{
 	public:
-		GLTextureCoreManager(GLSupport& support);
+		GLTextureManager(GLSupport& support);
 
 	protected:		
 		/** @copydoc TextureCoreManager::createTextureInternal */
@@ -49,6 +51,7 @@ namespace bs { namespace ct
 
 		GLSupport& mGLSupport;
 	};
+	}
 
 	/** @} */
-}}
+}

+ 3 - 3
Source/BansheeGLRenderAPI/Include/BsGLVertexArrayObjectManager.h

@@ -43,11 +43,11 @@ namespace bs { namespace ct
 		friend class GLVertexArrayObjectManager;
 
 		GLVertexArrayObject();
-		GLVertexArrayObject(GLuint handle, UINT64 vertexProgramId, GLVertexBufferCore** attachedBuffers, UINT32 numBuffers);
+		GLVertexArrayObject(GLuint handle, UINT64 vertexProgramId, GLVertexBuffer** attachedBuffers, UINT32 numBuffers);
 
 		GLuint mHandle;
 		UINT64 mVertProgId;
-		GLVertexBufferCore** mAttachedBuffers;
+		GLVertexBuffer** mAttachedBuffers;
 		UINT32 mNumBuffers;
 	};
 
@@ -63,7 +63,7 @@ namespace bs { namespace ct
 		 *
 		 * Lifetime of returned VAO is managed by the vertex buffers that it binds.
 		 */
-		const GLVertexArrayObject& getVAO(const SPtr<GLSLGpuProgramCore>& vertexProgram,
+		const GLVertexArrayObject& getVAO(const SPtr<GLSLGpuProgram>& vertexProgram,
 			const SPtr<VertexDeclarationCore>& vertexDecl, const std::array<SPtr<VertexBufferCore>, 32>& boundBuffers);
 
 		/**	Called when a vertex buffer containing the provided VAO is destroyed. */

+ 3 - 3
Source/BansheeGLRenderAPI/Include/BsGLVertexBuffer.h

@@ -14,11 +14,11 @@ namespace bs { namespace ct
 	 */
 
 	/**	OpenGL implementation of a vertex buffer. */
-    class BS_RSGL_EXPORT GLVertexBufferCore : public VertexBufferCore
+    class BS_RSGL_EXPORT GLVertexBuffer : public VertexBufferCore
     {
     public:
-		GLVertexBufferCore(const VERTEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
-		~GLVertexBufferCore();
+		GLVertexBuffer(const VERTEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask);
+		~GLVertexBuffer();
 
 		/** @copydoc VertexBufferCore::readData */
         void readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx = 0, UINT32 queueIdx = 0) override;

+ 1 - 1
Source/BansheeGLRenderAPI/Include/Win32/BsWin32GLSupport.h

@@ -69,7 +69,7 @@ namespace bs { namespace ct
 		static LRESULT CALLBACK dummyWndProc(HWND hwnd, UINT umsg, WPARAM wp, LPARAM lp);
 
 		Vector<DEVMODE> mDevModes;
-		Win32RenderWindowCore *mInitialWindow;
+		Win32RenderWindow *mInitialWindow;
 		Vector<int> mMultisampleLevels;
 		bool mHasPixelFormatARB;
         bool mHasMultisample;

+ 1 - 2
Source/BansheeGLRenderAPI/Include/Win32/BsWin32Prerequisites.h

@@ -12,9 +12,8 @@ namespace bs { namespace ct
 	 */
 
     class Win32GLSupport;
-    class Win32RenderWindow;
     class Win32Context;
-	class Win32RenderWindowCore;
+	class Win32RenderWindow;
 
 	/**	Retrieves last Windows API error and returns a description of it. */
 	String translateWGLError();

+ 54 - 53
Source/BansheeGLRenderAPI/Include/Win32/BsWin32RenderWindow.h

@@ -5,14 +5,12 @@
 #include "BsWin32Prerequisites.h"
 #include "BsRenderWindow.h"
 
-namespace bs { namespace ct
+namespace bs
 {
 	/** @addtogroup GL
 	 *  @{
 	 */
 
-	class Win32RenderWindow;
-
 	/**	Contains various properties that describe a render window. */
 	class BS_RSGL_EXPORT Win32RenderWindowProperties : public RenderWindowProperties
 	{
@@ -21,20 +19,65 @@ namespace bs { namespace ct
 		virtual ~Win32RenderWindowProperties() { }
 
 	private:
-		friend class Win32RenderWindowCore;
+		friend class ct::Win32RenderWindow;
 		friend class Win32RenderWindow;
 	};
 
+	/**
+	 * Render window implementation for Windows.
+	 *
+	 * @note	Sim thread only.
+	 */
+	class BS_RSGL_EXPORT Win32RenderWindow : public RenderWindow
+	{
+	public:
+		~Win32RenderWindow() { }
+
+		/** @copydoc RenderWindow::screenToWindowPos */
+		void getCustomAttribute(const String& name, void* pData) const override;
+
+		/** @copydoc RenderWindow::screenToWindowPos */
+		Vector2I screenToWindowPos(const Vector2I& screenPos) const override;
+
+		/** @copydoc RenderWindow::windowToScreenPos */
+		Vector2I windowToScreenPos(const Vector2I& windowPos) const override;
+
+		/** @copydoc RenderWindow::getCore */
+		SPtr<ct::Win32RenderWindow> getCore() const;
+
+	protected:
+		friend class GLRenderWindowManager;
+		friend class ct::Win32GLSupport;
+		friend class ct::Win32RenderWindow;
+
+		Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, ct::Win32GLSupport& glsupport);
+
+		/** @copydoc RenderWindow::getProperties */
+		const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
+
+		/** @copydoc RenderWindow::syncProperties */
+		void syncProperties() override;
+
+		/**	Retrieves internal window handle. */
+		HWND getHWnd() const;
+
+	private:
+		ct::Win32GLSupport& mGLSupport;
+		Win32RenderWindowProperties mProperties;
+	};
+
+	namespace ct
+	{
 	/**
 	 * Render window implementation for Windows.
 	 *
 	 * @note	Core thread only.
 	 */
-    class BS_RSGL_EXPORT Win32RenderWindowCore : public RenderWindowCore
+    class BS_RSGL_EXPORT Win32RenderWindow : public RenderWindowCore
     {
     public:
-		Win32RenderWindowCore(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport &glsupport);
-		~Win32RenderWindowCore();
+		Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport &glsupport);
+		~Win32RenderWindow();
 
 		/** @copydoc RenderWindowCore::setFullscreen(UINT32, UINT32, float, UINT32) */
 		void setFullscreen(UINT32 width, UINT32 height, float refreshRate = 60.0f, UINT32 monitorIdx = 0) override;
@@ -105,7 +148,7 @@ namespace bs { namespace ct
 		void syncProperties() override;
 
 	protected:
-		friend class Win32RenderWindow;
+		friend class bs::Win32RenderWindow;
 
 		Win32Window* mWindow;
 		Win32GLSupport& mGLSupport;
@@ -117,50 +160,8 @@ namespace bs { namespace ct
 		SPtr<Win32Context> mContext;
 		Win32RenderWindowProperties mProperties;
 		Win32RenderWindowProperties mSyncedProperties;
-    };
-
-	/**
-	 * Render window implementation for Windows.
-	 *
-	 * @note	Sim thread only.
-	 */
-	class BS_RSGL_EXPORT Win32RenderWindow : public RenderWindow
-	{
-	public:
-		~Win32RenderWindow() { }
-
-		/** @copydoc RenderWindow::screenToWindowPos */
-		void getCustomAttribute(const String& name, void* pData) const override;
-
-		/** @copydoc RenderWindow::screenToWindowPos */
-		Vector2I screenToWindowPos(const Vector2I& screenPos) const override;
-
-		/** @copydoc RenderWindow::windowToScreenPos */
-		Vector2I windowToScreenPos(const Vector2I& windowPos) const override;
-
-		/** @copydoc RenderWindow::getCore */
-		SPtr<Win32RenderWindowCore> getCore() const;
-
-	protected:
-		friend class GLRenderWindowManager;
-		friend class Win32GLSupport;
-		friend class Win32RenderWindowCore;
-
-		Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport& glsupport);
-
-		/** @copydoc RenderWindow::getProperties */
-		const RenderTargetProperties& getPropertiesInternal() const override { return mProperties; }
-
-		/** @copydoc RenderWindow::syncProperties */
-		void syncProperties() override;
-
-		/**	Retrieves internal window handle. */
-		HWND getHWnd() const;
-
-	private:
-		Win32GLSupport& mGLSupport;
-		Win32RenderWindowProperties mProperties;
-	};
+    };		
+	}
 
 	/** @} */
-}}
+}

+ 1 - 1
Source/BansheeGLRenderAPI/Source/BsGLBuffer.cpp

@@ -38,7 +38,7 @@ namespace bs { namespace ct
 		}
 
 		glBindBuffer(target, mBufferId);
-		glBufferData(target, size, nullptr, GLHardwareBufferCoreManager::getGLUsage(usage));
+		glBufferData(target, size, nullptr, GLHardwareBufferManager::getGLUsage(usage));
 	}
 
 	void* GLBuffer::lock(UINT32 offset, UINT32 length, GpuLockOptions options)

+ 9 - 9
Source/BansheeGLRenderAPI/Source/BsGLGpuBuffer.cpp

@@ -8,7 +8,7 @@
 
 namespace bs { namespace ct
 {
-	GLGpuBufferCore::GLGpuBufferCore(const GPU_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
+	GLGpuBuffer::GLGpuBuffer(const GPU_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
 		: GpuBufferCore(desc, deviceMask), mTextureID(0), mFormat(0)
 	{
 		if(desc.type != GBT_STANDARD)
@@ -25,14 +25,14 @@ namespace bs { namespace ct
 		mFormat = GLPixelUtil::getBufferFormat(desc.format);
 	}
 
-	GLGpuBufferCore::~GLGpuBufferCore()
+	GLGpuBuffer::~GLGpuBuffer()
 	{
 		glDeleteTextures(1, &mTextureID);
 
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_GpuBuffer);
 	}
 
-	void GLGpuBufferCore::initialize()
+	void GLGpuBuffer::initialize()
 	{
 		// Create buffer
 		const auto& props = getProperties();
@@ -48,7 +48,7 @@ namespace bs { namespace ct
 		GpuBufferCore::initialize();
 	}
 
-	void* GLGpuBufferCore::lock(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
+	void* GLGpuBuffer::lock(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
 	{
 #if BS_PROFILING_ENABLED
 		if (options == GBL_READ_ONLY || options == GBL_READ_WRITE)
@@ -66,19 +66,19 @@ namespace bs { namespace ct
 		return mBuffer.lock(offset, length, options);
 	}
 
-	void GLGpuBufferCore::unlock()
+	void GLGpuBuffer::unlock()
 	{
 		mBuffer.unlock();
 	}
 
-	void GLGpuBufferCore::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
+	void GLGpuBuffer::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
 	{
 		mBuffer.readData(offset, length, dest);
 
 		BS_INC_RENDER_STAT_CAT(ResRead, RenderStatObject_GpuBuffer);
 	}
 
-	void GLGpuBufferCore::writeData(UINT32 offset, UINT32 length, const void* source, BufferWriteType writeFlags,
+	void GLGpuBuffer::writeData(UINT32 offset, UINT32 length, const void* source, BufferWriteType writeFlags,
 									UINT32 queueIdx)
 	{
 		mBuffer.writeData(offset, length, source, writeFlags);
@@ -86,10 +86,10 @@ namespace bs { namespace ct
 		BS_INC_RENDER_STAT_CAT(ResWrite, RenderStatObject_GpuBuffer);
 	}
 
-	void GLGpuBufferCore::copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset,
+	void GLGpuBuffer::copyData(HardwareBuffer& srcBuffer, UINT32 srcOffset,
 								   UINT32 dstOffset, UINT32 length, bool discardWholeBuffer, UINT32 queueIdx)
 	{
-		GLGpuBufferCore& glSrcBuffer = static_cast<GLGpuBufferCore&>(srcBuffer);
+		GLGpuBuffer& glSrcBuffer = static_cast<GLGpuBuffer&>(srcBuffer);
 
 		GLuint srcId = glSrcBuffer.getGLBufferId();
 		glCopyBufferSubData(srcId, getGLBufferId(), srcOffset, dstOffset, length);

+ 4 - 4
Source/BansheeGLRenderAPI/Source/BsGLGpuParamBlockBuffer.cpp

@@ -6,20 +6,20 @@
 
 namespace bs { namespace ct
 {
-	GLGpuParamBlockBufferCore::GLGpuParamBlockBufferCore(UINT32 size, GpuParamBlockUsage usage, GpuDeviceFlags deviceMask)
+	GLGpuParamBlockBuffer::GLGpuParamBlockBuffer(UINT32 size, GpuParamBlockUsage usage, GpuDeviceFlags deviceMask)
 		:GpuParamBlockBufferCore(size, usage, deviceMask), mGLHandle(0)
 	{
 		assert((deviceMask == GDF_DEFAULT || deviceMask == GDF_PRIMARY) && "Multiple GPUs not supported natively on OpenGL.");
 	}
 
-	GLGpuParamBlockBufferCore::~GLGpuParamBlockBufferCore()
+	GLGpuParamBlockBuffer::~GLGpuParamBlockBuffer()
 	{
 		glDeleteBuffers(1, &mGLHandle);
 
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_GpuParamBuffer);
 	}
 
-	void GLGpuParamBlockBufferCore::initialize()
+	void GLGpuParamBlockBuffer::initialize()
 	{
 		glGenBuffers(1, &mGLHandle);
 		glBindBuffer(GL_UNIFORM_BUFFER, mGLHandle);
@@ -36,7 +36,7 @@ namespace bs { namespace ct
 		GpuParamBlockBufferCore::initialize();
 	}
 
-	void GLGpuParamBlockBufferCore::writeToGPU(const UINT8* data, UINT32 queueIdx)
+	void GLGpuParamBlockBuffer::writeToGPU(const UINT8* data, UINT32 queueIdx)
 	{
 		glBindBuffer(GL_UNIFORM_BUFFER, mGLHandle);
 		glBufferSubData(GL_UNIFORM_BUFFER, 0 , mSize, data);

+ 13 - 13
Source/BansheeGLRenderAPI/Source/BsGLHardwareBufferManager.cpp

@@ -11,48 +11,48 @@
 
 namespace bs { namespace ct
 {
-	SPtr<VertexBufferCore> GLHardwareBufferCoreManager::createVertexBufferInternal(const VERTEX_BUFFER_DESC& desc, 
+	SPtr<VertexBufferCore> GLHardwareBufferManager::createVertexBufferInternal(const VERTEX_BUFFER_DESC& desc, 
 		GpuDeviceFlags deviceMask)
 	{
-		SPtr<GLVertexBufferCore> ret = bs_shared_ptr_new<GLVertexBufferCore>(desc, deviceMask);
+		SPtr<GLVertexBuffer> ret = bs_shared_ptr_new<GLVertexBuffer>(desc, deviceMask);
 		ret->_setThisPtr(ret);
 
 		return ret;
 	}
 
-	SPtr<IndexBufferCore> GLHardwareBufferCoreManager::createIndexBufferInternal(const INDEX_BUFFER_DESC& desc,
+	SPtr<IndexBufferCore> GLHardwareBufferManager::createIndexBufferInternal(const INDEX_BUFFER_DESC& desc,
 		GpuDeviceFlags deviceMask)
 	{
-		SPtr<GLIndexBufferCore> ret = bs_shared_ptr_new<GLIndexBufferCore>(desc, deviceMask);
+		SPtr<GLIndexBuffer> ret = bs_shared_ptr_new<GLIndexBuffer>(desc, deviceMask);
 		ret->_setThisPtr(ret);
 
 		return ret;
 	}
 
-	SPtr<GpuParamBlockBufferCore> GLHardwareBufferCoreManager::createGpuParamBlockBufferInternal(UINT32 size, 
+	SPtr<GpuParamBlockBufferCore> GLHardwareBufferManager::createGpuParamBlockBufferInternal(UINT32 size, 
 		GpuParamBlockUsage usage, GpuDeviceFlags deviceMask)
 	{
-		GLGpuParamBlockBufferCore* paramBlockBuffer = 
-			new (bs_alloc<GLGpuParamBlockBufferCore>()) GLGpuParamBlockBufferCore(size, usage, deviceMask);
+		GLGpuParamBlockBuffer* paramBlockBuffer = 
+			new (bs_alloc<GLGpuParamBlockBuffer>()) GLGpuParamBlockBuffer(size, usage, deviceMask);
 
-		SPtr<GpuParamBlockBufferCore> paramBlockBufferPtr = bs_shared_ptr<GLGpuParamBlockBufferCore>(paramBlockBuffer);
+		SPtr<GpuParamBlockBufferCore> paramBlockBufferPtr = bs_shared_ptr<GLGpuParamBlockBuffer>(paramBlockBuffer);
 		paramBlockBufferPtr->_setThisPtr(paramBlockBufferPtr);
 
 		return paramBlockBufferPtr;
 	}
 
-	SPtr<GpuBufferCore> GLHardwareBufferCoreManager::createGpuBufferInternal(const GPU_BUFFER_DESC& desc,
+	SPtr<GpuBufferCore> GLHardwareBufferManager::createGpuBufferInternal(const GPU_BUFFER_DESC& desc,
 		GpuDeviceFlags deviceMask)
 	{
-		GLGpuBufferCore* buffer = new (bs_alloc<GLGpuBufferCore>()) GLGpuBufferCore(desc, deviceMask);
+		GLGpuBuffer* buffer = new (bs_alloc<GLGpuBuffer>()) GLGpuBuffer(desc, deviceMask);
 
-		SPtr<GpuBufferCore> bufferPtr = bs_shared_ptr<GLGpuBufferCore>(buffer);
+		SPtr<GpuBufferCore> bufferPtr = bs_shared_ptr<GLGpuBuffer>(buffer);
 		bufferPtr->_setThisPtr(bufferPtr);
 
 		return bufferPtr;
 	}
 
-    GLenum GLHardwareBufferCoreManager::getGLUsage(GpuBufferUsage usage)
+    GLenum GLHardwareBufferManager::getGLUsage(GpuBufferUsage usage)
     {
 		if(usage & GBU_STATIC)
 			return GL_STATIC_DRAW;
@@ -63,7 +63,7 @@ namespace bs { namespace ct
         return GL_DYNAMIC_DRAW;
     }
 
-    GLenum GLHardwareBufferCoreManager::getGLType(VertexElementType type)
+    GLenum GLHardwareBufferManager::getGLType(VertexElementType type)
     {
         switch(type)
         {

+ 7 - 7
Source/BansheeGLRenderAPI/Source/BsGLIndexBuffer.cpp

@@ -7,18 +7,18 @@
 
 namespace bs { namespace ct
 {
-	GLIndexBufferCore::GLIndexBufferCore(const INDEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
+	GLIndexBuffer::GLIndexBuffer(const INDEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
 		:IndexBufferCore(desc, deviceMask), mUsage(desc.usage)
 	{
 		assert((deviceMask == GDF_DEFAULT || deviceMask == GDF_PRIMARY) && "Multiple GPUs not supported natively on OpenGL.");
 	}
 
-	GLIndexBufferCore::~GLIndexBufferCore()
+	GLIndexBuffer::~GLIndexBuffer()
 	{
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_IndexBuffer);
 	}
 
-	void GLIndexBufferCore::initialize()
+	void GLIndexBuffer::initialize()
 	{
 		mBuffer.initialize(GL_ELEMENT_ARRAY_BUFFER, mSize, mUsage);
 
@@ -26,22 +26,22 @@ namespace bs { namespace ct
 		IndexBufferCore::initialize();
 	}
 
-	void* GLIndexBufferCore::map(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
+	void* GLIndexBuffer::map(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
 	{
 		return mBuffer.lock(offset, length, options);
 	}
 
-	void GLIndexBufferCore::unmap()
+	void GLIndexBuffer::unmap()
 	{
 		mBuffer.unlock();
 	}
 
-	void GLIndexBufferCore::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
+	void GLIndexBuffer::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
 	{
 		mBuffer.readData(offset, length, dest);
 	}
 
-	void GLIndexBufferCore::writeData(UINT32 offset, UINT32 length,
+	void GLIndexBuffer::writeData(UINT32 offset, UINT32 length,
 		const void* pSource, BufferWriteType writeFlags, UINT32 queueIdx)
 	{
 		mBuffer.writeData(offset, length, pSource, writeFlags);

+ 23 - 23
Source/BansheeGLRenderAPI/Source/BsGLRenderAPI.cpp

@@ -59,7 +59,7 @@ namespace bs { namespace ct
 		, mActiveTextureUnit(-1)
 	{
 		// Get our GLSupport
-		mGLSupport = getGLSupport();
+		mGLSupport = ct::getGLSupport();
 
 		mColorWrite[0] = mColorWrite[1] = mColorWrite[2] = mColorWrite[3] = true;
 
@@ -99,8 +99,8 @@ namespace bs { namespace ct
 		mVideoModeInfo = mGLSupport->getVideoModeInfo();
 
 		CommandBufferManager::startUp<GLCommandBufferManager>();
-		RenderWindowManager::startUp<GLRenderWindowManager>(this);
-		RenderWindowCoreManager::startUp<GLRenderWindowCoreManager>(this);
+		bs::RenderWindowManager::startUp<bs::GLRenderWindowManager>(this);
+		RenderWindowCoreManager::startUp<GLRenderWindowManager>(this);
 
 		RenderStateCoreManager::startUp();
 
@@ -211,11 +211,11 @@ namespace bs { namespace ct
 			DepthStencilStateCore* depthStencilState;
 			if (pipelineState != nullptr)
 			{
-				mCurrentVertexProgram = std::static_pointer_cast<GLSLGpuProgramCore>(pipelineState->getVertexProgram());
-				mCurrentFragmentProgram = std::static_pointer_cast<GLSLGpuProgramCore>(pipelineState->getFragmentProgram());
-				mCurrentGeometryProgram = std::static_pointer_cast<GLSLGpuProgramCore>(pipelineState->getGeometryProgram());
-				mCurrentDomainProgram = std::static_pointer_cast<GLSLGpuProgramCore>(pipelineState->getDomainProgram());
-				mCurrentHullProgram = std::static_pointer_cast<GLSLGpuProgramCore>(pipelineState->getHullProgram());
+				mCurrentVertexProgram = std::static_pointer_cast<GLSLGpuProgram>(pipelineState->getVertexProgram());
+				mCurrentFragmentProgram = std::static_pointer_cast<GLSLGpuProgram>(pipelineState->getFragmentProgram());
+				mCurrentGeometryProgram = std::static_pointer_cast<GLSLGpuProgram>(pipelineState->getGeometryProgram());
+				mCurrentDomainProgram = std::static_pointer_cast<GLSLGpuProgram>(pipelineState->getDomainProgram());
+				mCurrentHullProgram = std::static_pointer_cast<GLSLGpuProgram>(pipelineState->getHullProgram());
 
 				blendState = pipelineState->getBlendState().get();
 				rasterizerState = pipelineState->getRasterizerState().get();
@@ -327,7 +327,7 @@ namespace bs { namespace ct
 				program = pipelineState->getProgram();
 
 			if (program != nullptr && program->getProperties().getType() == GPT_COMPUTE_PROGRAM)
-				mCurrentComputeProgram = std::static_pointer_cast<GLSLGpuProgramCore>(program);
+				mCurrentComputeProgram = std::static_pointer_cast<GLSLGpuProgram>(program);
 			else
 				mCurrentComputeProgram = nullptr;
 		};
@@ -426,7 +426,7 @@ namespace bs { namespace ct
 						if (!activateGLTextureUnit(unit))
 							continue;
 
-						GLTextureCore* glTex = static_cast<GLTextureCore*>(texture.get());
+						GLTexture* glTex = static_cast<GLTexture*>(texture.get());
 
 						if (glTex != nullptr)
 						{
@@ -438,7 +438,7 @@ namespace bs { namespace ct
 							glBindTexture(newTextureType, glTex->getGLID());
 							mTextureInfos[unit].type = newTextureType;
 
-							SPtr<GLSLGpuProgramCore> activeProgram = getActiveProgram(type);
+							SPtr<GLSLGpuProgram> activeProgram = getActiveProgram(type);
 							if (activeProgram != nullptr)
 							{
 								GLuint glProgram = activeProgram->getGLHandle();
@@ -485,7 +485,7 @@ namespace bs { namespace ct
 						bool isLoadStore = entry.second.type != GPOT_BYTE_BUFFER &&
 							entry.second.type != GPOT_STRUCTURED_BUFFER;
 
-						GLGpuBufferCore* glBuffer = static_cast<GLGpuBufferCore*>(buffer.get());
+						GLGpuBuffer* glBuffer = static_cast<GLGpuBuffer*>(buffer.get());
 						if (!isLoadStore)
 						{
 							UINT32 unit = getTexUnit(binding);
@@ -501,7 +501,7 @@ namespace bs { namespace ct
 
 								glBindTexture(GL_TEXTURE_BUFFER, glBuffer->getGLTextureId());
 
-								SPtr<GLSLGpuProgramCore> activeProgram = getActiveProgram(type);
+								SPtr<GLSLGpuProgram> activeProgram = getActiveProgram(type);
 								if (activeProgram != nullptr)
 								{
 									GLuint glProgram = activeProgram->getGLHandle();
@@ -520,7 +520,7 @@ namespace bs { namespace ct
 								glBindImageTexture(unit, glBuffer->getGLTextureId(), 0, false,
 									0, GL_READ_WRITE, glBuffer->getGLFormat());
 
-								SPtr<GLSLGpuProgramCore> activeProgram = getActiveProgram(type);
+								SPtr<GLSLGpuProgram> activeProgram = getActiveProgram(type);
 								if (activeProgram != nullptr)
 								{
 									GLuint glProgram = activeProgram->getGLHandle();
@@ -543,11 +543,11 @@ namespace bs { namespace ct
 						UINT32 unit = getImageUnit(binding);
 						if (texture != nullptr)
 						{
-							GLTextureCore* tex = static_cast<GLTextureCore*>(texture.get());
+							GLTexture* tex = static_cast<GLTexture*>(texture.get());
 							glBindImageTexture(unit, tex->getGLID(), surface.mipLevel, surface.numArraySlices > 1,
 								surface.arraySlice, GL_READ_WRITE, tex->getGLFormat());
 
-							SPtr<GLSLGpuProgramCore> activeProgram = getActiveProgram(type);
+							SPtr<GLSLGpuProgram> activeProgram = getActiveProgram(type);
 							if (activeProgram != nullptr)
 							{
 								GLuint glProgram = activeProgram->getGLHandle();
@@ -569,7 +569,7 @@ namespace bs { namespace ct
 
 						buffer->flushToGPU();
 
-						SPtr<GLSLGpuProgramCore> activeProgram = getActiveProgram(type);
+						SPtr<GLSLGpuProgram> activeProgram = getActiveProgram(type);
 						GLuint glProgram = activeProgram->getGLHandle();
 
 						// 0 means uniforms are not in block, in which case we handle it specially
@@ -667,7 +667,7 @@ namespace bs { namespace ct
 						}
 						else
 						{
-							const GLGpuParamBlockBufferCore* glParamBlockBuffer = static_cast<const GLGpuParamBlockBufferCore*>(buffer.get());
+							const GLGpuParamBlockBuffer* glParamBlockBuffer = static_cast<const GLGpuParamBlockBuffer*>(buffer.get());
 
 							UINT32 unit = getUniformUnit(binding - 1);
 							glUniformBlockBinding(glProgram, binding - 1, unit);
@@ -951,7 +951,7 @@ namespace bs { namespace ct
 
 			beginDraw();
 
-			SPtr<GLIndexBufferCore> indexBuffer = std::static_pointer_cast<GLIndexBufferCore>(mBoundIndexBuffer);
+			SPtr<GLIndexBuffer> indexBuffer = std::static_pointer_cast<GLIndexBuffer>(mBoundIndexBuffer);
 			const IndexBufferProperties& ibProps = indexBuffer->getProperties();
 			glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indexBuffer->getGLBufferId());
 
@@ -1952,7 +1952,7 @@ namespace bs { namespace ct
 		return primType;
 	}
 
-	SPtr<GLSLGpuProgramCore> GLRenderAPI::getActiveProgram(GpuProgramType gptype) const
+	SPtr<GLSLGpuProgram> GLRenderAPI::getActiveProgram(GpuProgramType gptype) const
 	{
 		switch (gptype)
 		{
@@ -1992,7 +1992,7 @@ namespace bs { namespace ct
 #endif
 
 		HardwareBufferManager::startUp();
-		HardwareBufferCoreManager::startUp<GLHardwareBufferCoreManager>();
+		HardwareBufferCoreManager::startUp<GLHardwareBufferManager>();
 
 		// GPU Program Manager setup
 		if(caps->isShaderProfileSupported("glsl"))
@@ -2018,8 +2018,8 @@ namespace bs { namespace ct
 		for (UINT16 i = 0; i < mNumTextureUnits; i++)
 			mTextureInfos[i].type = GL_TEXTURE_2D;
 		
-		TextureManager::startUp<GLTextureManager>(std::ref(*mGLSupport));
-		TextureCoreManager::startUp<GLTextureCoreManager>(std::ref(*mGLSupport));
+		bs::TextureManager::startUp<bs::GLTextureManager>(std::ref(*mGLSupport));
+		TextureCoreManager::startUp<GLTextureManager>(std::ref(*mGLSupport));
 	}
 
 	void GLRenderAPI::switchContext(const SPtr<GLContext>& context)

+ 16 - 13
Source/BansheeGLRenderAPI/Source/BsGLRenderTexture.cpp

@@ -5,7 +5,7 @@
 #include "BsGLPixelBuffer.h"
 #include "BsTextureView.h"
 
-namespace bs { namespace ct
+namespace bs
 {
 #define PROBE_SIZE 16
 
@@ -20,19 +20,27 @@ namespace bs { namespace ct
 
 #define DEPTHFORMAT_COUNT (sizeof(depthFormats)/sizeof(GLenum))
 
-	GLRenderTextureCore::GLRenderTextureCore(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx)
+	GLRenderTexture::GLRenderTexture(const RENDER_TEXTURE_DESC& desc)
+		:RenderTexture(desc), mProperties(desc, true)
+	{
+
+	}
+
+	namespace ct
+	{
+	GLRenderTexture::GLRenderTexture(const RENDER_TEXTURE_DESC& desc, UINT32 deviceIdx)
 		:RenderTextureCore(desc, deviceIdx), mProperties(desc, true), mFB(nullptr)
 	{
 		assert(deviceIdx == 0 && "Multiple GPUs not supported natively on OpenGL.");
 	}
 
-	GLRenderTextureCore::~GLRenderTextureCore()
+	GLRenderTexture::~GLRenderTexture()
 	{ 
 		if (mFB != nullptr)
 			bs_delete(mFB);
 	}
 
-	void GLRenderTextureCore::initialize()
+	void GLRenderTexture::initialize()
 	{
 		RenderTextureCore::initialize();
 
@@ -45,7 +53,7 @@ namespace bs { namespace ct
 		{
 			if (mColorSurfaces[i] != nullptr)
 			{
-				GLTextureCore* glColorSurface = static_cast<GLTextureCore*>(mColorSurfaces[i]->getTexture().get());
+				GLTexture* glColorSurface = static_cast<GLTexture*>(mColorSurfaces[i]->getTexture().get());
 				GLSurfaceDesc surfaceDesc;
 				surfaceDesc.numSamples = getProperties().getMultisampleCount();
 
@@ -94,7 +102,7 @@ namespace bs { namespace ct
 
 		if (mDepthStencilSurface != nullptr && mDepthStencilSurface->getTexture() != nullptr)
 		{
-			GLTextureCore* glDepthStencilTexture = static_cast<GLTextureCore*>(mDepthStencilSurface->getTexture().get());
+			GLTexture* glDepthStencilTexture = static_cast<GLTexture*>(mDepthStencilSurface->getTexture().get());
 			SPtr<GLPixelBuffer> depthStencilBuffer = nullptr;
 
 			if (glDepthStencilTexture->getProperties().getTextureType() != TEX_TYPE_3D)
@@ -107,7 +115,7 @@ namespace bs { namespace ct
 		}
 	}
 
-	void GLRenderTextureCore::getCustomAttribute(const String& name, void* data) const
+	void GLRenderTexture::getCustomAttribute(const String& name, void* data) const
 	{
 		if(name=="FBO")
 		{
@@ -358,10 +366,5 @@ namespace bs { namespace ct
         // If none at all, return to default
         return PF_R8G8B8A8;
     }
-
-	GLRenderTexture::GLRenderTexture(const RENDER_TEXTURE_DESC& desc)
-		:RenderTexture(desc), mProperties(desc, true)
-	{
-
 	}
-}}
+}

+ 11 - 7
Source/BansheeGLRenderAPI/Source/BsGLRenderWindowManager.cpp

@@ -5,29 +5,32 @@
 #include "BsGLSupport.h"
 #include "BsAsyncOp.h"
 
-namespace bs { namespace ct
+namespace bs
 {
-	GLRenderWindowManager::GLRenderWindowManager(GLRenderAPI* renderSystem)
+	GLRenderWindowManager::GLRenderWindowManager(ct::GLRenderAPI* renderSystem)
 		:mRenderSystem(renderSystem)
 	{
 		assert(mRenderSystem != nullptr);
 	}
 
-	SPtr<RenderWindow> GLRenderWindowManager::createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, const SPtr<RenderWindow>& parentWindow)
+	SPtr<RenderWindow> GLRenderWindowManager::createImpl(RENDER_WINDOW_DESC& desc, UINT32 windowId, 
+		const SPtr<RenderWindow>& parentWindow)
 	{
-		GLSupport* glSupport = mRenderSystem->getGLSupport();
+		ct::GLSupport* glSupport = mRenderSystem->getGLSupport();
 
 		// Create the window
 		return glSupport->newWindow(desc, windowId, parentWindow);
 	}
 
-	GLRenderWindowCoreManager::GLRenderWindowCoreManager(GLRenderAPI* renderSystem)
+	namespace ct
+	{
+	GLRenderWindowManager::GLRenderWindowManager(GLRenderAPI* renderSystem)
 		:mRenderSystem(renderSystem)
 	{
 		assert(mRenderSystem != nullptr);
 	}
 
-	SPtr<RenderWindowCore> GLRenderWindowCoreManager::createInternal(RENDER_WINDOW_DESC& desc, UINT32 windowId)
+	SPtr<RenderWindowCore> GLRenderWindowManager::createInternal(RENDER_WINDOW_DESC& desc, UINT32 windowId)
 	{
 		GLSupport* glSupport = mRenderSystem->getGLSupport();
 
@@ -39,4 +42,5 @@ namespace bs { namespace ct
 
 		return window;
 	}
-}}
+	}
+}

+ 13 - 13
Source/BansheeGLRenderAPI/Source/BsGLTexture.cpp

@@ -13,7 +13,7 @@
 
 namespace bs { namespace ct
 {
-	GLTextureCore::GLTextureCore(GLSupport& support, const TEXTURE_DESC& desc, const SPtr<PixelData>& initialData, 
+	GLTexture::GLTexture(GLSupport& support, const TEXTURE_DESC& desc, const SPtr<PixelData>& initialData, 
 		GpuDeviceFlags deviceMask)
 		: TextureCore(desc, initialData, deviceMask),
 		mTextureID(0), mGLFormat(0), mInternalFormat(PF_UNKNOWN), mGLSupport(support)
@@ -21,7 +21,7 @@ namespace bs { namespace ct
 		assert((deviceMask == GDF_DEFAULT || deviceMask == GDF_PRIMARY) && "Multiple GPUs not supported natively on OpenGL.");
 	}
 
-	GLTextureCore::~GLTextureCore()
+	GLTexture::~GLTexture()
     { 
 		mSurfaceList.clear();
 		glDeleteTextures(1, &mTextureID);
@@ -31,7 +31,7 @@ namespace bs { namespace ct
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_Texture);
 	}
 
-	void GLTextureCore::initialize()
+	void GLTexture::initialize()
 	{
 		UINT32 width = mProperties.getWidth();
 		UINT32 height = mProperties.getHeight();
@@ -168,7 +168,7 @@ namespace bs { namespace ct
 		TextureCore::initialize();
 	}
 
-    GLenum GLTextureCore::getGLTextureTarget() const
+    GLenum GLTexture::getGLTextureTarget() const
     {
 		switch (mProperties.getTextureType())
         {
@@ -204,14 +204,14 @@ namespace bs { namespace ct
         };
     }
 
-	GLuint GLTextureCore::getGLID() const
+	GLuint GLTexture::getGLID() const
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
 		return mTextureID;
 	}
 
-	PixelData GLTextureCore::lockImpl(GpuLockOptions options, UINT32 mipLevel, UINT32 face, UINT32 deviceIdx,
+	PixelData GLTexture::lockImpl(GpuLockOptions options, UINT32 mipLevel, UINT32 face, UINT32 deviceIdx,
 									  UINT32 queueIdx)
 	{
 		if (mProperties.getNumSamples() > 1)
@@ -232,7 +232,7 @@ namespace bs { namespace ct
 		return lockedArea;
 	}
 
-	void GLTextureCore::unlockImpl()
+	void GLTexture::unlockImpl()
 	{
 		if (mLockedBuffer == nullptr)
 		{
@@ -244,7 +244,7 @@ namespace bs { namespace ct
 		mLockedBuffer = nullptr;
 	}
 
-	void GLTextureCore::readDataImpl(PixelData& dest, UINT32 mipLevel, UINT32 face, UINT32 deviceIdx, UINT32 queueIdx)
+	void GLTexture::readDataImpl(PixelData& dest, UINT32 mipLevel, UINT32 face, UINT32 deviceIdx, UINT32 queueIdx)
 	{
 		if (mProperties.getNumSamples() > 1)
 		{
@@ -264,7 +264,7 @@ namespace bs { namespace ct
 			getBuffer(face, mipLevel)->download(dest);
 	}
 
-	void GLTextureCore::writeDataImpl(const PixelData& src, UINT32 mipLevel, UINT32 face, bool discardWholeBuffer,
+	void GLTexture::writeDataImpl(const PixelData& src, UINT32 mipLevel, UINT32 face, bool discardWholeBuffer,
 								  UINT32 queueIdx)
 	{
 		if (mProperties.getNumSamples() > 1)
@@ -285,16 +285,16 @@ namespace bs { namespace ct
 			getBuffer(face, mipLevel)->upload(src, src.getExtents());
 	}
 
-	void GLTextureCore::copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel,
+	void GLTexture::copyImpl(UINT32 srcFace, UINT32 srcMipLevel, UINT32 destFace, UINT32 destMipLevel,
 								 const SPtr<TextureCore>& target, UINT32 queueIdx)
 	{
-		GLTextureCore* destTex = static_cast<GLTextureCore*>(target.get());
+		GLTexture* destTex = static_cast<GLTexture*>(target.get());
 		GLTextureBuffer *src = static_cast<GLTextureBuffer*>(getBuffer(srcFace, srcMipLevel).get());
 
 		destTex->getBuffer(destFace, destMipLevel)->blitFromTexture(src);
 	}
 
-	void GLTextureCore::createSurfaceList()
+	void GLTexture::createSurfaceList()
 	{
 		mSurfaceList.clear();
 		
@@ -318,7 +318,7 @@ namespace bs { namespace ct
 		}
 	}
 	
-	SPtr<GLPixelBuffer> GLTextureCore::getBuffer(UINT32 face, UINT32 mipmap)
+	SPtr<GLPixelBuffer> GLTexture::getBuffer(UINT32 face, UINT32 mipmap)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 

+ 14 - 11
Source/BansheeGLRenderAPI/Source/BsGLTextureManager.cpp

@@ -5,9 +5,9 @@
 #include "BsGLRenderTexture.h"
 #include "BsGLPixelFormat.h"
 
-namespace bs { namespace ct
+namespace bs
 {
-    GLTextureManager::GLTextureManager(GLSupport& support)
+    GLTextureManager::GLTextureManager(ct::GLSupport& support)
         :TextureManager(), mGLSupport(support)
     {
 
@@ -29,32 +29,35 @@ namespace bs { namespace ct
 	{
         // Check if this is a valid rendertarget format
 		if(usage & TU_RENDERTARGET)
-            return GLRTTManager::instance().getSupportedAlternative(format);
+            return ct::GLRTTManager::instance().getSupportedAlternative(format);
 
-		return GLPixelUtil::getClosestSupportedPF(format, ttype, usage);
+		return ct::GLPixelUtil::getClosestSupportedPF(format, ttype, usage);
 	}
 
-	GLTextureCoreManager::GLTextureCoreManager(GLSupport& support)
+	namespace ct
+	{
+	GLTextureManager::GLTextureManager(GLSupport& support)
 		:mGLSupport(support)
 	{ }
 
-	SPtr<TextureCore> GLTextureCoreManager::createTextureInternal(const TEXTURE_DESC& desc,
+	SPtr<TextureCore> GLTextureManager::createTextureInternal(const TEXTURE_DESC& desc,
 		const SPtr<PixelData>& initialData, GpuDeviceFlags deviceMask)
 	{
-		GLTextureCore* tex = new (bs_alloc<GLTextureCore>()) GLTextureCore(mGLSupport, desc, initialData, deviceMask);
+		GLTexture* tex = new (bs_alloc<GLTexture>()) GLTexture(mGLSupport, desc, initialData, deviceMask);
 
-		SPtr<GLTextureCore> texPtr = bs_shared_ptr<GLTextureCore>(tex);
+		SPtr<GLTexture> texPtr = bs_shared_ptr<GLTexture>(tex);
 		texPtr->_setThisPtr(texPtr);
 
 		return texPtr;
 	}
 
-	SPtr<RenderTextureCore> GLTextureCoreManager::createRenderTextureInternal(const RENDER_TEXTURE_DESC& desc, 
+	SPtr<RenderTextureCore> GLTextureManager::createRenderTextureInternal(const RENDER_TEXTURE_DESC& desc, 
 																			  UINT32 deviceIdx)
 	{
-		SPtr<GLRenderTextureCore> texPtr = bs_shared_ptr_new<GLRenderTextureCore>(desc, deviceIdx);
+		SPtr<GLRenderTexture> texPtr = bs_shared_ptr_new<GLRenderTexture>(desc, deviceIdx);
 		texPtr->_setThisPtr(texPtr);
 
 		return texPtr;
 	}
-}}
+		}
+}

+ 7 - 7
Source/BansheeGLRenderAPI/Source/BsGLVertexArrayObjectManager.cpp

@@ -16,7 +16,7 @@ namespace bs { namespace ct
 	{ }
 
 	GLVertexArrayObject::GLVertexArrayObject(GLuint handle, UINT64 vertexProgramId, 
-		GLVertexBufferCore** attachedBuffers, UINT32 numBuffers)
+		GLVertexBuffer** attachedBuffers, UINT32 numBuffers)
 		:mHandle(handle), mVertProgId(vertexProgramId), mAttachedBuffers(attachedBuffers), mNumBuffers(numBuffers)
 	{ }
 
@@ -75,7 +75,7 @@ namespace bs { namespace ct
 		assert(mVAObjects.size() == 0 && "VertexArrayObjectManager getting shut down but not all VA objects were released.");
 	}
 
-	const GLVertexArrayObject& GLVertexArrayObjectManager::getVAO(const SPtr<GLSLGpuProgramCore>& vertexProgram,
+	const GLVertexArrayObject& GLVertexArrayObjectManager::getVAO(const SPtr<GLSLGpuProgram>& vertexProgram,
 		const SPtr<VertexDeclarationCore>& vertexDecl, const std::array<SPtr<VertexBufferCore>, 32>& boundBuffers)
 	{
 		UINT16 maxStreamIdx = 0;
@@ -86,7 +86,7 @@ namespace bs { namespace ct
 		UINT32 numStreams = maxStreamIdx + 1;
 		UINT32 numUsedBuffers = 0;
 		INT32* streamToSeqIdx = bs_stack_alloc<INT32>(numStreams);
-		GLVertexBufferCore** usedBuffers = bs_stack_alloc<GLVertexBufferCore*>((UINT32)boundBuffers.size());
+		GLVertexBuffer** usedBuffers = bs_stack_alloc<GLVertexBuffer*>((UINT32)boundBuffers.size());
 		
 		memset(usedBuffers, 0, (UINT32)boundBuffers.size() * sizeof(GLVertexBuffer*));
 
@@ -106,7 +106,7 @@ namespace bs { namespace ct
 			streamToSeqIdx[streamIdx] = (INT32)numUsedBuffers;
 
 			if (vertexBuffer != nullptr)
-				usedBuffers[numUsedBuffers] = static_cast<GLVertexBufferCore*>(vertexBuffer.get()); 
+				usedBuffers[numUsedBuffers] = static_cast<GLVertexBuffer*>(vertexBuffer.get()); 
 			else
 				usedBuffers[numUsedBuffers] = nullptr;
 
@@ -155,14 +155,14 @@ namespace bs { namespace ct
 
 			// TODO - We might also want to check the size of input and buffer, and make sure they match? Or does OpenGL handle that internally?
 
-			GLVertexBufferCore* vertexBuffer = usedBuffers[seqIdx];
+			GLVertexBuffer* vertexBuffer = usedBuffers[seqIdx];
 			const VertexBufferProperties& vbProps = vertexBuffer->getProperties();
 
 			glBindBuffer(GL_ARRAY_BUFFER, vertexBuffer->getGLBufferId());
 			void* bufferData = VBO_BUFFER_OFFSET(elem.getOffset());
 
 			UINT16 typeCount = VertexElement::getTypeCount(elem.getType());
-			GLenum glType = GLHardwareBufferCoreManager::getGLType(elem.getType());
+			GLenum glType = GLHardwareBufferManager::getGLType(elem.getType());
 			bool isInteger = glType == GL_SHORT || glType == GL_UNSIGNED_SHORT || glType == GL_INT 
 				|| glType == GL_UNSIGNED_INT || glType == GL_UNSIGNED_BYTE;
 
@@ -195,7 +195,7 @@ namespace bs { namespace ct
 			glEnableVertexAttribArray(attribLocation);
 		}
 
-		wantedVAO.mAttachedBuffers = (GLVertexBufferCore**)bs_alloc(numUsedBuffers * sizeof(GLVertexBufferCore*));
+		wantedVAO.mAttachedBuffers = (GLVertexBuffer**)bs_alloc(numUsedBuffers * sizeof(GLVertexBuffer*));
 		for (UINT32 i = 0; i < numUsedBuffers; i++)
 		{
 			wantedVAO.mAttachedBuffers[i] = usedBuffers[i];

+ 9 - 9
Source/BansheeGLRenderAPI/Source/BsGLVertexBuffer.cpp

@@ -8,13 +8,13 @@
 
 namespace bs { namespace ct
 {
-	GLVertexBufferCore::GLVertexBufferCore(const VERTEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
+	GLVertexBuffer::GLVertexBuffer(const VERTEX_BUFFER_DESC& desc, GpuDeviceFlags deviceMask)
 		:VertexBufferCore(desc, deviceMask), mUsage(desc.usage)
     {
 		assert((deviceMask == GDF_DEFAULT || deviceMask == GDF_PRIMARY) && "Multiple GPUs not supported natively on OpenGL.");
     }
 
-	GLVertexBufferCore::~GLVertexBufferCore()
+	GLVertexBuffer::~GLVertexBuffer()
 	{
 		while (mVAObjects.size() > 0)
 			GLVertexArrayObjectManager::instance().notifyBufferDestroyed(mVAObjects[0]);
@@ -22,7 +22,7 @@ namespace bs { namespace ct
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_VertexBuffer);
 	}
 
-	void GLVertexBufferCore::initialize()
+	void GLVertexBuffer::initialize()
 	{
 		mBuffer.initialize(GL_ARRAY_BUFFER, mSize, mUsage);
 		
@@ -30,12 +30,12 @@ namespace bs { namespace ct
 		VertexBufferCore::initialize();
 	}
 
-	void GLVertexBufferCore::registerVAO(const GLVertexArrayObject& vao)
+	void GLVertexBuffer::registerVAO(const GLVertexArrayObject& vao)
 	{
 		mVAObjects.push_back(vao);
 	}
 
-	void GLVertexBufferCore::unregisterVAO(const GLVertexArrayObject& vao)
+	void GLVertexBuffer::unregisterVAO(const GLVertexArrayObject& vao)
 	{
 		auto iterFind = std::find(mVAObjects.begin(), mVAObjects.end(), vao);
 
@@ -43,22 +43,22 @@ namespace bs { namespace ct
 			mVAObjects.erase(iterFind);
 	}
 
-	void* GLVertexBufferCore::map(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
+	void* GLVertexBuffer::map(UINT32 offset, UINT32 length, GpuLockOptions options, UINT32 deviceIdx, UINT32 queueIdx)
     {
 		return mBuffer.lock(offset, length, options);
     }
 
-	void GLVertexBufferCore::unmap()
+	void GLVertexBuffer::unmap()
     {
 		mBuffer.unlock();
     }
 
-	void GLVertexBufferCore::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
+	void GLVertexBuffer::readData(UINT32 offset, UINT32 length, void* dest, UINT32 deviceIdx, UINT32 queueIdx)
     {
 		mBuffer.readData(offset, length, dest);
     }
 
-	void GLVertexBufferCore::writeData(UINT32 offset, UINT32 length,
+	void GLVertexBuffer::writeData(UINT32 offset, UINT32 length,
 		const void* pSource, BufferWriteType writeFlags, UINT32 queueIdx)
     {
 		mBuffer.writeData(offset, length, pSource, writeFlags);

+ 3 - 3
Source/BansheeGLRenderAPI/Source/GLSL/include/BsGLSLGpuProgram.h

@@ -12,10 +12,10 @@ namespace bs { namespace ct
 	 */
 
 	/**	GPU program compiled from GLSL and usable by OpenGL. */
-    class BS_RSGL_EXPORT GLSLGpuProgramCore : public GpuProgramCore
+    class BS_RSGL_EXPORT GLSLGpuProgram : public GpuProgramCore
     {
 	public:
-		~GLSLGpuProgramCore();
+		~GLSLGpuProgram();
 
 		/** @copydoc GpuProgramCore::isSupported */
 		bool isSupported() const override;
@@ -29,7 +29,7 @@ namespace bs { namespace ct
 	private:
 		friend class GLSLProgramFactory;
 
-		GLSLGpuProgramCore(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask);
+		GLSLGpuProgram(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask);
 
 		/** @copydoc GpuProgramCore::initialize */
 		void initialize() override;

+ 2 - 2
Source/BansheeGLRenderAPI/Source/GLSL/include/BsGLSLProgramPipelineManager.h

@@ -33,8 +33,8 @@ namespace bs { namespace ct
 		 * Creates or returns an existing pipeline that uses the provided combination of GPU programs. Provide null for
 		 * unused programs.
 		 */
-		const GLSLProgramPipeline* getPipeline(GLSLGpuProgramCore* vertexProgram, GLSLGpuProgramCore* fragmentProgram,
-			GLSLGpuProgramCore* geometryProgram, GLSLGpuProgramCore* hullProgram, GLSLGpuProgramCore* domainProgram);
+		const GLSLProgramPipeline* getPipeline(GLSLGpuProgram* vertexProgram, GLSLGpuProgram* fragmentProgram,
+			GLSLGpuProgram* geometryProgram, GLSLGpuProgram* hullProgram, GLSLGpuProgram* domainProgram);
 
 	private:
 		/**	Key that uniquely identifies a pipeline object. */

+ 10 - 10
Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLGpuProgram.cpp

@@ -10,12 +10,12 @@
 
 namespace bs { namespace ct
 {
-	UINT32 GLSLGpuProgramCore::mVertexShaderCount = 0;
-	UINT32 GLSLGpuProgramCore::mFragmentShaderCount = 0;
-	UINT32 GLSLGpuProgramCore::mGeometryShaderCount = 0;
-	UINT32 GLSLGpuProgramCore::mDomainShaderCount = 0;
-	UINT32 GLSLGpuProgramCore::mHullShaderCount = 0;
-	UINT32 GLSLGpuProgramCore::mComputeShaderCount = 0;
+	UINT32 GLSLGpuProgram::mVertexShaderCount = 0;
+	UINT32 GLSLGpuProgram::mFragmentShaderCount = 0;
+	UINT32 GLSLGpuProgram::mGeometryShaderCount = 0;
+	UINT32 GLSLGpuProgram::mDomainShaderCount = 0;
+	UINT32 GLSLGpuProgram::mHullShaderCount = 0;
+	UINT32 GLSLGpuProgram::mComputeShaderCount = 0;
 
 	bool checkForGLSLError(const GLuint programObj, String& outErrorMsg)
 	{
@@ -69,11 +69,11 @@ namespace bs { namespace ct
 		return errorsFound || !linkCompileSuccess;
 	}
 	
-	GLSLGpuProgramCore::GLSLGpuProgramCore(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask)
+	GLSLGpuProgram::GLSLGpuProgram(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask)
 		:GpuProgramCore(desc, deviceMask), mProgramID(0), mGLHandle(0)
     { }
 
-	GLSLGpuProgramCore::~GLSLGpuProgramCore()
+	GLSLGpuProgram::~GLSLGpuProgram()
     { 
 		if (mIsCompiled && mGLHandle != 0)
 		{
@@ -84,7 +84,7 @@ namespace bs { namespace ct
 		BS_INC_RENDER_STAT_CAT(ResDestroyed, RenderStatObject_GpuProgram);
 	}
 
-	void GLSLGpuProgramCore::initialize()
+	void GLSLGpuProgram::initialize()
 	{
 		static const char GLSL_VERSION_LINE[] = "#version 440\n";
 
@@ -202,7 +202,7 @@ namespace bs { namespace ct
 		GpuProgramCore::initialize();
 	}
 
-	bool GLSLGpuProgramCore::isSupported() const
+	bool GLSLGpuProgram::isSupported() const
 	{
 		if (!isRequiredCapabilitiesSupported())
 			return false;

+ 4 - 4
Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLProgramFactory.cpp

@@ -14,9 +14,9 @@ namespace bs { namespace ct
 
 	SPtr<GpuProgramCore> GLSLProgramFactory::create(const GPU_PROGRAM_DESC& desc, GpuDeviceFlags deviceMask)
     {
-		GLSLGpuProgramCore* prog = new (bs_alloc<GLSLGpuProgramCore>()) GLSLGpuProgramCore(desc, deviceMask);
+		GLSLGpuProgram* prog = new (bs_alloc<GLSLGpuProgram>()) GLSLGpuProgram(desc, deviceMask);
 
-		SPtr<GLSLGpuProgramCore> gpuProg = bs_shared_ptr<GLSLGpuProgramCore>(prog);
+		SPtr<GLSLGpuProgram> gpuProg = bs_shared_ptr<GLSLGpuProgram>(prog);
 		gpuProg->_setThisPtr(gpuProg);
 
 		return gpuProg;
@@ -27,9 +27,9 @@ namespace bs { namespace ct
 		GPU_PROGRAM_DESC desc;
 		desc.type = type;
 
-		GLSLGpuProgramCore* prog = new (bs_alloc<GLSLGpuProgramCore>()) GLSLGpuProgramCore(desc, deviceMask);
+		GLSLGpuProgram* prog = new (bs_alloc<GLSLGpuProgram>()) GLSLGpuProgram(desc, deviceMask);
 
-		SPtr<GLSLGpuProgramCore> gpuProg = bs_shared_ptr<GLSLGpuProgramCore>(prog);
+		SPtr<GLSLGpuProgram> gpuProg = bs_shared_ptr<GLSLGpuProgram>(prog);
 		gpuProg->_setThisPtr(gpuProg);
 
 		return gpuProg;

+ 2 - 2
Source/BansheeGLRenderAPI/Source/GLSL/src/BsGLSLProgramPipelineManager.cpp

@@ -35,8 +35,8 @@ namespace bs { namespace ct
 		}
 	}
 
-	const GLSLProgramPipeline* GLSLProgramPipelineManager::getPipeline(GLSLGpuProgramCore* vertexProgram, GLSLGpuProgramCore* fragmentProgram,
-		GLSLGpuProgramCore* geometryProgram, GLSLGpuProgramCore* hullProgram, GLSLGpuProgramCore* domainProgram)
+	const GLSLProgramPipeline* GLSLProgramPipelineManager::getPipeline(GLSLGpuProgram* vertexProgram, GLSLGpuProgram* fragmentProgram,
+		GLSLGpuProgram* geometryProgram, GLSLGpuProgram* hullProgram, GLSLGpuProgram* domainProgram)
 	{
 		ProgramPipelineKey key;
 		key.vertexProgKey = vertexProgram != nullptr ? vertexProgram->getProgramID() : 0;

+ 4 - 4
Source/BansheeGLRenderAPI/Source/Win32/BsWin32GLSupport.cpp

@@ -37,18 +37,18 @@ namespace bs { namespace ct
 			desc.platformSpecific["parentWindowHandle"] = toString(hWnd);
 		}
 
-		Win32RenderWindow* window = new (bs_alloc<Win32RenderWindow>()) Win32RenderWindow(desc, windowId, *this);
-		return SPtr<RenderWindow>(window, &CoreObject::_delete<Win32RenderWindow, GenAlloc>);
+		bs::Win32RenderWindow* window = new (bs_alloc<bs::Win32RenderWindow>()) bs::Win32RenderWindow(desc, windowId, *this);
+		return SPtr<RenderWindow>(window, &CoreObject::_delete<bs::Win32RenderWindow, GenAlloc>);
 	}
 
 	SPtr<RenderWindowCore> Win32GLSupport::newWindowCore(RENDER_WINDOW_DESC& desc, UINT32 windowId)
 	{
-		Win32RenderWindowCore* window = new (bs_alloc<Win32RenderWindowCore>()) Win32RenderWindowCore(desc, windowId, *this);
+		Win32RenderWindow* window = new (bs_alloc<Win32RenderWindow>()) Win32RenderWindow(desc, windowId, *this);
 
 		if (!mInitialWindow)
 			mInitialWindow = window;
 
-		return bs_shared_ptr<Win32RenderWindowCore>(window);
+		return bs_shared_ptr<Win32RenderWindow>(window);
 	}
 
 	void Win32GLSupport::start()

+ 77 - 74
Source/BansheeGLRenderAPI/Source/Win32/BsWin32RenderWindow.cpp

@@ -20,7 +20,7 @@
 
 GLenum GLEWAPIENTRY wglewContextInit(bs::ct::GLSupport* glSupport);
 
-namespace bs { namespace ct
+namespace bs
 {
 	#define _MAX_CLASS_NAME_ 128
 
@@ -28,13 +28,68 @@ namespace bs { namespace ct
 		:RenderWindowProperties(desc)
 	{ }
 
-	Win32RenderWindowCore::Win32RenderWindowCore(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport& glsupport)
+	Win32RenderWindow::Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, ct::Win32GLSupport &glsupport)
+		:RenderWindow(desc, windowId), mGLSupport(glsupport), mProperties(desc)
+	{
+
+	}
+
+	void Win32RenderWindow::getCustomAttribute(const String& name, void* pData) const
+	{
+		if (name == "WINDOW")
+		{
+			UINT64 *pHwnd = (UINT64*)pData;
+			*pHwnd = (UINT64)getHWnd();
+			return;
+		}
+	}
+
+	Vector2I Win32RenderWindow::screenToWindowPos(const Vector2I& screenPos) const
+	{
+		POINT pos;
+		pos.x = screenPos.x;
+		pos.y = screenPos.y;
+
+		ScreenToClient(getHWnd(), &pos);
+		return Vector2I(pos.x, pos.y);
+	}
+
+	Vector2I Win32RenderWindow::windowToScreenPos(const Vector2I& windowPos) const
+	{
+		POINT pos;
+		pos.x = windowPos.x;
+		pos.y = windowPos.y;
+
+		ClientToScreen(getHWnd(), &pos);
+		return Vector2I(pos.x, pos.y);
+	}
+
+	SPtr<ct::Win32RenderWindow> Win32RenderWindow::getCore() const
+	{
+		return std::static_pointer_cast<ct::Win32RenderWindow>(mCoreSpecific);
+	}
+
+	void Win32RenderWindow::syncProperties()
+	{
+		ScopedSpinLock lock(getCore()->mLock);
+		mProperties = getCore()->mSyncedProperties;
+	}
+
+	HWND Win32RenderWindow::getHWnd() const
+	{
+		blockUntilCoreInitialized();
+		return getCore()->_getHWnd();
+	}
+
+	namespace ct
+	{
+		Win32RenderWindow::Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport& glsupport)
 		: RenderWindowCore(desc, windowId), mWindow(nullptr), mGLSupport(glsupport), mHDC(nullptr), mIsChild(false)
 		, mDeviceName(nullptr), mDisplayFrequency(0), mShowOnSwap(false), mContext(nullptr), mProperties(desc)
 		, mSyncedProperties(desc)
 	{ }
 
-	Win32RenderWindowCore::~Win32RenderWindowCore()
+		Win32RenderWindow::~Win32RenderWindow()
 	{ 
 		Win32RenderWindowProperties& props = mProperties;
 
@@ -56,7 +111,7 @@ namespace bs { namespace ct
 		}
 	}
 
-	void Win32RenderWindowCore::initialize()
+	void Win32RenderWindow::initialize()
 	{
 		Win32RenderWindowProperties& props = mProperties;
 
@@ -205,7 +260,7 @@ namespace bs { namespace ct
 		RenderWindowCore::initialize();
 	}
 
-	void Win32RenderWindowCore::setFullscreen(UINT32 width, UINT32 height, float refreshRate, UINT32 monitorIdx)
+	void Win32RenderWindow::setFullscreen(UINT32 width, UINT32 height, float refreshRate, UINT32 monitorIdx)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -260,14 +315,14 @@ namespace bs { namespace ct
 		_windowMovedOrResized();
 	}
 
-	void Win32RenderWindowCore::setFullscreen(const VideoMode& mode)
+	void Win32RenderWindow::setFullscreen(const VideoMode& mode)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
 		setFullscreen(mode.getWidth(), mode.getHeight(), mode.getRefreshRate(), mode.getOutputIdx());
 	}
 
-	void Win32RenderWindowCore::setWindowed(UINT32 width, UINT32 height)
+	void Win32RenderWindow::setWindowed(UINT32 width, UINT32 height)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -321,7 +376,7 @@ namespace bs { namespace ct
 		_windowMovedOrResized();
 	}
 
-	void Win32RenderWindowCore::move(INT32 left, INT32 top)
+	void Win32RenderWindow::move(INT32 left, INT32 top)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -343,7 +398,7 @@ namespace bs { namespace ct
 		}
 	}
 
-	void Win32RenderWindowCore::resize(UINT32 width, UINT32 height)
+	void Win32RenderWindow::resize(UINT32 width, UINT32 height)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -365,28 +420,28 @@ namespace bs { namespace ct
 		}
 	}
 
-	void Win32RenderWindowCore::minimize()
+	void Win32RenderWindow::minimize()
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
 		mWindow->minimize();
 	}
 
-	void Win32RenderWindowCore::maximize()
+	void Win32RenderWindow::maximize()
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
 		mWindow->maximize();
 	}
 
-	void Win32RenderWindowCore::restore()
+	void Win32RenderWindow::restore()
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
 		mWindow->restore();
 	}
 
-	void Win32RenderWindowCore::swapBuffers(UINT32 syncMask)
+	void Win32RenderWindow::swapBuffers(UINT32 syncMask)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -396,7 +451,7 @@ namespace bs { namespace ct
 		SwapBuffers(mHDC);
 	}
 
-	void Win32RenderWindowCore::copyToMemory(PixelData &dst, FrameBuffer buffer)
+	void Win32RenderWindow::copyToMemory(PixelData &dst, FrameBuffer buffer)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -450,7 +505,7 @@ namespace bs { namespace ct
 		}
 	}
 
-	void Win32RenderWindowCore::getCustomAttribute(const String& name, void* pData) const
+	void Win32RenderWindow::getCustomAttribute(const String& name, void* pData) const
 	{
 		if(name == "GLCONTEXT") 
 		{
@@ -466,7 +521,7 @@ namespace bs { namespace ct
 		} 
 	}
 
-	void Win32RenderWindowCore::setActive(bool state)
+	void Win32RenderWindow::setActive(bool state)
 	{	
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -475,7 +530,7 @@ namespace bs { namespace ct
 		RenderWindowCore::setActive(state);
 	}
 
-	void Win32RenderWindowCore::setHidden(bool hidden)
+	void Win32RenderWindow::setHidden(bool hidden)
 	{
 		THROW_IF_NOT_CORE_THREAD;
 
@@ -485,7 +540,7 @@ namespace bs { namespace ct
 		RenderWindowCore::setHidden(hidden);
 	}
 
-	void Win32RenderWindowCore::_windowMovedOrResized()
+	void Win32RenderWindow::_windowMovedOrResized()
 	{
 		if (!mWindow)
 			return;
@@ -504,67 +559,15 @@ namespace bs { namespace ct
 		RenderWindowCore::_windowMovedOrResized();
 	}
 
-	HWND Win32RenderWindowCore::_getHWnd() const
+	HWND Win32RenderWindow::_getHWnd() const
 	{
 		return mWindow->getHWnd();
 	}
 
-	void Win32RenderWindowCore::syncProperties()
+	void Win32RenderWindow::syncProperties()
 	{
 		ScopedSpinLock lock(mLock);
 		mProperties = mSyncedProperties;
+	}		
 	}
-
-	Win32RenderWindow::Win32RenderWindow(const RENDER_WINDOW_DESC& desc, UINT32 windowId, Win32GLSupport &glsupport)
-		:RenderWindow(desc, windowId), mGLSupport(glsupport), mProperties(desc)
-	{
-
-	}
-
-	void Win32RenderWindow::getCustomAttribute(const String& name, void* pData) const
-	{
-		if (name == "WINDOW")
-		{
-			UINT64 *pHwnd = (UINT64*)pData;
-			*pHwnd = (UINT64)getHWnd();
-			return;
-		}
-	}
-
-	Vector2I Win32RenderWindow::screenToWindowPos(const Vector2I& screenPos) const
-	{
-		POINT pos;
-		pos.x = screenPos.x;
-		pos.y = screenPos.y;
-
-		ScreenToClient(getHWnd(), &pos);
-		return Vector2I(pos.x, pos.y);
-	}
-
-	Vector2I Win32RenderWindow::windowToScreenPos(const Vector2I& windowPos) const
-	{
-		POINT pos;
-		pos.x = windowPos.x;
-		pos.y = windowPos.y;
-
-		ClientToScreen(getHWnd(), &pos);
-		return Vector2I(pos.x, pos.y);
-	}
-
-	SPtr<Win32RenderWindowCore> Win32RenderWindow::getCore() const
-	{
-		return std::static_pointer_cast<Win32RenderWindowCore>(mCoreSpecific);
-	}
-
-	void Win32RenderWindow::syncProperties()
-	{
-		ScopedSpinLock lock(getCore()->mLock);
-		mProperties = getCore()->mSyncedProperties;
-	}
-
-	HWND Win32RenderWindow::getHWnd() const
-	{
-		blockUntilCoreInitialized();
-		return getCore()->_getHWnd();
-	}
-}}
+}