From d045cf8259666fd3eecd7be0bd71cafb28f88b0b Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Mon, 24 Oct 2011 17:30:13 +0200 Subject: [PATCH] GL: transparency ok in all layer of OpenGL --- Sources/ewolOObject.cpp | 1 + Sources/ewolWindows.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Sources/ewolOObject.cpp b/Sources/ewolOObject.cpp index d81f7327..4dbbfdcc 100644 --- a/Sources/ewolOObject.cpp +++ b/Sources/ewolOObject.cpp @@ -46,6 +46,7 @@ void ewol::OObject2DColored::Draw(void) glColorPointer(4, GL_FLOAT, 0, &m_coordColor[0] ); // Render : draw all of the triangles at once glDrawArrays( GL_TRIANGLES, 0, m_coord.Size()); + //glDrawElements( GL_TRIANGLES, 0, m_coord.Size()); //EWOL_DEBUG("Draw ..." << m_coord.Size()/3 << " triangle(s)"); // Disable Pointers diff --git a/Sources/ewolWindows.cpp b/Sources/ewolWindows.cpp index 452f5247..1a73cb33 100644 --- a/Sources/ewolWindows.cpp +++ b/Sources/ewolWindows.cpp @@ -55,6 +55,10 @@ void ewol::Windows::SysDraw(void) glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0, 0, -5); + + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + static bool initDone = false;