Jimcpp 2.1.0
Jimcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IMaterialRendererServices.hpp
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 jimcpp/jimcpp.hpp
4
5#ifndef JPP_I_MATERIAL_RENDERER_SERVICES_HPP_INCLUDED
6#define JPP_I_MATERIAL_RENDERER_SERVICES_HPP_INCLUDED
7
8#include <jimcpp/core/engine/SMaterial.hpp>
9#include <jimcpp/core/engine/S3DVertex.hpp>
10
11namespace jpp
12{
13namespace video
14{
15
16class IVideoDriver;
17
18
21{
22public:
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 /* NOTE: UINT only works with GLSL, not supported for other shaders */
76 virtual bool setVertexShaderConstant(s32 index, const u32* ints, int count) = 0;
77
79
84 virtual void setVertexShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
85
87 virtual s32 getPixelShaderConstantID(const c8* name) = 0;
88
90
97 virtual bool setPixelShaderConstant(s32 index, const f32* floats, int count) = 0;
98
100 virtual bool setPixelShaderConstant(s32 index, const s32* ints, int count) = 0;
101
103 /* NOTE: UINT only works with GLSL, not supported for other shaders */
104 virtual bool setPixelShaderConstant(s32 index, const u32* ints, int count) = 0;
105
107
112 virtual void setPixelShaderConstant(const f32* data, s32 startRegister, s32 constantAmount=1) = 0;
113
115 JPP_DEPRECATED bool setVertexShaderConstant(const c8* name, const f32* floats, int count)
116 {
117 return setVertexShaderConstant(getVertexShaderConstantID(name), floats, count);
118 }
119
121 JPP_DEPRECATED bool setVertexShaderConstant(const c8* name, const s32* ints, int count)
122 {
123 return setVertexShaderConstant(getVertexShaderConstantID(name), ints, count);
124 }
125
127 JPP_DEPRECATED bool setPixelShaderConstant(const c8* name, const f32* floats, int count)
128 {
129 return setPixelShaderConstant(getPixelShaderConstantID(name), floats, count);
130 }
131
133 JPP_DEPRECATED bool setPixelShaderConstant(const c8* name, const s32* ints, int count)
134 {
135 return setPixelShaderConstant(getPixelShaderConstantID(name), ints, count);
136 }
137
139
141};
142
143} // end namespace video
144} // end namespace jpp
145
146#endif
Interface providing some methods for changing advanced, internal states of a IVideoDriver.
Definition IMaterialRendererServices.hpp:21
JPP_DEPRECATED bool setVertexShaderConstant(const c8 *name, const s32 *ints, int count)
Definition IMaterialRendererServices.hpp:121
virtual s32 getVertexShaderConstantID(const c8 *name)=0
Return an index constant for the vertex shader based on a name.
virtual void setBasicRenderStates(const SMaterial &material, const SMaterial &lastMaterial, bool resetAllRenderstates)=0
Can be called by an IMaterialRenderer to make its work easier.
virtual void setVertexShaderConstant(const f32 *data, s32 startRegister, s32 constantAmount=1)=0
Sets a vertex shader constant.
JPP_DEPRECATED bool setPixelShaderConstant(const c8 *name, const f32 *floats, int count)
Definition IMaterialRendererServices.hpp:127
virtual void setPixelShaderConstant(const f32 *data, s32 startRegister, s32 constantAmount=1)=0
Sets a pixel shader constant.
virtual bool setVertexShaderConstant(s32 index, const u32 *ints, int count)=0
Uint interface for the above.
virtual bool setVertexShaderConstant(s32 index, const f32 *floats, int count)=0
Sets a constant for the vertex shader based on a name.
virtual s32 getPixelShaderConstantID(const c8 *name)=0
Return an index constant for the pixel shader based on a name.
JPP_DEPRECATED bool setPixelShaderConstant(const c8 *name, const s32 *ints, int count)
Definition IMaterialRendererServices.hpp:133
virtual IVideoDriver * getVideoDriver()=0
Get pointer to the IVideoDriver interface.
virtual bool setVertexShaderConstant(s32 index, const s32 *ints, int count)=0
Int interface for the above.
virtual bool setPixelShaderConstant(s32 index, const u32 *ints, int count)=0
Uint interface for the above.
virtual ~IMaterialRendererServices()
Destructor.
Definition IMaterialRendererServices.hpp:25
JPP_DEPRECATED bool setVertexShaderConstant(const c8 *name, const f32 *floats, int count)
Definition IMaterialRendererServices.hpp:115
virtual bool setPixelShaderConstant(s32 index, const s32 *ints, int count)=0
Int interface for the above.
virtual bool setPixelShaderConstant(s32 index, const f32 *floats, int count)=0
Sets a constant for the pixel shader based on a name.
Interface to driver which is able to perform 2d and 3d graphics functions.
Definition IVideoDriver.hpp:152
Class for holding parameters for a material renderer.
Definition SMaterial.hpp:304
As of Jimcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
signed int s32
32 bit signed variable.
Definition irrTypes.hpp:72
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110
char c8
8 bit character variable.
Definition irrTypes.hpp:37

Jimcpp    @cppfx.xyz

K