Added texture, assets, tools and texture loading.
This commit is contained in:
		| @@ -89,6 +89,10 @@ void Shader::setTexture( | ||||
|   shaderparameter_t param, | ||||
|   std::shared_ptr<Texture> texture | ||||
| ) { | ||||
|   if(texture == nullptr || !texture->isReady()) { | ||||
|     this->bindTexture(param, nullptr); | ||||
|     return; | ||||
|   } | ||||
|   this->bindTexture(param, texture); | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -30,7 +30,7 @@ namespace Dawn { | ||||
|       } | ||||
|        | ||||
|       void setDefaultParameters(Material &material) override { | ||||
|         material.colorValues[this->paramColor] = COLOR_MAGENTA; | ||||
|         material.colorValues[this->paramColor] = COLOR_WHITE; | ||||
|       } | ||||
|  | ||||
|       void setGlobalParameters(glm::mat4 proj, glm::mat4 view) override { | ||||
| @@ -97,7 +97,6 @@ namespace Dawn { | ||||
|         this->paramHasTexture = this->getParameterByName("u_HasTexture"); | ||||
|  | ||||
|         this->setBoolean(this->paramHasTexture, false); | ||||
|         this->setColor(this->paramColor, COLOR_WHITE); | ||||
|       } | ||||
|   }; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user