Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-06-21 16:43:34 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-06-21 16:43:34 +0300
commit75cd436ae5e4a5f47bcd552503ec3959ac3c5529 (patch)
treebdc68d4bb1c2ef74ed187276f5af953cce9810ee /xs/src/slic3r/GUI/GLTexture.cpp
parentb139f3878483f6c4dddc5de21559037280950a15 (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.cpp7
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);