Duckcpp 2.1.0
Duckcpp 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 duckcpp/duckcpp.hpp
4
5#ifndef DCPP_I_MATERIAL_RENDERER_SERVICES_HPP_INCLUDED
6#define DCPP_I_MATERIAL_RENDERER_SERVICES_HPP_INCLUDED
7
8#include <duckcpp/core/engine/SMaterial.hpp>
9#include <duckcpp/core/engine/S3DVertex.hpp>
10
11namespace dcpp
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 i32 getVertexShaderConstantID(const c8* name) = 0;
43
45
69 virtual bool setVertexShaderConstant(i32 index, const f32* floats, int count) = 0;
70
72 virtual bool setVertexShaderConstant(i32 index, const i32* ints, int count) = 0;
73
75 /* NOTE: UINT only works with GLSL, not supported for other shaders */
76 virtual bool setVertexShaderConstant(i32 index, const u32* ints, int count) = 0;
77
79
84 virtual void setVertexShaderConstant(const f32* data, i32 startRegister, i32 constantAmount=1) = 0;
85
87 virtual i32 getPixelShaderConstantID(const c8* name) = 0;
88
90
97 virtual bool setPixelShaderConstant(i32 index, const f32* floats, int count) = 0;
98
100 virtual bool setPixelShaderConstant(i32 index, const i32* ints, int count) = 0;
101
103 /* NOTE: UINT only works with GLSL, not supported for other shaders */
104 virtual bool setPixelShaderConstant(i32 index, const u32* ints, int count) = 0;
105
107
112 virtual void setPixelShaderConstant(const f32* data, i32 startRegister, i32 constantAmount=1) = 0;
113
115 DCPP_DEPRECATED bool setVertexShaderConstant(const c8* name, const f32* floats, int count)
116 {
117 return setVertexShaderConstant(getVertexShaderConstantID(name), floats, count);
118 }
119
121 DCPP_DEPRECATED bool setVertexShaderConstant(const c8* name, const i32* ints, int count)
122 {
123 return setVertexShaderConstant(getVertexShaderConstantID(name), ints, count);
124 }
125
127 DCPP_DEPRECATED bool setPixelShaderConstant(const c8* name, const f32* floats, int count)
128 {
129 return setPixelShaderConstant(getPixelShaderConstantID(name), floats, count);
130 }
131
133 DCPP_DEPRECATED bool setPixelShaderConstant(const c8* name, const i32* ints, int count)
134 {
135 return setPixelShaderConstant(getPixelShaderConstantID(name), ints, count);
136 }
137
139
141};
142
143} // end namespace video
144} // end namespace dcpp
145
146#endif
Interface providing some methods for changing advanced, internal states of a IVideoDriver.
Definition IMaterialRendererServices.hpp:21
virtual bool setVertexShaderConstant(i32 index, const u32 *ints, int count)=0
Uint interface for the above.
DCPP_DEPRECATED bool setPixelShaderConstant(const c8 *name, const i32 *ints, int count)
Definition IMaterialRendererServices.hpp:133
virtual bool setPixelShaderConstant(i32 index, const u32 *ints, int count)=0
Uint interface for the above.
virtual bool setVertexShaderConstant(i32 index, const f32 *floats, int count)=0
Sets a constant for the vertex shader based on a name.
virtual ~IMaterialRendererServices()
Destructor.
Definition IMaterialRendererServices.hpp:25
virtual i32 getVertexShaderConstantID(const c8 *name)=0
Return an index constant for the vertex shader based on a name.
DCPP_DEPRECATED bool setVertexShaderConstant(const c8 *name, const f32 *floats, int count)
Definition IMaterialRendererServices.hpp:115
DCPP_DEPRECATED bool setVertexShaderConstant(const c8 *name, const i32 *ints, int count)
Definition IMaterialRendererServices.hpp:121
virtual i32 getPixelShaderConstantID(const c8 *name)=0
Return an index constant for the pixel 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.
DCPP_DEPRECATED bool setPixelShaderConstant(const c8 *name, const f32 *floats, int count)
Definition IMaterialRendererServices.hpp:127
virtual IVideoDriver * getVideoDriver()=0
Get pointer to the IVideoDriver interface.
virtual void setVertexShaderConstant(const f32 *data, i32 startRegister, i32 constantAmount=1)=0
Sets a vertex shader constant.
virtual void setPixelShaderConstant(const f32 *data, i32 startRegister, i32 constantAmount=1)=0
Sets a pixel shader constant.
virtual bool setPixelShaderConstant(i32 index, const f32 *floats, int count)=0
Sets a constant for the pixel shader based on a name.
virtual bool setVertexShaderConstant(i32 index, const i32 *ints, int count)=0
Int interface for the above.
virtual bool setPixelShaderConstant(i32 index, const i32 *ints, int count)=0
Int interface for the above.
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 Duckcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
char c8
8 bit character variable.
Definition irrTypes.hpp:37
signed int i32
32 bit signed variable.
Definition irrTypes.hpp:72
float f32
32 bit floating point variable.
Definition irrTypes.hpp:110
unsigned int u32
32 bit unsigned variable.
Definition irrTypes.hpp:64

Duckcpp    @cppfx.xyz