00001
00002
00003
00004
00005
00006
00008
00010
00011
00012
00013
00014
00016
00017 #pragma once
00018
00019 #include <qgl.h>
00020 #if defined(Q_WS_X11)
00021 #include <GL/glx.h>
00022 #endif
00023 #if defined(Q_WS_MAC)
00024 #include <agl.h>
00025 #endif
00026
00031 class CustomContext:public QGLContext
00032 {
00033 public:
00034 CustomContext (const QGLFormat & fmt, QPaintDevice * dev):QGLContext (fmt, dev)
00035 {
00036 }
00037
00038 protected:
00039 #if defined(Q_WS_WIN)
00040 int choosePixelFormat (void *p, HDC hdc);
00041 #elif defined(Q_WS_X11)
00042 void *chooseVisual ();
00043 #elif defined(Q_WS_MAC)
00044 void *chooseMacVisual (GDHandle gdev);
00045 #endif
00046 };