00001 #ifndef __RE_NTVisual_h__
00002 #define __RE_NTVisual_h__
00003
00004 #include "RE_API.h"
00005 #include "RE_Types.h"
00006 #include "RE_Visual.h"
00007 #include "RE_Server.h"
00008 #include "UT/UT_Defines.h"
00009
00010 #define ENV_EMULATION_ON "HOUDINI_EMULATE_OVERLAY"
00011 #define ENV_EMULATION_OFF "HOUDINI_NO_EMULATE_OVERLAY"
00012
00013 #define EMULATION_DEV2 0
00014
00015 class PixelFormat;
00016 class RE_DDPrimarySurface;
00017 class RE_DDOffScreenSurface;
00018
00019 extern RE_OGLContext parentContext;
00020
00021 class RE_API RE_NTVisual : public RE_Visual
00022 {
00023 public:
00024 RE_NTVisual(RE_Server *newserver, RE_DisplayMode newmode);
00025 virtual ~RE_NTVisual();
00026
00027 virtual RE_OGLContext createContext(RE_Window *win) const;
00028 virtual void deleteContext(RE_OGLContext) const;
00029
00030 virtual void initialize( OGLDrawable graphicsDrawable,
00031 OGLDrawable alternateDrawable );
00032
00033 static PixelFormat *getPixelFormat( bool bitmap );
00034 static void initPixelFormats( bool bitmap, OGLDrawable draw );
00035 static int getBestPixelFormat( OGLDrawable draw,
00036 bool rgb,
00037 bool dbl,
00038 bool bitmap,
00039 int colorDepth,
00040 bool zbuffer,
00041 bool stencil_buffer);
00042
00043 static void deleteShareContext( );
00044
00045 private:
00046 static int getMultisampleFormat( RE_OGLContext context,
00047 RE_DisplayMode mode);
00048
00049 static RE_OGLContext theShareContext;
00050 static int theNumWindowPixFormats;
00051 static int theNumBitmapPixFormats;
00052 static PixelFormat *theWindowPixFormats;
00053 static PixelFormat *theBitmapPixFormats;
00054 };
00055
00056 #endif