1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0026732: Visualization, TKOpenGl - add option to request Core profile 3.2+ using GLX

Aspect_Window::NativeFBConfig() - extend interface with new method.
Xw_Window - add Aspect_FBConfig option to constructors,
use glXChooseFBConfig() instead of glXChooseVisual() on GLX1.3+.

OpenGl_Window - create context using glXCreateContextAttribsARB()
when GLXFBConfig is provided by Aspect_Window.
This procedure now handles Core Profile and Debug Context options on Linux.

OpenGl_Window - drop code implicitly creating child window
when window XVisual is incomplete for OpenGL context.
This should eliminate event-handling issues at application side,
but would require window to be properly created by application.
This commit is contained in:
kgv
2015-09-29 10:15:32 +03:00
committed by bugmaster
parent a7197ef3c7
commit b6bf4ec174
8 changed files with 261 additions and 254 deletions

View File

@@ -0,0 +1,24 @@
// Copyright (c) 2015 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
#ifndef _Aspect_FBConfig_HeaderFile
#define _Aspect_FBConfig_HeaderFile
#if !defined(_WIN32) && (!defined(__APPLE__) || defined(MACOSX_USE_GLX)) && !defined(__ANDROID__)
typedef struct __GLXFBConfigRec* GLXFBConfig;
typedef GLXFBConfig Aspect_FBConfig; // GLXFBConfig* under UNIX
#else
typedef void* Aspect_FBConfig; // unused on other systems
#endif
#endif // _Aspect_FBConfig_HeaderFile

View File

@@ -21,6 +21,7 @@
#include <Aspect_Background.hxx>
#include <Aspect_GradientBackground.hxx>
#include <Aspect_FBConfig.hxx>
#include <Aspect_FillMethod.hxx>
#include <Standard_Boolean.hxx>
#include <MMgt_TShared.hxx>
@@ -113,8 +114,8 @@ public:
//! Returns parent of native Window handle (HWND on Windows, Window with Xlib, and so on)
Standard_EXPORT virtual Aspect_Drawable NativeParentHandle() const = 0;
//! Returns native Window FB config (GLXFBConfig on Xlib)
Standard_EXPORT virtual Aspect_FBConfig NativeFBConfig() const = 0;
DEFINE_STANDARD_RTTI(Aspect_Window,MMgt_TShared)

View File

@@ -19,6 +19,7 @@ Aspect_DisplayConnection.hxx
Aspect_DisplayConnectionDefinitionError.hxx
Aspect_Drawable.hxx
Aspect_DriverDefinitionError.hxx
Aspect_FBConfig.hxx
Aspect_FillMethod.hxx
Aspect_GenId.cxx
Aspect_GenId.hxx