Controls the appearance of a Drawable. More...
#include <sceneview/material_resource.hpp>
Public Types | |
typedef std::shared_ptr < MaterialResource > | Ptr |
typedef std::shared_ptr < QOpenGLTexture > | TexturePtr |
typedef std::map< QString, TexturePtr > | TextureDictionary |
typedef std::map< QString, TexturePtr > | Textures |
Public Member Functions | |
const ShaderResource::Ptr & | Shader () |
ShaderUniformMap & | ShaderParameters () |
void | SetParam (const QString &name, int val) |
void | SetParam (const QString &name, const std::vector< int > &val) |
void | SetParam (const QString &name, float val) |
void | SetParam (const QString &name, float val1, float val2) |
void | SetParam (const QString &name, float val1, float val2, float val3) |
void | SetParam (const QString &name, float val1, float val2, float val3, float val4) |
void | SetParam (const QString &name, const std::vector< float > &val) |
void | SetParam (const QString &name, const QMatrix4x4 &value) |
void | AddTexture (const QString &name, const TexturePtr &texture) |
const TextureDictionary & | GetTextures () |
void | SetTwoSided (bool two_sided) |
Sets whether or not to draw back-facing polygons. | |
bool | TwoSided () const |
void | SetDepthWrite (bool val) |
bool | DepthWrite () const |
void | SetDepthTest (bool val) |
bool | DepthTest () const |
void | SetDepthFunc (GLenum func) |
GLenum | DepthFunc () const |
void | SetColorWrite (bool val) |
bool | ColorWrite () const |
void | SetPointSize (float size) |
float | PointSize () const |
void | SetLineWidth (float line_width) |
float | LineWidth () const |
void | SetBlend (bool value) |
Controls GL_BLEND. More... | |
bool | Blend () const |
Retrieve whether GL_BLEND should be enabled or disabled. | |
void | SetBlendFunc (GLenum sfactor, GLenum dfactor) |
void | BlendFunc (GLenum *sfactor, GLenum *dfactor) |
Friends | |
class | ResourceManager |
Controls the appearance of a Drawable.
A material resource consists of:
MaterialResource objects cannot be directly instantiated. Instead, use ResourceManager or StockResources.
|
inline |
Controls GL_BLEND.
value | if true, then the GL_BLEND is enabled for this material. If false, then GL_BLEND is disabled. |