From 209458adee71417c979fb65dc936398a24836fb9 Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Sat, 14 Dec 2013 02:22:30 -0800 Subject: [PATCH] - removed deprecated gl2 code as it was not used --- .../graphics/gl/graphics_factory_gl2.h | 74 ------------ .../graphics/gl2/graphics_factory_gl2.h | 72 ------------ .../include/graphics/gl2/shader_gl.h | 110 ------------------ 3 files changed, 256 deletions(-) delete mode 100644 source/shared_lib/include/graphics/gl/graphics_factory_gl2.h delete mode 100644 source/shared_lib/include/graphics/gl2/graphics_factory_gl2.h delete mode 100644 source/shared_lib/include/graphics/gl2/shader_gl.h diff --git a/source/shared_lib/include/graphics/gl/graphics_factory_gl2.h b/source/shared_lib/include/graphics/gl/graphics_factory_gl2.h deleted file mode 100644 index ba573684..00000000 --- a/source/shared_lib/include/graphics/gl/graphics_factory_gl2.h +++ /dev/null @@ -1,74 +0,0 @@ -// ============================================================== -// This file is part of Glest (www.glest.org) -// -// Copyright (C) 2001-2008 Martiño Figueroa -// -// You can redistribute this code and/or modify it under -// the terms of the GNU General Public License as published -// by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version -// ============================================================== - -#ifndef _SHARED_GRAPHICS_GL_GRAPHICSFACTORYGL2_H_ -#define _SHARED_GRAPHICS_GL_GRAPHICSFACTORYGL2_H_ - -#include "texture_manager.h" -#include "model_manager.h" -#include "font_manager.h" -#include "particle.h" -#include "graphics_factory.h" -#include "text_renderer_gl.h" -#include "model_renderer_gl.h" -#include "particle_renderer_gl.h" -#include "context_gl.h" -#include "model_gl.h" -#include "texture_gl.h" -#include "font_gl.h" -#include "shader_gl.h" -#include "shader_manager.h" -#include "leak_dumper.h" - -namespace Shared{ namespace Graphics{ namespace Gl{ - -// ===================================================== -// class GraphicsFactoryGl -// ===================================================== - -class GraphicsFactoryGl2: public GraphicsFactory{ -public: - //context - virtual Context *newContext() {return new ContextGl();} - - //textures - virtual TextureManager *newTextureManager() {return new TextureManager();} - virtual Texture1D *newTexture1D() {return new Texture1DGl();} - virtual Texture2D *newTexture2D() {return new Texture2DGl();} - virtual Texture3D *newTexture3D() {return new Texture3DGl();} - virtual TextureCube *newTextureCube() {return new TextureCubeGl();} - - //models - virtual ModelManager *newModelManager() {return new ModelManager();} - virtual ModelRenderer *newModelRenderer() {return new ModelRendererGl();} - virtual Model *newModel() {return new ModelGl();} - - //text - virtual FontManager *newFontManager() {return new FontManager();} - virtual TextRenderer2D *newTextRenderer2D() {return new TextRenderer2DGl();} - virtual TextRenderer3D *newTextRenderer3D() {return new TextRenderer3DGl();} - virtual Font2D *newFont2D() {return new Font2DGl();} - virtual Font3D *newFont3D() {return new Font3DGl();} - - //particles - virtual ParticleManager *newParticleManager() {return new ParticleManager();} - virtual ParticleRenderer *newParticleRenderer() {return new ParticleRendererGl();} - - //shaders - virtual ShaderManager *newShaderManager() {return new ShaderManager();} - virtual ShaderProgram *newShaderProgram() {return new ShaderProgramGl();} - virtual VertexShader *newVertexShader() {return new VertexShaderGl();} - virtual FragmentShader *newFragmentShader() {return new FragmentShaderGl();} -}; - -}}}//end namespace - -#endif diff --git a/source/shared_lib/include/graphics/gl2/graphics_factory_gl2.h b/source/shared_lib/include/graphics/gl2/graphics_factory_gl2.h deleted file mode 100644 index 877a9f47..00000000 --- a/source/shared_lib/include/graphics/gl2/graphics_factory_gl2.h +++ /dev/null @@ -1,72 +0,0 @@ -// ============================================================== -// This file is part of Glest (www.glest.org) -// -// Copyright (C) 2001-2008 Martiño Figueroa -// -// You can redistribute this code and/or modify it under -// the terms of the GNU General Public License as published -// by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version -// ============================================================== - -#ifndef _SHARED_GRAPHICS_GL_GRAPHICSFACTORYGL2_H_ -#define _SHARED_GRAPHICS_GL_GRAPHICSFACTORYGL2_H_ - -#include "texture_manager.h" -#include "model_manager.h" -#include "particle_manager.h" -#include "font_manager.h" -#include "graphics_factory.h" -#include "text_renderer_gl.h" -#include "model_renderer_gl.h" -#include "particle_renderer_gl.h" -#include "context_gl.h" -#include "model_gl.h" -#include "texture_gl.h" -#include "font_gl.h" -#include "shader_gl.h" - -namespace Shared{ namespace Graphics{ namespace Gl{ - -// ===================================================== -// class GraphicsFactoryGl -// ===================================================== - -class GraphicsFactoryGl: public GraphicsFactory{ -public: - //context - virtual Context *newContext() {return new ContextGl();} - - //textures - virtual TextureManager *newTextureManager() {return new TextureManager();} - virtual Texture1D *newTexture1D() {return new Texture1DGl();} - virtual Texture2D *newTexture2D() {return new Texture2DGl();} - virtual Texture3D *newTexture3D() {return new Texture3DGl();} - virtual TextureCube *newTextureCube() {return new TextureCubeGl();} - - //models - virtual ModelManager *newModelManager() {return new ModelManager();} - virtual ModelRenderer *newModelRenderer() {return new ModelRendererGl();} - virtual Model *newModel() {return new ModelGl();} - - //text - virtual FontManager *newFontManager() {return new FontManager();} - virtual TextRenderer2D *newTextRenderer2D() {return new TextRenderer2DGl();} - virtual TextRenderer3D *newTextRenderer3D() {return new TextRenderer3DGl();} - virtual Font2D *newFont2D() {return new Font2DGl();} - virtual Font3D *newFont3D() {return new Font3DGl();} - - //particles - virtual ParticleManager *newParticleManager() {return new ParticleManager();} - virtual ParticleRenderer *newParticleRenderer() {return new ParticleRendererGl();} - - //shaders - virtual Shadermanager *newShadermanager() {return new ShaderManager();} - virtual ShaderProgram *newShaderProgram() {return new ShaderProgramGl();} - virtual VertexShader *newVertexShader() {return new VertexShaderGl();} - virtual FragmentShader *newFragmentShader() {return new FragmentShaderGl();} -}; - -}}}//end namespace - -#endif diff --git a/source/shared_lib/include/graphics/gl2/shader_gl.h b/source/shared_lib/include/graphics/gl2/shader_gl.h deleted file mode 100644 index 20afef36..00000000 --- a/source/shared_lib/include/graphics/gl2/shader_gl.h +++ /dev/null @@ -1,110 +0,0 @@ -// ============================================================== -// This file is part of Glest Shared Library (www.glest.org) -// -// Copyright (C) 2001-2008 Martiño Figueroa -// -// You can redistribute this code and/or modify it under -// the terms of the GNU General Public License as published -// by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version -// ============================================================== - -#ifndef _SHARED_GRAPHICS_GL_SHADERGL_H_ -#define _SHARED_GRAPHICS_GL_SHADERGL_H_ - -#include -#include - -#include "shader.h" -#include "opengl.h" - -using std::vector; -using std::string; -using std::pair; - -namespace Shared{ namespace Graphics{ namespace Gl{ - -// ===================================================== -// class ShaderProgramGl -// ===================================================== - -class ShaderProgramGl: public ShaderProgram{ -private: - typedef pair AttributePair; - typedef vector Attributes; - -private: - Attributes attributes; - GLhandleARB handle; - VertexShader *vertexShader; - FragmentShader *fragmentShader; - bool inited; - -public: - ShaderProgramGl(); - - GLhandleARB getHandle() const {return handle;} - - virtual void init(); - virtual void end(); - - virtual void attach(VertexShader *vertexShader, FragmentShader *fragmentShader); - virtual bool link(string &messages); - virtual void activate(); - - virtual void setUniform(const string &name, int value); - virtual void setUniform(const string &name, float value); - virtual void setUniform(const string &name, const Vec2f &value); - virtual void setUniform(const string &name, const Vec3f &value); - virtual void setUniform(const string &name, const Vec4f &value); - virtual void setUniform(const string &name, const Matrix3f &value); - virtual void setUniform(const string &name, const Matrix4f &value); - - void bindAttribute(const string &name, int index); - -private: - GLint getLocation(const string &name); -}; - -// ===================================================== -// class ShaderGl -// ===================================================== - -class ShaderGl: virtual public Shader{ -protected: - GLhandleARB handle; - ShaderSource source; - bool inited; - -public: - ShaderGl(); - - const ShaderSource *getSource() const {return &source;} - GLhandleARB getHandle() const {return handle;} - - virtual void load(const string &path); - virtual bool compile(string &messages); - virtual void end(); -}; - -// ===================================================== -// class VertexShaderGl -// ===================================================== - -class VertexShaderGl: public VertexShader, public ShaderGl{ -public: - virtual void init(); -}; - -// ===================================================== -// class FragmentShaderGl -// ===================================================== - -class FragmentShaderGl: public FragmentShader, public ShaderGl{ -public: - virtual void init(); -}; - -}}}//end namespace - -#endif