Testing textures and events
This commit is contained in:
@ -32,6 +32,29 @@ namespace Dawn {
|
||||
*/
|
||||
void compileShader(std::string vertexShader, std::string fragmentShader);
|
||||
|
||||
/**
|
||||
* Bind a specific texture slot (of an already bound texture) to a shader
|
||||
* parameter.
|
||||
*
|
||||
* @param param Parameter to bind the texture slot for.
|
||||
* @param slot Slot to bind.
|
||||
*/
|
||||
void setTextureSlot(shaderparameter_t param, textureslot_t slot);
|
||||
|
||||
/**
|
||||
* Method designed to be overwritten by child shaders on how to handle a
|
||||
* bind texture request. This is left to the discretion of the child
|
||||
* shader for which slot(s) to use, how to handle nullptr textures, etc.
|
||||
*
|
||||
* @param param Parameter to bind the requested texture to.
|
||||
* @param texture Texture trying to be bound, may be nullptr.
|
||||
*/
|
||||
virtual void bindTexture(
|
||||
shaderparameter_t param,
|
||||
std::shared_ptr<Texture> texture
|
||||
) = 0;
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
* Locate a shader parameter by its name.
|
||||
@ -52,6 +75,10 @@ namespace Dawn {
|
||||
void setBoolean(shaderparameter_t parameter, bool_t value) override;
|
||||
void setColor(shaderparameter_t parameter, struct Color color) override;
|
||||
void setVector3(shaderparameter_t parameter, glm::vec3 vector) override;
|
||||
void setTexture(
|
||||
shaderparameter_t parameter,
|
||||
std::shared_ptr<Texture> texture
|
||||
) override;
|
||||
|
||||
/**
|
||||
* Destroys and deletes the shader from the GPU.
|
||||
|
Reference in New Issue
Block a user