20#include "variantmaker.h"
21#include "../variant/types.h"
22#include "../primitive/types.h"
23#include "../primitive/indices.h"
24#include "../primitive/sampler.h"
25#include "../primitive/state.h"
64 ElementIndicesPtr _lines(
const std::initializer_list<unsigned int>& array,
int count = -1,
int offset = 0,
int primCount = 0);
79 ElementIndicesPtr _points(
const std::initializer_list<unsigned int>& array,
int count = -1,
int offset = 0,
int primCount = 0);
84 VerticesPtr _vertices(
const std::initializer_list<float>& array,
int offset = 0,
unsigned int stride = 0,
unsigned int divisor = 0);
87 std::shared_ptr<std::map<std::string, VerticesPtr>>
_verticesSet(
const std::map<std::string, VerticesPtr>& verticesMap = {});
119 bool writeMask =
true);
126 bool programmable =
false);
188 ProgramPtr _program(
const std::string& vertexString,
const std::string& fragmentString,
const std::string& geometryString);
191 std::shared_ptr<std::map<std::string, VariantPtr>>
_parameters(
const std::map<std::string, VariantPtr>& parameters = {});
194 std::shared_ptr<std::vector<StatePtr>>
_states(
const std::vector<StatePtr>& states = {});
199 const std::shared_ptr<std::map<std::string, VariantPtr>>& parameters =
nullptr,
200 const std::shared_ptr<std::vector<StatePtr>>& states =
nullptr);
203 const std::shared_ptr<std::vector<StatePtr>>& states);
205 const std::shared_ptr<std::map<std::string, VariantPtr>>& parameters,
206 const std::shared_ptr<std::vector<StatePtr>>& states =
nullptr);
209 const std::vector<SourcePtr>& sources,
210 const std::map<std::string, VariantPtr>& parameters,
211 const std::vector<StatePtr>& states);
213 const std::vector<SourcePtr>& sources,
214 const std::map<std::string, VariantPtr>& parameters);
216 const std::vector<SourcePtr>& sources,
217 const std::vector<StatePtr>& states);
219 const std::vector<SourcePtr>& sources);
223 const std::map<std::string, VariantPtr>& parameters,
224 const std::vector<StatePtr>& states);
227 const std::map<std::string, VariantPtr>& parameters);
230 const std::vector<StatePtr>& states);
232 const std::map<std::string, VariantPtr>& parameters,
233 const std::vector<StatePtr>& states);
235 const std::map<std::string, VariantPtr>& parameters);
237 const std::vector<StatePtr>& states);
242 const RealPtr& depthMask =
nullptr,
Function
The factors in this enumeration specify how the source and destination color values are combined duri...
Definition state.h:47
Equation
This enumeration defines different operations used in the blend equation. These operations determine ...
Definition state.h:67
Mode
The enumeration defines the type of the face we want to cull.
Definition state.h:107
Face
The enumeration defines the ordering (counter-clockwise and clockwise) of the front-faces or the back...
Definition state.h:114
Function
This enumeration defines different comparison operators used for the depth test.
Definition state.h:135
Mode
The Mode enumeration defines identifiers corresponding to different ways of rendering geometric primi...
Definition indices.h:36
Mode
Definition state.h:180
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:229
Operation
This enumeration defines how to update the stencil buffer after the stencil test.
Definition state.h:242
BlendPtr _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< Integer > IntegerPtr
Definition types.h:60
std::shared_ptr< BoundingBox > BoundingBoxPtr
Definition types.h:36
TexturePtr _texture4(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
std::shared_ptr< GeometrySource > GeometrySourcePtr
Definition types.h:98
std::shared_ptr< Indices > IndicesPtr
Definition types.h:38
ArrayIndicesPtr _points(int count, int first=0, int primCount=0)
std::shared_ptr< Line > LinePtr
Definition types.h:80
GeometryPtr _geometry(const std::shared_ptr< std::map< std::string, VerticesPtr > > &verticesSet=_verticesSet(), const IndicesPtr &indices=nullptr, const BoundingBoxPtr &boundingBox=nullptr)
std::shared_ptr< PolygonOffset > PolygonOffsetPtr
Definition types.h:83
TexturePtr _texture6(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
VerticesPtr _vertices(const Float32ArrayPtr &buffer, int offset=0, unsigned int stride=0, unsigned int divisor=0)
MaterialPtr _material(const ProgramPtr &program=nullptr, const std::shared_ptr< std::map< std::string, VariantPtr > > ¶meters=nullptr, const std::shared_ptr< std::vector< StatePtr > > &states=nullptr)
std::shared_ptr< ArrayIndices > ArrayIndicesPtr
Definition types.h:39
ElementIndicesPtr _elementIndices(Indices::Mode mode, const Uint8ArrayPtr &buffer, int count=-1, int offset=0, int primCount=0)
SamplerPtr _samplerClamp()
ArrayIndicesPtr _line_strip(int count, int first=0, int primCount=0)
ArrayIndicesPtr _line_loop(int count, int first=0, int primCount=0)
ProgramPtr _program(const VertexSourcePtr &vertex=nullptr, const FragmentSourcePtr &fragment=nullptr, const GeometrySourcePtr &geometry=nullptr)
DepthPtr _depth(bool enabled=false, Depth::Function func=Depth::Function::LESS, bool writeMask=true)
SamplerPtr _samplerMirror()
std::shared_ptr< Float32Array > Float32ArrayPtr
Definition types.h:119
std::shared_ptr< std::vector< StatePtr > > _states(const std::vector< StatePtr > &states={})
std::shared_ptr< Blend > BlendPtr
Definition types.h:76
LinePtr _line(float width=1.0f)
PrimitivePtr _primitive(const GeometryPtr &geometry=nullptr, const MaterialPtr &material=nullptr, int priority=0)
SamplerPtr _samplerRepeat()
std::shared_ptr< Culling > CullingPtr
Definition types.h:78
std::shared_ptr< Geometry > GeometryPtr
Definition types.h:32
PolygonPtr _polygon(Polygon::Mode mode=Polygon::Mode::FILL)
std::shared_ptr< Texture > TexturePtr
Definition types.h:86
std::shared_ptr< ElementIndices > ElementIndicesPtr
Definition types.h:40
std::shared_ptr< Vector2i > Vector2iPtr
Definition types.h:136
TexturePtr _texture(int unit, const ImagePtr &image, const SamplerPtr &sampler=nullptr)
std::shared_ptr< Primitive > PrimitivePtr
Definition types.h:48
TexturePtr _texture3(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
std::shared_ptr< Image > ImagePtr
Definition types.h:53
std::shared_ptr< Stencil > StencilPtr
Definition types.h:85
ImageBufferPtr _colorBuf()
TexturePtr _texture2(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
SamplerPtr _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< Int32Array > Int32ArrayPtr
Definition types.h:117
std::shared_ptr< Uint16Array > Uint16ArrayPtr
Definition types.h:116
std::shared_ptr< Uint8Array > Uint8ArrayPtr
Definition types.h:114
TexturePtr _texture7(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
TexturePtr _texture0(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
ScissorPtr _scissor(bool enabled=false, int x=0, int y=0, int width=0, int height=0)
std::shared_ptr< Scissor > ScissorPtr
Definition types.h:84
TexturePtr _texture1(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
std::shared_ptr< Real > RealPtr
Definition types.h:88
PointPtr _point(float size=1.0f, bool programmable=false)
std::shared_ptr< Depth > DepthPtr
Definition types.h:79
std::shared_ptr< ColorMask > ColorMaskPtr
Definition types.h:77
std::shared_ptr< Material > MaterialPtr
Definition types.h:44
TexturePtr _texture5(const ImagePtr &image, const SamplerPtr &sampler=nullptr)
PolygonOffsetPtr _polygonOffset(bool enabled=false, float factor=0.0f, float units=0.0f)
SamplerPtr _samplerCube()
ArrayIndicesPtr _triangle_fan(int count, int first=0, int primCount=0)
BackgroundPtr _background(const Vector2iPtr &size, const Color4fPtr &colorMask=nullptr, const RealPtr &depthMask=nullptr, const IntegerPtr &stencilMask=nullptr, const Vector2iPtr &coordinate=_ivec2())
std::shared_ptr< Color4f > Color4fPtr
Definition types.h:45
std::shared_ptr< ImageBuffer > ImageBufferPtr
Definition types.h:56
ArrayIndicesPtr _triangle_strip(int count, int first=0, int primCount=0)
std::shared_ptr< Background > BackgroundPtr
Definition types.h:28
ArrayIndicesPtr _triangles(int count, int first=0, int primCount=0)
std::shared_ptr< Point > PointPtr
Definition types.h:81
CullingPtr _culling(bool enabled=false, Culling::Face face=Culling::Face::CCW, Culling::Mode mode=Culling::Mode::BACK)
std::shared_ptr< FragmentSource > FragmentSourcePtr
Definition types.h:97
ColorMaskPtr _colorMask(bool red=true, bool green=true, bool blue=true, bool alpha=true)
std::shared_ptr< Polygon > PolygonPtr
Definition types.h:82
std::shared_ptr< Uint32Array > Uint32ArrayPtr
Definition types.h:118
std::shared_ptr< Vertices > VerticesPtr
Definition types.h:94
StencilPtr _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)
ArrayIndicesPtr _arrayIndices(Indices::Mode mode, int count, int first=0, int primCount=0)
std::shared_ptr< Target > TargetPtr
Definition types.h:90
std::shared_ptr< Sampler > SamplerPtr
Definition types.h:60
ArrayIndicesPtr _lines(int count, int first=0, int primCount=0)
std::shared_ptr< Program > ProgramPtr
Definition types.h:52
std::shared_ptr< VertexSource > VertexSourcePtr
Definition types.h:96
BackgroundPtr _simpleBackground(const Vector2iPtr &size, const Color4fPtr &colorMask=_clr4(0.7, 0.7, 0.7, 1.0), const RealPtr &depthMask=_real(1.0), const IntegerPtr &stencilMask=nullptr, const Vector2iPtr &coordinate=_ivec2())
std::shared_ptr< std::map< std::string, VariantPtr > > _parameters(const std::map< std::string, VariantPtr > ¶meters={})
std::shared_ptr< std::map< std::string, VerticesPtr > > _verticesSet(const std::map< std::string, VerticesPtr > &verticesMap={})