aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h194
1 files changed, 97 insertions, 97 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h b/libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h
index 6f5f580..a660df9 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/COpenGLShaderMaterialRenderer.h
@@ -1,97 +1,97 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__ 5#ifndef __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__
6#define __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__ 6#define __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__
7 7
8#include "IrrCompileConfig.h" 8#include "IrrCompileConfig.h"
9#ifdef _IRR_COMPILE_WITH_OPENGL_ 9#ifdef _IRR_COMPILE_WITH_OPENGL_
10 10
11#if defined(_IRR_OPENGL_USE_EXTPOINTER_) 11#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
12 #define GL_GLEXT_LEGACY 1 12 #define GL_GLEXT_LEGACY 1
13#else 13#else
14 #define GL_GLEXT_PROTOTYPES 1 14 #define GL_GLEXT_PROTOTYPES 1
15#endif 15#endif
16#ifdef _IRR_WINDOWS_API_ 16#ifdef _IRR_WINDOWS_API_
17 #define WIN32_LEAN_AND_MEAN 17 #define WIN32_LEAN_AND_MEAN
18 #include <windows.h> 18 #include <windows.h>
19 #include <GL/gl.h> 19 #include <GL/gl.h>
20#elif defined(_IRR_OSX_PLATFORM_) 20#elif defined(_IRR_OSX_PLATFORM_)
21 #include <OpenGL/gl.h> 21 #include <OpenGL/gl.h>
22#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_) 22#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
23 #define NO_SDL_GLEXT 23 #define NO_SDL_GLEXT
24 #include <SDL/SDL_video.h> 24 #include <SDL/SDL_video.h>
25 #include <SDL/SDL_opengl.h> 25 #include <SDL/SDL_opengl.h>
26#else 26#else
27 #include <GL/gl.h> 27 #include <GL/gl.h>
28#endif 28#endif
29 29
30#include "IMaterialRenderer.h" 30#include "IMaterialRenderer.h"
31 31
32namespace irr 32namespace irr
33{ 33{
34namespace video 34namespace video
35{ 35{
36 36
37class COpenGLDriver; 37class COpenGLDriver;
38class IShaderConstantSetCallBack; 38class IShaderConstantSetCallBack;
39class IMaterialRenderer; 39class IMaterialRenderer;
40 40
41//! Class for using vertex and pixel shaders with OpenGL 41//! Class for using vertex and pixel shaders with OpenGL
42class COpenGLShaderMaterialRenderer : public IMaterialRenderer 42class COpenGLShaderMaterialRenderer : public IMaterialRenderer
43{ 43{
44public: 44public:
45 45
46 //! Constructor 46 //! Constructor
47 COpenGLShaderMaterialRenderer(COpenGLDriver* driver, 47 COpenGLShaderMaterialRenderer(COpenGLDriver* driver,
48 s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram, 48 s32& outMaterialTypeNr, const c8* vertexShaderProgram, const c8* pixelShaderProgram,
49 IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData); 49 IShaderConstantSetCallBack* callback, IMaterialRenderer* baseMaterial, s32 userData);
50 50
51 //! Destructor 51 //! Destructor
52 virtual ~COpenGLShaderMaterialRenderer(); 52 virtual ~COpenGLShaderMaterialRenderer();
53 53
54 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, 54 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial,
55 bool resetAllRenderstates, IMaterialRendererServices* services); 55 bool resetAllRenderstates, IMaterialRendererServices* services);
56 56
57 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype); 57 virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype);
58 58
59 virtual void OnUnsetMaterial(); 59 virtual void OnUnsetMaterial();
60 60
61 //! Returns if the material is transparent. 61 //! Returns if the material is transparent.
62 virtual bool isTransparent() const; 62 virtual bool isTransparent() const;
63 63
64protected: 64protected:
65 65
66 //! constructor only for use by derived classes who want to 66 //! constructor only for use by derived classes who want to
67 //! create a fall back material for example. 67 //! create a fall back material for example.
68 COpenGLShaderMaterialRenderer(COpenGLDriver* driver, 68 COpenGLShaderMaterialRenderer(COpenGLDriver* driver,
69 IShaderConstantSetCallBack* callback, 69 IShaderConstantSetCallBack* callback,
70 IMaterialRenderer* baseMaterial, s32 userData=0); 70 IMaterialRenderer* baseMaterial, s32 userData=0);
71 71
72 // must not be called more than once! 72 // must not be called more than once!
73 void init(s32& outMaterialTypeNr, const c8* vertexShaderProgram, 73 void init(s32& outMaterialTypeNr, const c8* vertexShaderProgram,
74 const c8* pixelShaderProgram, E_VERTEX_TYPE type); 74 const c8* pixelShaderProgram, E_VERTEX_TYPE type);
75 75
76 bool createPixelShader(const c8* pxsh); 76 bool createPixelShader(const c8* pxsh);
77 bool createVertexShader(const c8* vtxsh); 77 bool createVertexShader(const c8* vtxsh);
78 bool checkError(const irr::c8* type); 78 bool checkError(const irr::c8* type);
79 79
80 COpenGLDriver* Driver; 80 COpenGLDriver* Driver;
81 IShaderConstantSetCallBack* CallBack; 81 IShaderConstantSetCallBack* CallBack;
82 IMaterialRenderer* BaseMaterial; 82 IMaterialRenderer* BaseMaterial;
83 83
84 GLuint VertexShader; 84 GLuint VertexShader;
85 // We have 4 values here, [0] is the non-fog version, the other three are 85 // We have 4 values here, [0] is the non-fog version, the other three are
86 // ARB_fog_linear, ARB_fog_exp, and ARB_fog_exp2 in that order 86 // ARB_fog_linear, ARB_fog_exp, and ARB_fog_exp2 in that order
87 core::array<GLuint> PixelShader; 87 core::array<GLuint> PixelShader;
88 s32 UserData; 88 s32 UserData;
89}; 89};
90 90
91 91
92} // end namespace video 92} // end namespace video
93} // end namespace irr 93} // end namespace irr
94 94
95#endif 95#endif
96#endif 96#endif
97 97