Skip to content
Snippets Groups Projects
Commit 5fcd022e authored by Rene Brun's avatar Rene Brun
Browse files

a better way to fixs the compilation problem on Solaris.

git-svn-id: http://root.cern.ch/svn/root/trunk@19060 27541ba8-7e3a-0410-8455-c3a389f83636
parent 44703f5d
No related branches found
No related tags found
No related merge requests found
// @(#)root/gl:$Name: $:$Id: TGLContext.h,v 1.5 2007/06/18 07:02:16 brun Exp $ // @(#)root/gl:$Name: $:$Id: TGLContext.h,v 1.6 2007/06/18 09:44:25 brun Exp $
// Author: Timur Pocheptsov, Jun 2007 // Author: Timur Pocheptsov, Jun 2007
#include <utility> #include <utility>
...@@ -24,18 +24,17 @@ class TGLContextIdentity; ...@@ -24,18 +24,17 @@ class TGLContextIdentity;
#include "Rtypes.h" #include "Rtypes.h"
#endif #endif
class TGLContextPrivate;
class TGLPaintDevice; class TGLPaintDevice;
//class TGLPBuffer; //class TGLPBuffer;
class TGLWidget; class TGLWidget;
class TGLContext { class TGLContext {
class TGLContextPrivate; friend class TGLContextPrivate;
friend class TGLContextPrivate; // for solaris cc
friend class TGLWidget; friend class TGLWidget;
// friend class TGLPBuffer; // friend class TGLPBuffer;
private: private:
TGLPaintDevice *fDevice; TGLPaintDevice *fDevice;
class TGLContextPrivate;
TGLContextPrivate *fPimpl; TGLContextPrivate *fPimpl;
Bool_t fFromCtor;//To prohibit user's calls of SetContext. Bool_t fFromCtor;//To prohibit user's calls of SetContext.
......
// @(#)root/gl:$Name: $:$Id: TGLContextPrivate.h,v 1.3 2007/06/18 07:06:17 brun Exp $ // @(#)root/gl:$Name: $:$Id: TGLContextPrivate.h,v 1.4 2007/06/18 07:11:50 brun Exp $
// Author: Timur Pocheptsov, Matevz Tadel, June 2007 // Author: Timur Pocheptsov, Matevz Tadel, June 2007
#ifndef ROOT_TGLContextPrivate #ifndef ROOT_TGLContextPrivate
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifdef WIN32 #ifdef WIN32
class TGLContext::TGLContextPrivate { class TGLContextPrivate {
public: public:
HWND fHWND; HWND fHWND;
HDC fHDC; HDC fHDC;
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
#else #else
class TGLContext::TGLContextPrivate { class TGLContextPrivate {
public: public:
Display *fDpy; Display *fDpy;
XVisualInfo *fVisualInfo; XVisualInfo *fVisualInfo;
......
// @(#)root/gl:$Name$:$Id$ // @(#)root/gl:$Name: $:$Id: TGLContextPrivate.cxx,v 1.1 2007/06/18 07:02:16 brun Exp $
// Author: Timur Pocheptsov, Jun 2007 // Author: Timur Pocheptsov, Jun 2007
#ifndef WIN32 #ifndef WIN32
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#include "TGLContextPrivate.h" #include "TGLContextPrivate.h"
//______________________________________________________________________________ //______________________________________________________________________________
void TGLContext::TGLContextPrivate::RegisterContext(TGLContext *ctx) void TGLContextPrivate::RegisterContext(TGLContext *ctx)
{ {
//Register gl-context to find it later as current (GetCurrentContext) //Register gl-context to find it later as current (GetCurrentContext)
if (ctx->IsValid()) if (ctx->IsValid())
...@@ -16,7 +16,7 @@ void TGLContext::TGLContextPrivate::RegisterContext(TGLContext *ctx) ...@@ -16,7 +16,7 @@ void TGLContext::TGLContextPrivate::RegisterContext(TGLContext *ctx)
} }
//______________________________________________________________________________ //______________________________________________________________________________
void TGLContext::TGLContextPrivate::RemoveContext(TGLContext *ctx) void TGLContextPrivate::RemoveContext(TGLContext *ctx)
{ {
//Un-register deleted context. //Un-register deleted context.
if (ctx->IsValid()) if (ctx->IsValid())
...@@ -25,10 +25,10 @@ void TGLContext::TGLContextPrivate::RemoveContext(TGLContext *ctx) ...@@ -25,10 +25,10 @@ void TGLContext::TGLContextPrivate::RemoveContext(TGLContext *ctx)
#ifdef WIN32 #ifdef WIN32
std::map<HGLRC, TGLContext *> TGLContext::TGLContextPrivate::fContexts; std::map<HGLRC, TGLContext *> TGLContextPrivate::fContexts;
//______________________________________________________________________________ //______________________________________________________________________________
TGLContext *TGLContext::TGLContextPrivate::GetCurrentContext() TGLContext *TGLContextPrivate::GetCurrentContext()
{ {
//Ask wgl what HGLRC is current and look up corresponding TGLContext. //Ask wgl what HGLRC is current and look up corresponding TGLContext.
HGLRC glContext = wglGetCurrentContext(); HGLRC glContext = wglGetCurrentContext();
...@@ -42,10 +42,10 @@ TGLContext *TGLContext::TGLContextPrivate::GetCurrentContext() ...@@ -42,10 +42,10 @@ TGLContext *TGLContext::TGLContextPrivate::GetCurrentContext()
#else #else
std::map<GLXContext, TGLContext *> TGLContext::TGLContextPrivate::fContexts; std::map<GLXContext, TGLContext *> TGLContextPrivate::fContexts;
//______________________________________________________________________________ //______________________________________________________________________________
TGLContext *TGLContext::TGLContextPrivate::GetCurrentContext() TGLContext *TGLContextPrivate::GetCurrentContext()
{ {
//Ask wgl what HGLRC is current and look up corresponding TGLContext. //Ask wgl what HGLRC is current and look up corresponding TGLContext.
GLXContext glContext = glXGetCurrentContext(); GLXContext glContext = glXGetCurrentContext();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment