mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-05 18:10:09 +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 "Textures.hpp"
|
||||||
|
|
||||||
|
#include "GameMode.hpp"
|
||||||
|
|
||||||
bool Textures::MIPMAP = false;
|
bool Textures::MIPMAP = false;
|
||||||
|
|
||||||
int Textures::loadTexture(const std::string& name, bool b)
|
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)
|
if (texture.field_C)
|
||||||
internalFormat = GL_RGBA;
|
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;
|
m_textures[name] = textureID;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user