Browse Source

Disable GLTextureManager

Daniele Bartolini 13 years ago
parent
commit
05872b0bcf
2 changed files with 101 additions and 102 deletions
  1. 65 65
      src/renderers/gl/GLTextureManager.cpp
  2. 36 37
      src/renderers/gl/GLTextureManager.h

+ 65 - 65
src/renderers/gl/GLTextureManager.cpp

@@ -29,71 +29,71 @@ OTHER DEALINGS IN THE SOFTWARE.
 namespace crown
 {
 
-Texture* GLTextureManager::Create(const char* name, bool& created)
-{
-	Texture* texture = static_cast<GLTexture*>(ResourceManager::Create(name, created));
-
-	return texture;
-}
-
-Texture* GLTextureManager::Load(const char* name, bool generateMipMaps)
-{
-	bool created;
-	Texture* texture = Create(name, created);
-
-	if (texture != NULL && created)
-	{
-		// Populate parameters
-		texture->SetGenerateMipMaps(generateMipMaps);
-
-		texture->Load(name);
-	}
-
-	return texture;
-}
-
-Texture* GLTextureManager::Load(const char* name, bool generateMipMaps, Color4 colorKey)
-{
-	bool created;
-	Texture* texture = Create(name, created);
-
-	if (texture != NULL && created)
-	{
-		// Populate parameters
-		texture->SetGenerateMipMaps(generateMipMaps);
-
-		texture->LoadFromFile(name, colorKey);
-	}
-
-	return texture;
-}
-
-Texture* GLTextureManager::Load(const char* name, const char* greyscaleAlpha, bool generateMipMaps)
-{
-	bool created;
-	Texture* texture = Create(name, created);
-
-	if (texture != NULL && created)
-	{
-		// Populate parameters
-		texture->SetGenerateMipMaps(generateMipMaps);
-
-		texture->LoadFromFile(name, greyscaleAlpha);
-	}
-
-	return texture;
-}
-
-GLTexture* GLTextureManager::CreateSpecific(const char* name)
-{
-	return new GLTexture();
-}
-
-GLTextureManager textureMgr;
-TextureManager* GetTextureManager()
-{
-	return &textureMgr;
-}
+//Texture* GLTextureManager::Create(const char* name, bool& created)
+//{
+//	Texture* texture = static_cast<GLTexture*>(ResourceManager::Create(name, created));
+
+//	return texture;
+//}
+
+//Texture* GLTextureManager::Load(const char* name, bool generateMipMaps)
+//{
+//	bool created;
+//	Texture* texture = Create(name, created);
+
+//	if (texture != NULL && created)
+//	{
+//		// Populate parameters
+//		texture->SetGenerateMipMaps(generateMipMaps);
+
+//		texture->Load(name);
+//	}
+
+//	return texture;
+//}
+
+//Texture* GLTextureManager::Load(const char* name, bool generateMipMaps, Color4 colorKey)
+//{
+//	bool created;
+//	Texture* texture = Create(name, created);
+
+//	if (texture != NULL && created)
+//	{
+//		// Populate parameters
+//		texture->SetGenerateMipMaps(generateMipMaps);
+
+//		texture->LoadFromFile(name, colorKey);
+//	}
+
+//	return texture;
+//}
+
+//Texture* GLTextureManager::Load(const char* name, const char* greyscaleAlpha, bool generateMipMaps)
+//{
+//	bool created;
+//	Texture* texture = Create(name, created);
+
+//	if (texture != NULL && created)
+//	{
+//		// Populate parameters
+//		texture->SetGenerateMipMaps(generateMipMaps);
+
+//		texture->LoadFromFile(name, greyscaleAlpha);
+//	}
+
+//	return texture;
+//}
+
+//GLTexture* GLTextureManager::CreateSpecific(const char* name)
+//{
+//	return new GLTexture();
+//}
+
+//GLTextureManager textureMgr;
+//TextureManager* GetTextureManager()
+//{
+//	return &textureMgr;
+//}
 
 } // namespace crown
 

+ 36 - 37
src/renderers/gl/GLTextureManager.h

@@ -25,52 +25,51 @@ OTHER DEALINGS IN THE SOFTWARE.
 
 #pragma once
 
-#include "TextureManager.h"
 #include "GLTexture.h"
 
 namespace crown
 {
 
-class GLTextureManager : public TextureManager
+class GLTextureManager
 {
 
 public:
 
-	GLTextureManager() {}
-
-	/**
-	 * Creates a texture resource withe the given name.
-	 * If a resource with the same name already exists, the
-	 * already existent resource will be returned. In order
-	 * to distinguish between a newly created resource or a
-	 * point32_ter to an existing one, you have to check
-	 * at the value returned by 'created'.
-	 * @param name The name of the resource
-	 * @param created Returns true if newly created, false otherwise
-	 * @return A point32_ter to the created resource
-	 */
-	virtual Texture* Create(const char* name, bool& created);
-
-	/**
-	 * Loads a texture resource from file.
-	 * The name of the file determines the name of the resource and vice-versa.
-	 * @param name Tha name of the resource
-	 * @return A point32_ter to the loaded resource
-	 */
-	virtual Texture* Load(const char* name, bool generateMipMaps = true);
-
-	/**
-	 * Loads a texture resource from file using color keying.
-	 * The name of the file determines the name of the resource and vice-versa.
-	 * @param name The name of the resource
-	 * @param colorKey The color to use as transparent color
-	 * @return A point32_ter to the loaded resource
-	 */
-	virtual Texture* Load(const char* name, bool generateMipMaps, Color4 colorKey);
-
-	virtual Texture* Load(const char* name, const char* greyscaleAlpha, bool generateMipMaps);
-
-	virtual GLTexture* CreateSpecific(const char* name);
+//	GLTextureManager() {}
+
+//	/**
+//	 * Creates a texture resource withe the given name.
+//	 * If a resource with the same name already exists, the
+//	 * already existent resource will be returned. In order
+//	 * to distinguish between a newly created resource or a
+//	 * point32_ter to an existing one, you have to check
+//	 * at the value returned by 'created'.
+//	 * @param name The name of the resource
+//	 * @param created Returns true if newly created, false otherwise
+//	 * @return A point32_ter to the created resource
+//	 */
+//	Texture* Create(const char* name, bool& created);
+
+//	/**
+//	 * Loads a texture resource from file.
+//	 * The name of the file determines the name of the resource and vice-versa.
+//	 * @param name Tha name of the resource
+//	 * @return A point32_ter to the loaded resource
+//	 */
+//	Texture* Load(const char* name, bool generateMipMaps = true);
+
+//	/**
+//	 * Loads a texture resource from file using color keying.
+//	 * The name of the file determines the name of the resource and vice-versa.
+//	 * @param name The name of the resource
+//	 * @param colorKey The color to use as transparent color
+//	 * @return A point32_ter to the loaded resource
+//	 */
+//	Texture* Load(const char* name, bool generateMipMaps, Color4 colorKey);
+
+//	Texture* Load(const char* name, const char* greyscaleAlpha, bool generateMipMaps);
+
+//	GLTexture* CreateSpecific(const char* name);
 
 private: