Fix bug with generating textures

This commit is contained in:
Abdelrahman Said 2024-12-07 22:42:32 +00:00
parent e9baa0ebe3
commit e503f75d62

View File

@ -177,7 +177,7 @@ int main() {
glActiveTexture(GL_TEXTURE1); // activate the texture unit first before binding texture glActiveTexture(GL_TEXTURE1); // activate the texture unit first before binding texture
glBindTexture(GL_TEXTURE_2D, textures[1]); glBindTexture(GL_TEXTURE_2D, textures[1]);
if (container) { if (awesomeface) {
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width[1], height[1], 0, GL_RGBA, GL_UNSIGNED_BYTE, awesomeface); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width[1], height[1], 0, GL_RGBA, GL_UNSIGNED_BYTE, awesomeface);
glGenerateMipmap(GL_TEXTURE_2D); glGenerateMipmap(GL_TEXTURE_2D);