20#include "../primitive/background.h"
21#include "../primitive/vertices.h"
22#include "../primitive/indices.h"
23#include "../primitive/state.h"
24#include "../primitive/geometry.h"
25#include "../primitive/sampler.h"
26#include "../primitive/program.h"
27#include "../primitive/material.h"
28#include "../primitive/primitive.h"
29#include "../primitive/target.h"
30#include "../make/variantmaker.h"
38 std::shared_ptr<Vertices>
_vertices(
const std::shared_ptr<Float32Array>& buffer,
40 unsigned int stride = 0,
41 unsigned int divisor = 0);
42 std::shared_ptr<Vertices>
_vertices(
const std::shared_ptr<Int32Array>& buffer,
44 unsigned int stride = 0,
45 unsigned int divisor = 0);
46 std::shared_ptr<Vertices>
_vertices(
const std::initializer_list<float>& array,
48 unsigned int stride = 0,
49 unsigned int divisor = 0);
66 std::shared_ptr<ArrayIndices>
_lines(
int count,
75 std::shared_ptr<ArrayIndices>
_points(
int count,
80 const std::shared_ptr<Uint8Array>& buffer,
85 const std::shared_ptr<Uint16Array>& buffer,
90 const std::shared_ptr<Uint32Array>& buffer,
95 std::shared_ptr<ElementIndices>
_triangles(
const std::shared_ptr<Uint8Array>& buffer,
99 std::shared_ptr<ElementIndices>
_triangles(
const std::shared_ptr<Uint16Array>& buffer,
103 std::shared_ptr<ElementIndices>
_triangles(
const std::shared_ptr<Uint32Array>& buffer,
107 std::shared_ptr<ElementIndices>
_triangles(
const std::initializer_list<unsigned int>& array,
112 std::shared_ptr<ElementIndices>
_triangle_fan(
const std::shared_ptr<Uint8Array>& buffer,
116 std::shared_ptr<ElementIndices>
_triangle_fan(
const std::shared_ptr<Uint16Array>& buffer,
120 std::shared_ptr<ElementIndices>
_triangle_fan(
const std::shared_ptr<Uint32Array>& buffer,
124 std::shared_ptr<ElementIndices>
_triangle_fan(
const std::initializer_list<unsigned int>& array,
129 std::shared_ptr<ElementIndices>
_triangle_strip(
const std::shared_ptr<Uint8Array>& buffer,
133 std::shared_ptr<ElementIndices>
_triangle_strip(
const std::shared_ptr<Uint16Array>& buffer,
137 std::shared_ptr<ElementIndices>
_triangle_strip(
const std::shared_ptr<Uint32Array>& buffer,
141 std::shared_ptr<ElementIndices>
_triangle_strip(
const std::initializer_list<unsigned int>& array,
146 std::shared_ptr<ElementIndices>
_lines(
const std::shared_ptr<Uint8Array>& buffer,
150 std::shared_ptr<ElementIndices>
_lines(
const std::shared_ptr<Uint16Array>& buffer,
154 std::shared_ptr<ElementIndices>
_lines(
const std::shared_ptr<Uint32Array>& buffer,
158 std::shared_ptr<ElementIndices>
_lines(
const std::initializer_list<unsigned int>& array,
163 std::shared_ptr<ElementIndices>
_line_strip(
const std::shared_ptr<Uint8Array>& buffer,
167 std::shared_ptr<ElementIndices>
_line_strip(
const std::shared_ptr<Uint16Array>& buffer,
171 std::shared_ptr<ElementIndices>
_line_strip(
const std::shared_ptr<Uint32Array>& buffer,
175 std::shared_ptr<ElementIndices>
_line_strip(
const std::initializer_list<unsigned int>& array,
180 std::shared_ptr<ElementIndices>
_line_loop(
const std::shared_ptr<Uint8Array>& buffer,
184 std::shared_ptr<ElementIndices>
_line_loop(
const std::shared_ptr<Uint16Array>& buffer,
188 std::shared_ptr<ElementIndices>
_line_loop(
const std::shared_ptr<Uint32Array>& buffer,
192 std::shared_ptr<ElementIndices>
_line_loop(
const std::initializer_list<unsigned int>& array,
197 std::shared_ptr<ElementIndices>
_points(
const std::shared_ptr<Uint8Array>& buffer,
201 std::shared_ptr<ElementIndices>
_points(
const std::shared_ptr<Uint16Array>& buffer,
205 std::shared_ptr<ElementIndices>
_points(
const std::shared_ptr<Uint32Array>& buffer,
209 std::shared_ptr<ElementIndices>
_points(
const std::initializer_list<unsigned int>& array,
214 std::shared_ptr<std::map<std::string, std::shared_ptr<Vertices>>>
operator|(
215 const std::shared_ptr<std::map<std::string, std::shared_ptr<Vertices>>>& lhs,
216 const std::shared_ptr<std::map<std::string, std::shared_ptr<Vertices>>>& rhs);
219 std::shared_ptr<std::map<std::string, std::shared_ptr<Vertices>>>
_verticesSet(
const std::map<std::string, std::shared_ptr<Vertices>>& verticesMap);
222 std::shared_ptr<Geometry>
_geometry(
const std::shared_ptr<std::map<std::string, std::shared_ptr<Vertices>>>& verticesSet,
223 const std::shared_ptr<Indices>& indices =
nullptr,
224 const std::shared_ptr<BoundingBox>& boundingBox =
nullptr);
225 std::shared_ptr<Geometry>
_geometry(std::map<std::string, std::shared_ptr<Vertices>> verticesSet,
226 const std::shared_ptr<Indices>& indices =
nullptr,
227 const std::shared_ptr<BoundingBox>& boundingBox =
nullptr);
228 std::shared_ptr<Geometry>
_geometry(
const std::shared_ptr<Indices>& indices,
229 const std::shared_ptr<BoundingBox>& boundingBox =
nullptr);
233 const std::shared_ptr<Geometry>& lhs,
234 const std::shared_ptr<Geometry>& rhs);
237 std::shared_ptr<Blend>
_blend(
bool enabled =
false,
249 std::shared_ptr<Culling>
_culling(
bool enabled =
false,
254 std::shared_ptr<Depth>
_depth(
bool enabled =
false,
256 bool writeMask =
true);
259 std::shared_ptr<Line>
_line(
float width = 1.0f);
262 std::shared_ptr<Point>
_point(
float size = 1.0f,
263 bool programmable =
false);
274 std::shared_ptr<Scissor>
_scissor(
bool enabled =
false,
281 std::shared_ptr<Stencil>
_stencil(
bool enabled =
false,
301 const std::shared_ptr<Image>& image,
302 const std::shared_ptr<Sampler>& sampler);
304 const std::shared_ptr<Image>& image);
305 std::shared_ptr<Texture>
_texture0(
const std::shared_ptr<Image>& image);
306 std::shared_ptr<Texture>
_texture1(
const std::shared_ptr<Image>& image);
307 std::shared_ptr<Texture>
_texture2(
const std::shared_ptr<Image>& image);
308 std::shared_ptr<Texture>
_texture3(
const std::shared_ptr<Image>& image);
309 std::shared_ptr<Texture>
_texture4(
const std::shared_ptr<Image>& image);
310 std::shared_ptr<Texture>
_texture5(
const std::shared_ptr<Image>& image);
311 std::shared_ptr<Texture>
_texture6(
const std::shared_ptr<Image>& image);
312 std::shared_ptr<Texture>
_texture7(
const std::shared_ptr<Image>& image);
315 std::shared_ptr<Program>
_program(
const std::shared_ptr<VertexSource>& vertex =
nullptr,
316 const std::shared_ptr<FragmentSource>& fragment =
nullptr,
317 const std::shared_ptr<GeometrySource>& geometry =
nullptr);
318 std::shared_ptr<Program>
_program(
const std::string& vertexString);
319 std::shared_ptr<Program>
_program(
const std::string& vertexString,
const std::string& fragmentString);
320 std::shared_ptr<Program>
_program(
const std::string& vertexString,
const std::string& fragmentString,
const std::string& geometryString);
323 std::shared_ptr<std::map<std::string, std::shared_ptr<Variant>>>
_parameters(
const std::map<std::string, std::shared_ptr<Variant>>& parameters);
326 std::shared_ptr<std::vector<std::shared_ptr<State>>>
_states(
const std::vector<std::shared_ptr<State>>& states = {});
329 const std::shared_ptr<Program>& lhs,
330 const std::shared_ptr<Program>& rhs);
332 std::shared_ptr<std::vector<std::shared_ptr<State>>>
operator|(
333 const std::shared_ptr<std::vector<std::shared_ptr<State>>>& lhs,
334 const std::shared_ptr<std::vector<std::shared_ptr<State>>>& rhs);
336 std::shared_ptr<std::map<std::string, std::shared_ptr<Variant>>>
operator|(
337 const std::shared_ptr<std::map<std::string, std::shared_ptr<Variant>>>& lhs,
338 const std::shared_ptr<std::map<std::string, std::shared_ptr<Variant>>>& rhs);
341 std::shared_ptr<Material>
_material(
const std::shared_ptr<Program>& program =
nullptr,
342 const std::shared_ptr<std::map<std::string, std::shared_ptr<Variant>>>& parameters =
nullptr,
343 const std::shared_ptr<std::vector<std::shared_ptr<State>>>& states =
nullptr);
344 std::shared_ptr<Material>
_material(
const std::map<std::string, std::shared_ptr<Variant>>& parameters);
345 std::shared_ptr<Material>
_material(
const std::vector<std::shared_ptr<State>>& states);
348 const std::shared_ptr<Material>& lhs,
349 const std::shared_ptr<Material>& rhs);
352 std::shared_ptr<Background>
_background(
const std::shared_ptr<Vector2i>& size,
353 const std::shared_ptr<Color4f>& colorMask =
nullptr,
354 const std::shared_ptr<Real>& depthMask =
nullptr,
355 const std::shared_ptr<Integer>& stencilMask =
nullptr,
356 const std::shared_ptr<Vector2i>& coordinate =
_ivec2());
358 const std::shared_ptr<Color4f>& colorMask =
_clr4(0.7, 0.7, 0.7, 1.0),
359 const std::shared_ptr<Real>& depthMask =
_real(1.0),
360 const std::shared_ptr<Integer>& stencilMask =
nullptr,
361 const std::shared_ptr<Vector2i>& coordinate =
_ivec2());
368 std::shared_ptr<Target>
_target(
const std::vector<std::shared_ptr<ImageBuffer>>& array);
371 std::shared_ptr<Primitive>
_primitive(
const std::shared_ptr<Geometry>& geometry,
372 const std::shared_ptr<Material>& material,
374 std::shared_ptr<Primitive>
_primitive(
const std::shared_ptr<Geometry>& geometry,
375 const std::shared_ptr<Material>& material);
376 std::shared_ptr<Primitive>
_primitive(
const std::shared_ptr<Geometry>& geometry);
377 std::shared_ptr<Primitive>
_primitive(
const std::shared_ptr<Material>& material);
381 const std::shared_ptr<Primitive>& lhs,
382 const std::shared_ptr<Primitive>& rhs);
Function
The factors in this enumeration specify how the source and destination color values are combined duri...
Definition state.h:48
Equation
This enumeration defines different operations used in the blend equation. These operations determine ...
Definition state.h:68
Mode
The enumeration defines the type of the face we want to cull.
Definition state.h:108
Face
The enumeration defines the ordering (counter-clockwise and clockwise) of the front-faces or the back...
Definition state.h:115
Function
This enumeration defines different comparison operators used for the depth test.
Definition state.h:136
Mode
The Mode enumeration defines identifiers corresponding to different ways of rendering geometric primi...
Definition indices.h:36
Mode
Definition state.h:181
WrapMode
The enumeration defines three different wrapping mode.
Definition sampler.h:40
Filter
The enumeration defines how to map the texture pixel to the coordinates.
Definition sampler.h:30
Function
This enumeration defines different comparison operators used for the stencil test.
Definition state.h:230
Operation
This enumeration defines how to update the stencil buffer after the stencil test.
Definition state.h:243
std::shared_ptr< Sampler > _samplerRepeat()
std::shared_ptr< Sampler > _samplerClamp()
std::shared_ptr< Vector2i > _ivec2()
std::shared_ptr< std::map< std::string, std::shared_ptr< Vertices > > > _verticesSet(const std::map< std::string, std::shared_ptr< Vertices > > &verticesMap)
std::shared_ptr< Culling > _culling(bool enabled=false, Culling::Face face=Culling::Face::CCW, Culling::Mode mode=Culling::Mode::BACK)
std::shared_ptr< ArrayIndices > _triangle_fan(int count, int first=0, int primCount=0)
std::shared_ptr< Stencil > _stencil(bool enabled=false, Stencil::Operation sfail=Stencil::Operation::KEEP, Stencil::Operation dpfail=Stencil::Operation::KEEP, Stencil::Operation dppass=Stencil::Operation::KEEP, Stencil::Function func=Stencil::Function::ALWAYS, int ref=0, int mask=0xFF)
std::shared_ptr< Point > _point(float size=1.0f, bool programmable=false)
std::shared_ptr< Texture > _texture6(const std::shared_ptr< Image > &image)
std::shared_ptr< ArrayIndices > _triangles(int count, int first=0, int primCount=0)
std::shared_ptr< ArrayIndices > _line_loop(int count, int first=0, int primCount=0)
std::shared_ptr< Background > _simpleBackground(const std::shared_ptr< Vector2i > &size, const std::shared_ptr< Color4f > &colorMask=_clr4(0.7, 0.7, 0.7, 1.0), const std::shared_ptr< Real > &depthMask=_real(1.0), const std::shared_ptr< Integer > &stencilMask=nullptr, const std::shared_ptr< Vector2i > &coordinate=_ivec2())
std::shared_ptr< Line > _line(float width=1.0f)
std::shared_ptr< Texture > _texture4(const std::shared_ptr< Image > &image)
std::shared_ptr< Sampler > _samplerCube()
std::shared_ptr< Program > _program(const std::shared_ptr< VertexSource > &vertex=nullptr, const std::shared_ptr< FragmentSource > &fragment=nullptr, const std::shared_ptr< GeometrySource > &geometry=nullptr)
std::shared_ptr< Color4f > _clr4()
std::shared_ptr< Vertices > _vertices(const std::shared_ptr< Float32Array > &buffer, int offset=0, unsigned int stride=0, unsigned int divisor=0)
std::shared_ptr< Polygon > _polygon(Polygon::Mode mode=Polygon::Mode::FILL)
std::shared_ptr< Texture > _texture0(const std::shared_ptr< Image > &image)
std::shared_ptr< Geometry > _geometry(const std::shared_ptr< std::map< std::string, std::shared_ptr< Vertices > > > &verticesSet, const std::shared_ptr< Indices > &indices=nullptr, const std::shared_ptr< BoundingBox > &boundingBox=nullptr)
std::shared_ptr< Sampler > _samplerMirror()
std::shared_ptr< Material > _material(const std::shared_ptr< Program > &program=nullptr, const std::shared_ptr< std::map< std::string, std::shared_ptr< Variant > > > ¶meters=nullptr, const std::shared_ptr< std::vector< std::shared_ptr< State > > > &states=nullptr)
std::shared_ptr< Texture > _texture(int unit, const std::shared_ptr< Image > &image, const std::shared_ptr< Sampler > &sampler)
std::shared_ptr< Texture > _texture2(const std::shared_ptr< Image > &image)
std::shared_ptr< Scissor > _scissor(bool enabled=false, int x=0, int y=0, int width=0, int height=0)
std::shared_ptr< ArrayIndices > _lines(int count, int first=0, int primCount=0)
std::shared_ptr< PolygonOffset > _polygonOffset(bool enabled=false, float factor=0.0f, float units=0.0f)
std::shared_ptr< std::vector< std::shared_ptr< State > > > _states(const std::vector< std::shared_ptr< State > > &states={})
std::shared_ptr< Texture > _texture5(const std::shared_ptr< Image > &image)
std::shared_ptr< std::map< std::string, std::shared_ptr< Variant > > > _parameters(const std::map< std::string, std::shared_ptr< Variant > > ¶meters)
std::shared_ptr< ArrayIndices > _line_strip(int count, int first=0, int primCount=0)
std::shared_ptr< ArrayIndices > _points(int count, int first=0, int primCount=0)
std::shared_ptr< Background > _background(const std::shared_ptr< Vector2i > &size, const std::shared_ptr< Color4f > &colorMask=nullptr, const std::shared_ptr< Real > &depthMask=nullptr, const std::shared_ptr< Integer > &stencilMask=nullptr, const std::shared_ptr< Vector2i > &coordinate=_ivec2())
std::shared_ptr< Texture > _texture1(const std::shared_ptr< Image > &image)
std::shared_ptr< Depth > _depth(bool enabled=false, Depth::Function func=Depth::Function::LESS, bool writeMask=true)
std::shared_ptr< ArrayIndices > _arrayIndices(Indices::Mode mode, int count, int first=0, int primCount=0)
std::shared_ptr< ArrayIndices > _triangle_strip(int count, int first=0, int primCount=0)
std::shared_ptr< ImageBuffer > _colorBuf()
std::shared_ptr< ElementIndices > _elementIndices(Indices::Mode mode, const std::shared_ptr< Uint8Array > &buffer, int count=-1, int offset=0, int primCount=0)
std::shared_ptr< Texture > _texture7(const std::shared_ptr< Image > &image)
std::shared_ptr< ColorMask > _colorMask(bool red=true, bool green=true, bool blue=true, bool alpha=true)
std::shared_ptr< Blend > _blend(bool enabled=false, Blend::Function srcFunc=Blend::Function::SRC_ALPHA, Blend::Function dstFunc=Blend::Function::ONE_MINUS_SRC_ALPHA, Blend::Equation equation=Blend::Equation::FUNC_ADD)
std::shared_ptr< Target > _target()
std::shared_ptr< Primitive > _primitive()
std::shared_ptr< Sampler > _sampler(Sampler::Filter minFilter=Sampler::Filter::LINEAR_MIPMAP_NEAREST, Sampler::Filter magFilter=Sampler::Filter::LINEAR, Sampler::WrapMode wrapS=Sampler::WrapMode::REPEAT, Sampler::WrapMode wrapT=Sampler::WrapMode::REPEAT)
std::shared_ptr< Texture > _texture3(const std::shared_ptr< Image > &image)
std::shared_ptr< std::map< std::string, std::shared_ptr< Vertices > > > operator|(const std::shared_ptr< std::map< std::string, std::shared_ptr< Vertices > > > &lhs, const std::shared_ptr< std::map< std::string, std::shared_ptr< Vertices > > > &rhs)
std::shared_ptr< Real > _real()