Nirtcpp 2.1.0
Nirtcpp is a high-performance c++ graphics engine.
Loading...
Searching...
No Matches
IGPUProgrammingServices.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 nirtcpp/nirtcpp.hpp
4
5#ifndef NIRT_I_GPU_PROGRAMMING_SERVICES_HPP_INCLUDED
6#define NIRT_I_GPU_PROGRAMMING_SERVICES_HPP_INCLUDED
7
8#include <nirtcpp/core/engine/EShaderTypes.hpp>
9#include <nirtcpp/core/engine/EMaterialTypes.hpp>
10#include <nirtcpp/core/engine/EPrimitiveTypes.hpp>
11#include <nirtcpp/core/engine/path.hpp>
12
13namespace nirt
14{
15
16namespace io
17{
18 class IReadFile;
19} // end namespace io
20
21namespace video
22{
23
24class IVideoDriver;
25class IShaderConstantSetCallBack;
26
29{
30public:
31
34
36
77 const c8* vertexShaderProgram,
78 const c8* vertexShaderEntryPointName,
79 E_VERTEX_SHADER_TYPE vsCompileTarget,
80 const c8* pixelShaderProgram,
81 const c8* pixelShaderEntryPointName,
82 E_PIXEL_SHADER_TYPE psCompileTarget,
83 const c8* geometryShaderProgram,
84 const c8* geometryShaderEntryPointName = "main",
85 E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
88 u32 verticesOut = 0,
89 IShaderConstantSetCallBack* callback = 0,
90 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
91 s32 userData = 0) = 0;
92
95 const c8* vertexShaderProgram,
96 const c8* vertexShaderEntryPointName="main",
97 E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1,
98 const c8* pixelShaderProgram=0,
99 const c8* pixelShaderEntryPointName="main",
100 E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1,
101 IShaderConstantSetCallBack* callback=0,
103 s32 userData=0)
104 {
106 vertexShaderProgram, vertexShaderEntryPointName,
107 vsCompileTarget, pixelShaderProgram,
108 pixelShaderEntryPointName, psCompileTarget,
109 0, "main", EGST_GS_4_0,
111 callback, baseMaterial, userData);
112 }
113
115
119 const c8* vertexShaderProgram,
120 const c8* pixelShaderProgram=0,
121 IShaderConstantSetCallBack* callback=0,
122 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
123 s32 userData=0)
124 {
126 vertexShaderProgram, "main",
127 EVST_VS_1_1, pixelShaderProgram,
128 "main", EPST_PS_1_1,
129 0, "main", EGST_GS_4_0,
131 callback, baseMaterial, userData);
132 }
133
135
139 const c8* vertexShaderProgram,
140 const c8* pixelShaderProgram = 0,
141 const c8* geometryShaderProgram = 0,
144 u32 verticesOut = 0,
145 IShaderConstantSetCallBack* callback = 0,
146 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
147 s32 userData = 0 )
148 {
150 vertexShaderProgram, "main",
151 EVST_VS_1_1, pixelShaderProgram,
152 "main", EPST_PS_1_1,
153 geometryShaderProgram, "main", EGST_GS_4_0,
154 inType, outType, verticesOut,
155 callback, baseMaterial, userData);
156 }
157
159
201 const io::path& vertexShaderProgramFileName,
202 const c8* vertexShaderEntryPointName,
203 E_VERTEX_SHADER_TYPE vsCompileTarget,
204 const io::path& pixelShaderProgramFileName,
205 const c8* pixelShaderEntryPointName,
206 E_PIXEL_SHADER_TYPE psCompileTarget,
207 const io::path& geometryShaderProgramFileName,
208 const c8* geometryShaderEntryPointName = "main",
209 E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
212 u32 verticesOut = 0,
213 IShaderConstantSetCallBack* callback = 0,
214 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
215 s32 userData = 0) = 0;
216
219 const io::path& vertexShaderProgramFileName,
220 const c8* vertexShaderEntryPointName = "main",
221 E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
222 const io::path& pixelShaderProgramFileName = "",
223 const c8* pixelShaderEntryPointName = "main",
224 E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
225 IShaderConstantSetCallBack* callback = 0,
226 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
227 s32 userData = 0)
228 {
230 vertexShaderProgramFileName, vertexShaderEntryPointName,
231 vsCompileTarget, pixelShaderProgramFileName,
232 pixelShaderEntryPointName, psCompileTarget,
233 "", "main", EGST_GS_4_0,
235 callback, baseMaterial, userData);
236 }
237
239
243 const io::path& vertexShaderProgramFileName,
244 const io::path& pixelShaderProgramFileName = "",
245 IShaderConstantSetCallBack* callback = 0,
246 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
247 s32 userData = 0 )
248 {
250 vertexShaderProgramFileName, "main",
251 EVST_VS_1_1, pixelShaderProgramFileName,
252 "main", EPST_PS_1_1,
253 "", "main", EGST_GS_4_0,
255 callback, baseMaterial, userData);
256 }
257
259
263 const io::path& vertexShaderProgramFileName,
264 const io::path& pixelShaderProgramFileName = "",
265 const io::path& geometryShaderProgramFileName = "",
268 u32 verticesOut = 0,
269 IShaderConstantSetCallBack* callback = 0,
270 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
271 s32 userData = 0 )
272 {
274 vertexShaderProgramFileName, "main",
275 EVST_VS_1_1, pixelShaderProgramFileName,
276 "main", EPST_PS_1_1,
277 geometryShaderProgramFileName, "main", EGST_GS_4_0,
278 inType, outType, verticesOut,
279 callback, baseMaterial, userData);
280 }
281
283
323 io::IReadFile* vertexShaderProgram,
324 const c8* vertexShaderEntryPointName,
325 E_VERTEX_SHADER_TYPE vsCompileTarget,
326 io::IReadFile* pixelShaderProgram,
327 const c8* pixelShaderEntryPointName,
328 E_PIXEL_SHADER_TYPE psCompileTarget,
329 io::IReadFile* geometryShaderProgram,
330 const c8* geometryShaderEntryPointName = "main",
331 E_GEOMETRY_SHADER_TYPE gsCompileTarget = EGST_GS_4_0,
334 u32 verticesOut = 0,
335 IShaderConstantSetCallBack* callback = 0,
336 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
337 s32 userData = 0) = 0;
338
341 io::IReadFile* vertexShaderProgram,
342 const c8* vertexShaderEntryPointName = "main",
343 E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
344 io::IReadFile* pixelShaderProgram = 0,
345 const c8* pixelShaderEntryPointName = "main",
346 E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
347 IShaderConstantSetCallBack* callback = 0,
348 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
349 s32 userData = 0)
350 {
352 vertexShaderProgram, vertexShaderEntryPointName,
353 vsCompileTarget, pixelShaderProgram,
354 pixelShaderEntryPointName, psCompileTarget,
355 0, "main", EGST_GS_4_0,
357 callback, baseMaterial, userData);
358 }
359
361
394 virtual s32 addShaderMaterial(const c8* vertexShaderProgram = 0,
395 const c8* pixelShaderProgram = 0,
396 IShaderConstantSetCallBack* callback = 0,
397 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
398 s32 userData = 0) = 0;
399
401
418 virtual s32 addShaderMaterialFromFiles(io::IReadFile* vertexShaderProgram,
419 io::IReadFile* pixelShaderProgram,
420 IShaderConstantSetCallBack* callback = 0,
421 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
422 s32 userData = 0) = 0;
423
425
443 virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName,
444 const io::path& pixelShaderProgramFileName,
445 IShaderConstantSetCallBack* callback = 0,
446 E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
447 s32 userData = 0) = 0;
448};
449
450
451} // end namespace video
452} // end namespace nirt
453
454#endif
Interface providing read access to a file.
Definition IReadFile.hpp:19
Interface making it possible to create and use programs running on the GPU.
Definition IGPUProgrammingServices.hpp:29
virtual s32 addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const io::path &pixelShaderProgramFileName, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const io::path &geometryShaderProgramFileName, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.
virtual s32 addShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.
s32 addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use with many defaults, without geometry shader
Definition IGPUProgrammingServices.hpp:242
virtual ~IGPUProgrammingServices()
Destructor.
Definition IGPUProgrammingServices.hpp:33
virtual s32 addShaderMaterial(const c8 *vertexShaderProgram=0, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Adds a new ASM shader material renderer to the VideoDriver.
virtual s32 addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, io::IReadFile *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, io::IReadFile *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.
virtual s32 addShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, io::IReadFile *pixelShaderProgram, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Like IGPUProgrammingServices::addShaderMaterial(), but loads from files.
virtual s32 addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName, E_VERTEX_SHADER_TYPE vsCompileTarget, const c8 *pixelShaderProgram, const c8 *pixelShaderEntryPointName, E_PIXEL_SHADER_TYPE psCompileTarget, const c8 *geometryShaderProgram, const c8 *geometryShaderEntryPointName="main", E_GEOMETRY_SHADER_TYPE gsCompileTarget=EGST_GS_4_0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)=0
Adds a new high-level shading material renderer to the VideoDriver.
s32 addHighLevelShaderMaterialFromFiles(io::IReadFile *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, io::IReadFile *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use without geometry shaders
Definition IGPUProgrammingServices.hpp:340
s32 addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, const c8 *geometryShaderProgram=0, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use with many defaults, with geometry shader
Definition IGPUProgrammingServices.hpp:138
s32 addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const io::path &pixelShaderProgramFileName="", const io::path &geometryShaderProgramFileName="", scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, scene::E_PRIMITIVE_TYPE outType=scene::EPT_TRIANGLE_STRIP, u32 verticesOut=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use with many defaults, with geometry shader
Definition IGPUProgrammingServices.hpp:262
s32 addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *pixelShaderProgram=0, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use with many defaults, without geometry shader
Definition IGPUProgrammingServices.hpp:118
s32 addHighLevelShaderMaterialFromFiles(const io::path &vertexShaderProgramFileName, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const io::path &pixelShaderProgramFileName="", const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use without geometry shaders
Definition IGPUProgrammingServices.hpp:218
s32 addHighLevelShaderMaterial(const c8 *vertexShaderProgram, const c8 *vertexShaderEntryPointName="main", E_VERTEX_SHADER_TYPE vsCompileTarget=EVST_VS_1_1, const c8 *pixelShaderProgram=0, const c8 *pixelShaderEntryPointName="main", E_PIXEL_SHADER_TYPE psCompileTarget=EPST_PS_1_1, IShaderConstantSetCallBack *callback=0, E_MATERIAL_TYPE baseMaterial=video::EMT_SOLID, s32 userData=0)
convenience function for use without geometry shaders
Definition IGPUProgrammingServices.hpp:94
Interface making it possible to set constants for gpu programs every frame.
Definition IShaderConstantSetCallBack.hpp:22
E_PRIMITIVE_TYPE
Enumeration for all primitive types there are.
Definition EPrimitiveTypes.hpp:15
@ EPT_TRIANGLES
Explicitly set all vertices for each triangle.
Definition EPrimitiveTypes.hpp:37
@ EPT_TRIANGLE_STRIP
Definition EPrimitiveTypes.hpp:30
E_GEOMETRY_SHADER_TYPE
Enum for supported geometry shader types.
Definition EShaderTypes.hpp:73
E_VERTEX_SHADER_TYPE
Compile target enumeration for the addHighLevelShaderMaterial() method.
Definition EShaderTypes.hpp:13
E_PIXEL_SHADER_TYPE
Compile target enumeration for the addHighLevelShaderMaterial() method.
Definition EShaderTypes.hpp:39
E_MATERIAL_TYPE
Abstracted and easy to use fixed function/programmable pipeline material modes.
Definition EMaterialTypes.hpp:15
@ EMT_SOLID
Standard solid material.
Definition EMaterialTypes.hpp:19
As of Nirtcpp 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
char c8
8 bit character variable.
Definition irrTypes.hpp:37

Nirtcpp    @cppfx.xyz

Esvcpp    esv::print