tec::Material
#include <material.hpp>
Public Functions
Name | |
---|---|
std::shared_ptr< Material > | Create(const std::string name) Factory method that creates a Material and stores it in the MaterialMap under name. |
void | AddTexture(std::shared_ptr< TextureObject > tex) Adds a TextureObject to this material. |
std::shared_ptr< TextureObject > | GetTexture(std::size_t index) Gets a TextureObject from this material. |
void | RemoveTexture(std::shared_ptr< TextureObject > tex) Removes a TextureObject from this material. |
void | SetPolygonMode(const GLenum mode) Sets the PolygonMode used when this material is in use. |
const GLenum | GetPolygonMode() Gets the PolygonMode of this material. |
void | SetDrawElementsMode(const GLenum mode) Sets the DrawElements type used when this material is in use. |
const GLenum | GetDrawElementsMode() const Gets the DrawElements mode of this material. |
Friends
Name | |
---|---|
class | RenderSystem |
Public Functions Documentation
function Create
static std::shared_ptr< Material > Create(
const std::string name
)
Factory method that creates a Material and stores it in the MaterialMap under name.
Parameters:
- const std::string name The name to store the PixelBuffer under.
- std::shared_ptr
shader The shader this material uses.
Return: std::shared_ptr
function AddTexture
void AddTexture(
std::shared_ptr< TextureObject > tex
)
Adds a TextureObject to this material.
Parameters:
- std::shared_ptr
tex The texture to add.
Return: void
function GetTexture
std::shared_ptr< TextureObject > GetTexture(
std::size_t index
)
Gets a TextureObject from this material.
Parameters:
- size_t index The index of the texture to grab (0-based).
Return: std::shared_ptr
function RemoveTexture
void RemoveTexture(
std::shared_ptr< TextureObject > tex
)
Removes a TextureObject from this material.
Parameters:
- std::shared_ptr
tex The texture to remove.
Return: void
function SetPolygonMode
void SetPolygonMode(
const GLenum mode
)
Sets the PolygonMode used when this material is in use.
Parameters:
- const GLenum mode The PolygonMode (GL_POINT, GL_LINE, or GL_FILL).
Return: void
function GetPolygonMode
const GLenum GetPolygonMode()
Gets the PolygonMode of this material.
Return:
- const GLenum The PolygonMode of this material.
- void
function SetDrawElementsMode
void SetDrawElementsMode(
const GLenum mode
)
Sets the DrawElements type used when this material is in use.
Parameters:
- const GLenum mode The DrawElements (GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, or GL_PATCHES).
Return: void
function GetDrawElementsMode
const GLenum GetDrawElementsMode() const
Gets the DrawElements mode of this material.
Return:
- const GLenum The DrawElements mode of this material.
- void
Friends
friend RenderSystem
friend class RenderSystem(
RenderSystem
);
Updated on 2022-07-24 at 19:27:35 +0000