libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo es el conjunto de objetos y funciones, que permiten ejecutar las operaciones básicas de la plataforma Moldeo, y que compone su núcleo.
moShaderGLSL.h
Ir a la documentación de este archivo.
1 /*******************************************************************************
2 
3  moShaderGLSL.h
4 
5  ****************************************************************************
6  * *
7  * This source is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This code is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * A copy of the GNU General Public License is available on the World *
18  * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19  * obtain it by writing to the Free Software Foundation, *
20  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  * *
22  ****************************************************************************
23 
24  Copyright (C) 2006 Fabricio Costa
25 
26  Authors:
27  Fabricio Costa
28 
29 
30  Description:
31  Class for GLSL shaders.
32 
33 *******************************************************************************/
34 
35 #ifndef __MO_SHADER_GLSL_H__
36 #define __MO_SHADER_GLSL_H__
37 
38 #include "moShader.h"
39 
40 #ifdef OPENGLESV2
41 
42 #endif
43 
48 {
49 public:
53  moShaderGLSL();
57  virtual ~moShaderGLSL();
58 
63  virtual MOboolean Init();
68  virtual MOboolean Finish();
69 
74  virtual void CreateVertShader(const moText& vert_source);
79  virtual void CreateFragShader(const moText& frag_source);
84  virtual void CreateGeomShader(const moText& geom_source);
89  virtual void CreateTessShader(const moText& tess_source);
95  virtual void CreateShader( const moText& vert_source, const moText& frag_source);
96  virtual void CreateShader( const moText& vert_source, const moText& frag_source, const moText& geom_source);
97  virtual void CreateShader( const moText& vert_source, const moText& frag_source, const moText& geom_source, const moText& tess_source);
102  virtual void LoadVertShader( const moText& vert_filename);
107  virtual void LoadFragShader(const moText& frag_filename);
112  virtual void LoadGeomShader(const moText& geom_filename);
117  virtual void LoadTessShader(const moText& tess_filename);
126  virtual void LoadShader( const moText& vert_filename, const moText& frag_filename);
127  virtual void LoadShader(const moText& vert_filename, const moText& frag_filename, const moText& geom_filename);
128  virtual void LoadShader(const moText& vert_filename, const moText& frag_filename, const moText& geom_filename, const moText& tess_filename);
129 
130 
134  virtual void StartShader();
138  virtual void StopShader();
139 
143  void PrintVertShaderLog();
147  void PrintFragShaderLog();
148 
152  void PrintGeomShaderLog();
156  void PrintTessShaderLog();
157 
164  GLint GetUniformID(const moText& uName);
171  GLint GetAttribID(const moText& aName);
172 
173 
174 
175 protected:
176  GLhandleARB m_ProgramObject;
177  GLhandleARB m_FragmentShader;
178  GLhandleARB m_VertexShader;
179  GLhandleARB m_GeometryShader;
180  GLhandleARB m_TesselationShader;
181 
182  void compileVertShader(const moText& vert_source);
183  void compileFragShader(const moText& frag_source);
184  void compileGeomShader(const moText& geom_source);
185  void compileTessShader(const moText& tess_source);
186  void linkProgram();
187 
188  void printInfoLog(GLhandleARB obj);
189 };
190 
191 #endif
192 
virtual MOboolean Init()
Definition: moShader.cpp:214
GLhandleARB m_TesselationShader
Definition: moShaderGLSL.h:180
GLhandleARB m_VertexShader
Definition: moShaderGLSL.h:178
GLhandleARB m_ProgramObject
Definition: moShaderGLSL.h:176
#define MOboolean
Definition: moTypes.h:385
virtual void CreateShader(const moText &vert_source, const moText &frag_source)=0
virtual MOboolean Finish()
Definition: moShader.cpp:219
virtual void CreateFragShader(const moText &frag_source)=0
#define LIBMOLDEO_API
Definition: moTypes.h:180
virtual void StartShader()
Definition: moShader.cpp:228
clase de para manejar textos
Definition: moText.h:75
virtual void LoadShader(const moText &vert_filename, const moText &frag_filename)=0
virtual void compileTessShader(const moText &tess_source)=0
virtual void compileFragShader(const moText &frag_source)=0
virtual void compileGeomShader(const moText &geom_source)=0
virtual void CreateTessShader(const moText &tess_source)=0
GLhandleARB m_FragmentShader
Definition: moShaderGLSL.h:177
virtual void CreateVertShader(const moText &vert_source)=0
virtual void LoadVertShader(const moText &vert_filename)=0
virtual void StopShader()
Definition: moShader.cpp:233
virtual void LoadTessShader(const moText &tess_filename)=0
virtual void CreateGeomShader(const moText &geom_source)=0
virtual void LoadGeomShader(const moText &geom_filename)=0
virtual void compileVertShader(const moText &vert_source)=0
virtual void LoadFragShader(const moText &frag_filename)=0
GLhandleARB m_GeometryShader
Definition: moShaderGLSL.h:179