diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2018-06-21 16:43:34 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2018-06-21 16:43:34 +0300 |
commit | 75cd436ae5e4a5f47bcd552503ec3959ac3c5529 (patch) | |
tree | bdc68d4bb1c2ef74ed187276f5af953cce9810ee /xs/src/slic3r/GUI/GLTexture.cpp | |
parent | b139f3878483f6c4dddc5de21559037280950a15 (diff) |
2nd Attempt to fix texture rendering on OpenGL 1.1 cards
Diffstat (limited to 'xs/src/slic3r/GUI/GLTexture.cpp')
-rw-r--r-- | xs/src/slic3r/GUI/GLTexture.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xs/src/slic3r/GUI/GLTexture.cpp b/xs/src/slic3r/GUI/GLTexture.cpp index 1256aca58..8809153ad 100644 --- a/xs/src/slic3r/GUI/GLTexture.cpp +++ b/xs/src/slic3r/GUI/GLTexture.cpp @@ -74,7 +74,7 @@ bool GLTexture::load_from_file(const std::string& filename, bool generate_mipmap // sends data to gpu //####################################################################################################################### - ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); +// ::glPixelStorei(GL_UNPACK_ALIGNMENT, 1); //####################################################################################################################### ::glGenTextures(1, &m_id); ::glBindTexture(GL_TEXTURE_2D, m_id); @@ -131,13 +131,16 @@ const std::string& GLTexture::get_source() const void GLTexture::render_texture(unsigned int tex_id, float left, float right, float bottom, float top) { - ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### +// ::glColor4f(1.0f, 1.0f, 1.0f, 1.0f); +//####################################################################################################################### ::glDisable(GL_LIGHTING); ::glEnable(GL_BLEND); ::glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); //####################################################################################################################### ::glEnable(GL_TEXTURE_2D); + ::glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); //####################################################################################################################### ::glBindTexture(GL_TEXTURE_2D, (GLuint)tex_id); |