aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/COpenGLCgMaterialRenderer.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/COpenGLCgMaterialRenderer.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/COpenGLCgMaterialRenderer.h198
1 files changed, 99 insertions, 99 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/COpenGLCgMaterialRenderer.h b/libraries/irrlicht-1.8/source/Irrlicht/COpenGLCgMaterialRenderer.h
index 74c43c5..509c43e 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/COpenGLCgMaterialRenderer.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/COpenGLCgMaterialRenderer.h
@@ -1,99 +1,99 @@
1// Copyright (C) 2012-2012 Patryk Nadrowski 1// Copyright (C) 2012-2012 Patryk Nadrowski
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_CG_MATERIAL_RENDERER_H_INCLUDED__ 5#ifndef __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__
6#define __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__ 6#define __C_OPENGL_CG_MATERIAL_RENDERER_H_INCLUDED__
7 7
8#include "IrrCompileConfig.h" 8#include "IrrCompileConfig.h"
9#if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_) 9#if defined(_IRR_COMPILE_WITH_OPENGL_) && defined(_IRR_COMPILE_WITH_CG_)
10 10
11#ifdef _IRR_WINDOWS_API_ 11#ifdef _IRR_WINDOWS_API_
12 #define WIN32_LEAN_AND_MEAN 12 #define WIN32_LEAN_AND_MEAN
13 #include <windows.h> 13 #include <windows.h>
14 #include <GL/gl.h> 14 #include <GL/gl.h>
15 #include "glext.h" 15 #include "glext.h"
16#else 16#else
17#if defined(_IRR_OPENGL_USE_EXTPOINTER_) 17#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
18 #define GL_GLEXT_LEGACY 1 18 #define GL_GLEXT_LEGACY 1
19#else 19#else
20 #define GL_GLEXT_PROTOTYPES 1 20 #define GL_GLEXT_PROTOTYPES 1
21#endif 21#endif
22#if defined(_IRR_OSX_PLATFORM_) 22#if defined(_IRR_OSX_PLATFORM_)
23 #include <OpenGL/gl.h> 23 #include <OpenGL/gl.h>
24#else 24#else
25 #include <GL/gl.h> 25 #include <GL/gl.h>
26#endif 26#endif
27#if defined(_IRR_OPENGL_USE_EXTPOINTER_) 27#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
28 #include "glext.h" 28 #include "glext.h"
29#endif 29#endif
30#endif 30#endif
31 31
32#include "CCgMaterialRenderer.h" 32#include "CCgMaterialRenderer.h"
33#include "Cg/cgGL.h" 33#include "Cg/cgGL.h"
34 34
35#ifdef _MSC_VER 35#ifdef _MSC_VER
36 #pragma comment(lib, "cgGL.lib") 36 #pragma comment(lib, "cgGL.lib")
37#endif 37#endif
38 38
39namespace irr 39namespace irr
40{ 40{
41namespace video 41namespace video
42{ 42{
43 43
44class COpenGLDriver; 44class COpenGLDriver;
45class IShaderConstantSetCallBack; 45class IShaderConstantSetCallBack;
46 46
47class COpenGLCgUniformSampler2D : public CCgUniform 47class COpenGLCgUniformSampler2D : public CCgUniform
48{ 48{
49public: 49public:
50 COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global); 50 COpenGLCgUniformSampler2D(const CGparameter& parameter, bool global);
51 51
52 void update(const void* data, const SMaterial& material) const; 52 void update(const void* data, const SMaterial& material) const;
53}; 53};
54 54
55class COpenGLCgMaterialRenderer : public CCgMaterialRenderer 55class COpenGLCgMaterialRenderer : public CCgMaterialRenderer
56{ 56{
57public: 57public:
58 COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType, 58 COpenGLCgMaterialRenderer(COpenGLDriver* driver, s32& materialType,
59 const c8* vertexProgram = 0, const c8* vertexEntry = "main", 59 const c8* vertexProgram = 0, const c8* vertexEntry = "main",
60 E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, 60 E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
61 const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", 61 const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
62 E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, 62 E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
63 const c8* geometryProgram = 0, const c8* geometryEntry = "main", 63 const c8* geometryProgram = 0, const c8* geometryEntry = "main",
64 E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, 64 E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
65 scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, 65 scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
66 scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, 66 scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
67 u32 vertices = 0, IShaderConstantSetCallBack* callback = 0, 67 u32 vertices = 0, IShaderConstantSetCallBack* callback = 0,
68 IMaterialRenderer* baseMaterial = 0, s32 userData = 0); 68 IMaterialRenderer* baseMaterial = 0, s32 userData = 0);
69 69
70 virtual ~COpenGLCgMaterialRenderer(); 70 virtual ~COpenGLCgMaterialRenderer();
71 71
72 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services); 72 virtual void OnSetMaterial(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates, IMaterialRendererServices* services);
73 virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype); 73 virtual bool OnRender(IMaterialRendererServices* services, E_VERTEX_TYPE vtxtype);
74 virtual void OnUnsetMaterial(); 74 virtual void OnUnsetMaterial();
75 75
76 virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates); 76 virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastMaterial, bool resetAllRenderstates);
77 virtual IVideoDriver* getVideoDriver(); 77 virtual IVideoDriver* getVideoDriver();
78 78
79protected: 79protected:
80 void init(s32& materialType, 80 void init(s32& materialType,
81 const c8* vertexProgram = 0, const c8* vertexEntry = "main", 81 const c8* vertexProgram = 0, const c8* vertexEntry = "main",
82 E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1, 82 E_VERTEX_SHADER_TYPE vertexProfile = video::EVST_VS_1_1,
83 const c8* fragmentProgram = 0, const c8* fragmentEntry = "main", 83 const c8* fragmentProgram = 0, const c8* fragmentEntry = "main",
84 E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1, 84 E_PIXEL_SHADER_TYPE fragmentProfile = video::EPST_PS_1_1,
85 const c8* geometryProgram = 0, const c8* geometryEntry = "main", 85 const c8* geometryProgram = 0, const c8* geometryEntry = "main",
86 E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0, 86 E_GEOMETRY_SHADER_TYPE geometryProfile = video::EGST_GS_4_0,
87 scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES, 87 scene::E_PRIMITIVE_TYPE inType = scene::EPT_TRIANGLES,
88 scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP, 88 scene::E_PRIMITIVE_TYPE outType = scene::EPT_TRIANGLE_STRIP,
89 u32 vertices = 0); 89 u32 vertices = 0);
90 90
91 COpenGLDriver* Driver; 91 COpenGLDriver* Driver;
92}; 92};
93 93
94} 94}
95} 95}
96 96
97#endif 97#endif
98#endif 98#endif
99 99