Testing textures and events
This commit is contained in:
@ -24,7 +24,7 @@ namespace Dawn {
|
||||
|
||||
ps[this->paramColor] = SHADER_PARAMETER_TYPE_COLOR;
|
||||
ps[this->paramHasTexture] = SHADER_PARAMETER_TYPE_BOOLEAN;
|
||||
// ps[paramTexture] SHADER_PARAMETER_TYPE_TEXTURE;
|
||||
ps[this->paramTexture] = SHADER_PARAMETER_TYPE_TEXTURE;
|
||||
|
||||
return ps;
|
||||
}
|
||||
@ -42,6 +42,19 @@ namespace Dawn {
|
||||
this->setMatrix(this->paramModel, transform);
|
||||
}
|
||||
|
||||
void bindTexture(
|
||||
shaderparameter_t param,
|
||||
std::shared_ptr<Texture> texture
|
||||
) override {
|
||||
if(texture == nullptr) {
|
||||
this->setBoolean(this->paramHasTexture, false);
|
||||
} else {
|
||||
this->setBoolean(this->paramHasTexture, true);
|
||||
this->setTextureSlot(param, 0x00);
|
||||
texture->bind(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
void compile() override {
|
||||
this->compileShader(
|
||||
// Vertex Shader
|
||||
|
Reference in New Issue
Block a user