-// File: OpenGl_Text.cxx
-// Created: 13 July 2011
-// Author: Sergey ZERCHANINOV
-// Copyright: OPEN CASCADE 2011
-
+// Created on: 2011-07-13
+// Created by: Sergey ZERCHANINOV
+// Copyright (c) 2011-2012 OPEN CASCADE SAS
+//
+// The content of this file is subject to the Open CASCADE Technology Public
+// License Version 6.5 (the "License"). You may not use the content of this file
+// except in compliance with the License. Please obtain a copy of the License
+// at http://www.opencascade.org and read it completely before using this file.
+//
+// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
+// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+//
+// The Original Code and all software distributed under the License is
+// distributed on an "AS IS" basis, without warranty of any kind, and the
+// Initial Developer hereby disclaims all such warranties, including without
+// limitation, any warranties of merchantability, fitness for a particular
+// purpose or non-infringement. Please see the License for the specific terms
+// and conditions governing the rights and limitations under the License.
+
+
+#include <OpenGl_GlCore11.hxx>
#include <OpenGl_Text.hxx>
-
-#if (!defined(_WIN32) && !defined(__WIN32__))
- #include <X11/Xlib.h>
-#endif
-
-#include <OpenGl_tgl_all.hxx>
-#include <GL/gl.h>
-
-#include <OpenGl_Memory.hxx>
-
#include <OpenGl_AspectText.hxx>
#include <OpenGl_Structure.hxx>
+#include <GL/glu.h> // gluUnProject()
+
/*----------------------------------------------------------------------*/
OpenGl_Text::OpenGl_Text (const TCollection_ExtendedString& AText,
AWorkspace->SetTextParam(&myParam);
- GLboolean blend_state = GL_FALSE;
GLdouble modelMatrix[16], projMatrix[16];
GLint viewport[4];
GLdouble objrefX, objrefY, objrefZ;
switch (aspect_text->DisplayType())
{
case Aspect_TODT_BLEND:
- blend_state = glIsEnabled(GL_BLEND);
- if (!blend_state) glEnable(GL_BLEND);
glEnable(GL_COLOR_LOGIC_OP);
glLogicOp(GL_XOR);
break;
if (flag_zbuffer) glEnable(GL_DEPTH_TEST);
if (aspect_text->DisplayType() == Aspect_TODT_BLEND)
{
- if (!blend_state) glDisable(GL_BLEND);
glDisable(GL_COLOR_LOGIC_OP);
}
}