Testing textures and events

This commit is contained in:
2022-10-20 15:49:25 -07:00
parent 375b25ff59
commit 80d6cba854
27 changed files with 513 additions and 26 deletions

View File

@ -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