1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024123: Create debug OpenGL context when requested (GL_ARB_debug_output)

Introduce new OpenGl_Caps class for unified graphic driver options access.
New command vgldebug to request debug OpenGL context.
OpenGl_Window  - create debug OpenGL context when requested (WGL-only).
OpenGl_Context - destroy arbTBO, arbIns members.
Workaround namespace collisions with Xlib macros
Eliminate new warning (unused argument in OpenGl_Context::debugCallbackWrap)
This commit is contained in:
kgv
2013-08-29 15:45:45 +04:00
committed by bugmaster
parent 5e1e45fc69
commit 58655684c0
20 changed files with 541 additions and 126 deletions

View File

@@ -16,48 +16,53 @@
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
#ifndef _WIN32
#ifndef InterfaceGraphic_X11Header
# define InterfaceGraphic_X11Header
#define InterfaceGraphic_X11Header
# ifndef WNT
# include <stdio.h>
#include <stdio.h>
# include <X11/Xlib.h>
# include <X11/Xutil.h>
# include <X11/Xatom.h>
# include <GL/glx.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <GL/glx.h>
# if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
# ifndef icon_width
# include <X11/bitmaps/icon>
# endif
# endif /* SUNOS or DECOSF1 or SOLARIS or HPUX or IRIX */
# ifdef ULTRIX
# ifndef icon_width
/* le contenu de #include <X11/bitmaps/icon> sur SUN */
#define icon_width 16
#define icon_height 16
static unsigned char icon_bits[] = {
0xff, 0xff, 0xab, 0xaa, 0x55, 0xd5, 0xab, 0xaa, 0x05, 0xd0, 0x0b, 0xa0,
#if defined (sun) || defined (SUNOS) || defined (__alpha) || defined (DECOSF1) || defined (sgi) || defined (IRIX) || defined (__hpux)|| defined (HPUX)
#ifndef icon_width
#include <X11/bitmaps/icon>
#endif
#endif // SUNOS or DECOSF1 or SOLARIS or HPUX or IRIX
#if defined(ULTRIX) && !defined(icon_width)
#define icon_width 16
#define icon_height 16
static unsigned char icon_bits[] =
{
0xff, 0xff, 0xab, 0xaa, 0x55, 0xd5, 0xab, 0xaa, 0x05, 0xd0, 0x0b, 0xa0,
0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0, 0x05, 0xd0, 0x0b, 0xa0,
0x55, 0xd5, 0xab, 0xaa, 0x55, 0xd5, 0xff, 0xff};
# endif
0x55, 0xd5, 0xab, 0xaa, 0x55, 0xd5, 0xff, 0xff
};
#endif // ULTRIX
# endif /* ULTRIX */
# define WINDOW Window
# define DISPLAY Display
# define GLCONTEXT GLXContext
# define GLDRAWABLE GLXDrawable
// workaround name conflicts with OCCT methods (in class TopoDS_Shape for example)
#ifdef Convex
#undef Convex
#endif
#ifdef Status
#undef Status
#endif
# define GET_GL_CONTEXT() glXGetCurrentContext()
# define GET_GLDEV_CONTEXT() glXGetCurrentDrawable()
# define GL_MAKE_CURRENT(a,b,c) glXMakeCurrent(a,b,c)
#define WINDOW Window
#define DISPLAY Display
#define GLCONTEXT GLXContext
#define GLDRAWABLE GLXDrawable
# ifndef EXPORT
# define EXPORT
# endif /* EXPORT */
# endif /* WNT */
#endif /* InterfaceGraphic_X11Header */
#define GET_GL_CONTEXT() glXGetCurrentContext()
#define GET_GLDEV_CONTEXT() glXGetCurrentDrawable()
#define GL_MAKE_CURRENT(a,b,c) glXMakeCurrent(a,b,c)
#ifndef EXPORT
#define EXPORT
#endif // EXPORT
#endif // InterfaceGraphic_X11Header
#endif // _WIN32