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.
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Amigas 'defines' Grupos Páginas
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);
85  virtual void CreateShader( const moText& vert_source, const moText& frag_source);
90  virtual void LoadVertShader( const moText& vert_filename);
95  virtual void LoadFragShader(const moText& frag_filename);
102  virtual void LoadShader( const moText& vert_filename, const moText& frag_filename);
103 
107  virtual void StartShader();
111  virtual void StopShader();
112 
116  void PrintVertShaderLog();
120  void PrintFragShaderLog();
121 
128  GLint GetUniformID(const moText& uName);
135  GLint GetAttribID(const moText& aName);
136 protected:
137  GLhandleARB m_ProgramObject;
138  GLhandleARB m_FragmentShader;
139  GLhandleARB m_VertexShader;
140 
141  void compileVertShader(const moText& vert_source);
142  void compileFragShader(const moText& frag_source);
143  void linkProgram();
144 
145  void printInfoLog(GLhandleARB obj);
146 };
147 
148 #endif
149 
virtual MOboolean Init()
Definition: moShader.cpp:214
GLhandleARB m_VertexShader
Definition: moShaderGLSL.h:139
GLhandleARB m_ProgramObject
Definition: moShaderGLSL.h:137
#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 compileFragShader(const moText &frag_source)=0
GLhandleARB m_FragmentShader
Definition: moShaderGLSL.h:138
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 compileVertShader(const moText &vert_source)=0
virtual void LoadFragShader(const moText &frag_filename)=0