|
| | ObjShader () |
| |
| | ~ObjShader () |
| |
| void | dispose () override |
| |
| bool | init () |
| |
| bool | init (const graphics::ShaderSource &vsource, const graphics::ShaderSource &fsource) override |
| |
| void | setPerspective (const Mat4 &matrix) |
| |
| void | setModelMatrix (const Mat4 &matrix) |
| |
| void | setNormalMatrix (const Mat4 &matrix) |
| |
| void | setLightPosition (const Vec3 &pos) |
| |
| void | setIllum (int value) |
| |
| void | setAmbientColor (const Color4f color) |
| |
| void | setDiffuseColor (const Color4f color) |
| |
| void | setSpecularColor (const Color4f color) |
| |
| void | setSpecularExponent (float value) |
| |
| void | setAmbientTexture (const std::shared_ptr< graphics::Texture > &texture) |
| |
| void | setDiffuseTexture (const std::shared_ptr< graphics::Texture > &texture) |
| |
| void | setSpecularTexture (const std::shared_ptr< graphics::Texture > &texture) |
| |
| void | setNormalTexture (const std::shared_ptr< graphics::Texture > &texture) |
| |
| | GraphicsShader () |
| |
| | ~GraphicsShader () |
| |
| virtual void | dispose () |
| |
| virtual bool | init (const ShaderSource &vsource, const ShaderSource &fsource) |
| |
| bool | declareAttribute (const std::string name, const AttributeDef &def) |
| |
| const AttributeDef * | getAttributeDef (const std::string name) const |
| |
| void | setInstanced (Uint32 group, bool instanced) |
| |
| void | setAttributeStride (Uint32 group, size_t stride) |
| |
| bool | declareUniform (const std::string name, const UniformDef &def) |
| |
| const UniformDef * | getUniformDef (const std::string name) const |
| |
| bool | declareResource (const std::string name, const ResourceDef &def) |
| |
| const ResourceDef * | getResourceDef (const std::string name) const |
| |
| void | setRenderPass (const std::shared_ptr< RenderPass > &pass) |
| |
| const std::shared_ptr< RenderPass > & | getRenderPass () const |
| |
| bool | compile () |
| |
| bool | isReady () const |
| |
| void | enableViewScissor (bool enable) |
| |
| bool | usesViewScissor () const |
| |
| void | setViewScissor (Uint32 x, Uint32 y, Uint32 w, Uint32 h) |
| |
| void | setViewScissor (const Rect &scissor) |
| |
| Rect | getViewScissor () |
| |
| void | enableBlending (bool enable) |
| |
| bool | usesBlending () const |
| |
| void | enableDepthTest (bool enable) |
| |
| bool | usesDepthTest () const |
| |
| void | enableDepthWrite (bool enable) |
| |
| bool | usesDepthWrite () const |
| |
| void | enableStencilTest (bool enable) |
| |
| bool | usesStencilTest () const |
| |
| void | setDrawMode (DrawMode mode) |
| |
| DrawMode | getDrawMode () const |
| |
| void | setFrontFace (FrontFace face) |
| |
| FrontFace | getFrontFace () const |
| |
| void | setCullMode (CullMode mode) |
| |
| CullMode | getCullMode () const |
| |
| void | setDepthFunc (CompareOp func) |
| |
| CompareOp | getDepthFunc () const |
| |
| void | setStencilState (const StencilState &stencil) |
| |
| void | setFrontStencilState (const StencilState &stencil) |
| |
| void | setBackStencilState (const StencilState &stencil) |
| |
| const StencilState & | getFrontStencilState () const |
| |
| const StencilState & | getBackStencilState () const |
| |
| void | setColorMask (Uint8 mask) |
| |
| Uint8 | getColorMask () const |
| |
| void | setStencilMode (StencilMode mode) |
| |
| void | setBlendState (const BlendState &blend) |
| |
| const BlendState & | getBlendState () const |
| |
| void | setBlendMode (BlendMode mode) |
| |
| void | setLineWidth (float width) |
| |
| float | getLineWidth () const |
| |
| void | setVertices (Uint32 group, const std::shared_ptr< VertexBuffer > &vertices) |
| |
| const std::shared_ptr< VertexBuffer > | getVertices (Uint32 group) const |
| |
| void | setIndices (const std::shared_ptr< IndexBuffer > &indices) |
| |
| const std::shared_ptr< IndexBuffer > | getIndices () const |
| |
| void | setUniformBuffer (const std::string name, const std::shared_ptr< UniformBuffer > &buffer) |
| |
| void | setUniformBuffers (const std::string name, const std::vector< std::shared_ptr< UniformBuffer > > &buffers) |
| |
| const std::shared_ptr< UniformBuffer > | getUniformBuffer (const std::string name) const |
| |
| const std::vector< std::shared_ptr< UniformBuffer > > | getUniformBuffers (const std::string name) const |
| |
| void | setStorageBuffer (const std::string name, const std::shared_ptr< StorageBuffer > &buffer) |
| |
| void | setStorageBuffers (const std::string name, const std::vector< std::shared_ptr< StorageBuffer > > &buffers) |
| |
| const std::shared_ptr< StorageBuffer > | getStorageBuffer (const std::string name) const |
| |
| const std::vector< std::shared_ptr< StorageBuffer > > | getStorageBuffers (const std::string name) const |
| |
| void | setBlock (const std::string name, Uint32 block) |
| |
| Uint32 | getBlock (const std::string name) |
| |
| void | setTexture (const std::string name, const std::shared_ptr< Texture > &texture) |
| |
| void | setTextures (const std::string name, const std::vector< std::shared_ptr< Texture > > &textures) |
| |
| const std::shared_ptr< Texture > | getTexture (const std::string name) const |
| |
| const std::vector< std::shared_ptr< Texture > > | getTextures (const std::string name) const |
| |
| void | setTextureArray (const std::string name, const std::shared_ptr< TextureArray > &array) |
| |
| void | setTextureArrays (const std::string name, const std::vector< std::shared_ptr< TextureArray > > &arrays) |
| |
| const std::shared_ptr< TextureArray > | getTextureArray (const std::string name) const |
| |
| const std::vector< std::shared_ptr< TextureArray > > | getTextureArrays (const std::string name) const |
| |
| void | setImage (const std::string name, const std::shared_ptr< Image > &image) |
| |
| void | setImages (const std::string name, const std::vector< std::shared_ptr< Image > > &images) |
| |
| const std::shared_ptr< Image > | getImage (const std::string name) const |
| |
| const std::vector< std::shared_ptr< Image > > | getImages (const std::string name) const |
| |
| void | setImageArray (const std::string name, const std::shared_ptr< ImageArray > &array) |
| |
| void | setImageArrays (const std::string name, const std::vector< std::shared_ptr< ImageArray > > &arrays) |
| |
| const std::shared_ptr< ImageArray > | getImageArray (const std::string name) const |
| |
| const std::vector< std::shared_ptr< ImageArray > > | getImageArrays (const std::string name) const |
| |
| void | setSampler (const std::string name, const std::shared_ptr< Sampler > &sampler) |
| |
| void | setSamplers (const std::string name, const std::vector< std::shared_ptr< Sampler > > &samplers) |
| |
| const std::shared_ptr< Sampler > | getSampler (const std::string name) const |
| |
| const std::vector< std::shared_ptr< Sampler > > | getSamplers (const std::string name) const |
| |
| void | pushInt (const std::string name, Sint32 value) |
| |
| void | pushUInt (const std::string name, Uint32 value) |
| |
| void | pushFloat (const std::string name, float value) |
| |
| void | pushVec2 (const std::string name, const Vec2 &vec) |
| |
| void | pushVec2 (const std::string name, float x, float y) |
| |
| void | pushVec3 (const std::string name, const Vec3 &vec) |
| |
| void | pushVec3 (const std::string name, float x, float y, float z) |
| |
| void | pushVec4 (const std::string name, const Vec4 &vec) |
| |
| void | pushVec4 (const std::string name, const Quaternion &quat) |
| |
| void | pushVec4 (const std::string name, float x, float y, float z, float w) |
| |
| void | pushIVec2 (const std::string name, Sint32 x, Sint32 y) |
| |
| void | pushIVec3 (const std::string name, Sint32 x, Sint32 y, Sint32 z) |
| |
| void | pushIVec4 (const std::string name, Sint32 x, Sint32 y, Sint32 z, Sint32 w) |
| |
| void | pushUVec2 (const std::string name, Uint32 x, Uint32 y) |
| |
| void | pushUVec3 (const std::string name, Uint32 x, Uint32 y, Uint32 z) |
| |
| void | pushUVec4 (const std::string name, Uint32 x, Uint32 y, Uint32 z, Uint32 w) |
| |
| void | pushColor4f (const std::string name, const Color4f &color) |
| |
| void | pushColor4f (const std::string name, float red, float green, float blue, float alpha) |
| |
| void | pushColor4 (const std::string name, const Color4 color) |
| |
| void | pushColor4 (const std::string name, Uint8 red, Uint8 green, Uint8 blue, Uint8 alpha) |
| |
| void | pushMat2 (const std::string name, const Affine2 &mat) |
| |
| void | pushMat2 (const std::string name, const float *array) |
| |
| void | pushMat3 (const std::string name, const Affine2 &mat) |
| |
| void | pushMat3 (const std::string name, const float *array) |
| |
| void | pushMat4 (const std::string name, const Mat4 &mat) |
| |
| void | pushMat4 (const std::string name, const float *array) |
| |
| void | push (const std::string name, Uint8 *data) |
| |
| template<typename T > |
| void | push (const std::string name, T value) |
| |
| void | begin () |
| |
| void | begin (const std::shared_ptr< FrameBuffer > &framebuffer) |
| |
| void | end () |
| |
| void | draw (Uint32 count, Uint32 offset=0) |
| |
| void | drawIndexed (Uint32 count, Uint32 offset=0) |
| |
| void | drawInstances (Uint32 count, Uint32 instances, Uint32 vtxoff=0, Uint32 insoff=0) |
| |
| void | drawInstancesIndexed (Uint32 count, Uint32 instances, Uint32 idxoff=0, Uint32 insoff=0) |
| |
This class is a shader for rendering ObjModel objects.
This class is a very lighweight subclass of GraphicsShader. It exists mainly to simplify the compilation process.