mirror of
https://github.com/celisej567/mcpe.git
synced 2025-12-31 17:49:17 +03:00
Put Textures.cpp Changes In ORIGINAL_CODE Block
This commit is contained in:
committed by
iProgramInCpp
parent
0fbe90752d
commit
b985edac32
@@ -8,6 +8,8 @@
|
||||
|
||||
#include "Textures.hpp"
|
||||
|
||||
#include "GameMode.hpp"
|
||||
|
||||
bool Textures::MIPMAP = false;
|
||||
|
||||
int Textures::loadTexture(const std::string& name, bool b)
|
||||
@@ -69,7 +71,13 @@ int Textures::assignTexture(const std::string& name, Texture& texture)
|
||||
if (texture.field_C)
|
||||
internalFormat = GL_RGBA;
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, texture.m_width, texture.m_height, 0, internalFormat, GL_UNSIGNED_BYTE, texture.m_pixels);
|
||||
#ifdef ORIGINAL_CODE
|
||||
GLuint format = GL_RGBA;
|
||||
#else
|
||||
GLuint format = internalFormat;
|
||||
#endif
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, texture.m_width, texture.m_height, 0, format, GL_UNSIGNED_BYTE, texture.m_pixels);
|
||||
|
||||
m_textures[name] = textureID;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user