Implements CustomMaterial control.
You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.
class CCustomMaterial :public virtual ICustomMaterial, public CControl
{
public:
// IControl getters
bool isAcceptControl() override;
bool isAcceptControl(IControl *control) override;
// IMaterialControl methods
bool Activate(standard::windows::opengl::IOpenGL *graphics, const Mat4 &model, ICamera *camera) override;
// ICustomMaterial getters
ITexture *getTexture() override;
AnsiString getVertexShader() override;
AnsiString getFragmentShader() override;
int getOptionCount() override;
String getOptionName(const int index) override;
OPTION_TYPE getOptionType(const int index) override;
int getIntegerOptionValue(const int index) override;
float getFloatOptionValue(const int index) override;
Vec2 getVec2OptionValue(const int index) override;
Vec3 getVec3OptionValue(const int index) override;
Vec4 getVec4OptionValue(const int index) override;
Vec2i getVec2iOptionValue(const int index) override;
Vec3i getVec3iOptionValue(const int index) override;
Vec4i getVec4iOptionValue(const int index) override;
Mat4 getMat4OptionValue(const int index) override;
AnsiString getVertexShaderErrors() override;
AnsiString getFragmentShaderErrors() override;
AnsiString getProgramErrors() override;
// ICustomMaterial setters
bool setTexture(ITexture *value) override;
bool setVertexShader(const AnsiString &value) override;
bool setFragmentShader(const AnsiString &value) override;
bool setShaders(const AnsiString &vertex, const AnsiString &fragment) override;
bool setOption(const String &name, const int value) override;
bool setOption(const String &name, const float value) override;
bool setOption(const String &name, const Vec2 &value) override;
bool setOption(const String &name, const Vec3 &value) override;
bool setOption(const String &name, const Vec4 &value) override;
bool setOption(const String &name, const Vec2i &value) override;
bool setOption(const String &name, const Vec3i &value) override;
bool setOption(const String &name, const Vec4i &value) override;
bool setOption(const String &name, const Mat4 &value) override;
bool LoadVertexShader(const String &filename) override;
bool LoadFragmentShader(const String &filename) override;
bool LoadShaders(const String &vertex_filename, const String &fragment_filename) override;
void LockUpdate() override;
void UnlockUpdate() override;
CCustomMaterial();
CCustomMaterial(IControl *parent);
bool isUseMatrixModel() const; // Return whether app_MatrixModel uniform should be looked up and used
bool isUseMatrixCamera() const; // Return whether app_MatrixCamera uniform should be looked up and used
bool isUseHasTexture() const; // Return whether app_HasTexture uniform should be looked up and used
bool setUseMatrixModel(const bool value); // Set whether app_MatrixModel uniform should be looked up and used
bool setUseMatrixCamera(const bool value); // Set whether app_MatrixCamera uniform should be looked up and used
bool setUseHasTexture(const bool value); // Set whether app_HasTexture uniform should be looked up and used
};
Namespace: | nitisa::opengl |
Include: | OpengL/Controls/CustomMaterial/CustomMaterial.h |