arsa  2.7
IMaterialRendererServices.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2012 Nikolaus Gebhardt
2 // This file is part of the "Irrlicht Engine".
3 // For conditions of distribution and use, see copyright notice in irrlicht.h
4 
5 #ifndef __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__
6 #define __I_MATERIAL_RENDERER_SERVICES_H_INCLUDED__
7 
8 #include "SMaterial.h"
9 #include "S3DVertex.h"
10 
11 namespace irr
12 {
13 namespace video
14 {
15 
16 class IVideoDriver;
17 
18 
21 {
22 public:
23 
26 
28 
37  virtual void setBasicRenderStates(const SMaterial& material,
38  const SMaterial& lastMaterial,
39  bool resetAllRenderstates) = 0;
40 
42  virtual s32 getVertexShaderConstantID(const c8* name) = 0;
43 
45 
69  virtual bool setVertexShaderConstant(s32 index, const f32* floats, int count) = 0;
70 
72  virtual bool setVertexShaderConstant(s32 index, const s32* ints, int count) = 0;
73 
75 
80  virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
81 
83  virtual s32 getPixelShaderConstantID(const c8* name) = 0;
84 
86 
93  virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count) = 0;
94 
96  virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count) = 0;
97 
99 
104  virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
105 
107  _IRR_DEPRECATED_ bool setVertexShaderConstant(const c8* name, const f32* floats, int count)
108  {
110  }
111 
113  _IRR_DEPRECATED_ bool setVertexShaderConstant(const c8* name, const s32* ints, int count)
114  {
116  }
117 
119  _IRR_DEPRECATED_ bool setPixelShaderConstant(const c8* name, const f32* floats, int count)
120  {
122  }
123 
125  _IRR_DEPRECATED_ bool setPixelShaderConstant(const c8* name, const s32* ints, int count)
126  {
128  }
129 
131 
132  virtual IVideoDriver* getVideoDriver() = 0;
133 };
134 
135 } // end namespace video
136 } // end namespace irr
137 
138 #endif
139 
#define _IRR_DEPRECATED_
Defines a deprecated macro which generates a warning at compile time.
Definition: irrTypes.h:202
Interface providing some methods for changing advanced, internal states of a IVideoDriver.
float f32
32 bit floating point variable.
Definition: irrTypes.h:108
GLuint GLuint GLsizei count
Definition: SDL_opengl.h:1571
char c8
8 bit character variable.
Definition: irrTypes.h:35
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
virtual IVideoDriver * getVideoDriver()=0
Get pointer to the IVideoDriver interface.
GLuint const GLchar * name
_IRR_DEPRECATED_ bool setPixelShaderConstant(const c8 *name, const f32 *floats, int count)
Everything in the Irrlicht Engine can be found in this namespace.
Definition: CARSADPad.h:6
virtual s32 getPixelShaderConstantID(const c8 *name)=0
Return an index constant for the pixel shader based on a name.
_IRR_DEPRECATED_ bool setVertexShaderConstant(const c8 *name, const f32 *floats, int count)
signed int s32
32 bit signed variable.
Definition: irrTypes.h:70
virtual void setBasicRenderStates(const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates)=0
Can be called by an IMaterialRenderer to make its work easier.
virtual s32 getVertexShaderConstantID(const c8 *name)=0
Return an index constant for the vertex shader based on a name.
_IRR_DEPRECATED_ bool setPixelShaderConstant(const c8 *name, const s32 *ints, int count)
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition: IVideoDriver.h:151
GLuint index
_IRR_DEPRECATED_ bool setVertexShaderConstant(const c8 *name, const s32 *ints, int count)
virtual bool setPixelShaderConstant(s32 index, const f32 *floats, int count)=0
Sets a constant for the pixel shader based on a name.
virtual bool setVertexShaderConstant(s32 index, const f32 *floats, int count)=0
Sets a constant for the vertex shader based on a name.
Struct for holding parameters for a material renderer.
Definition: SMaterial.h:304