vtkCarbonRenderWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00027 #ifndef __vtkCarbonRenderWindow_h
00028 #define __vtkCarbonRenderWindow_h
00029
00030 #include "vtkOpenGLRenderWindow.h"
00031
00032
00033 #include <Carbon/Carbon.h>
00034 #include <OpenGL/gl.h>
00035 #include <AGL/agl.h>
00036
00037 class vtkIdList;
00038
00039 class VTK_RENDERING_EXPORT vtkCarbonRenderWindow : public vtkOpenGLRenderWindow
00040 {
00041 public:
00042 static vtkCarbonRenderWindow *New();
00043 vtkTypeRevisionMacro(vtkCarbonRenderWindow,vtkOpenGLRenderWindow);
00044 void PrintSelf(ostream& os, vtkIndent indent);
00045
00047 void Start(void);
00048
00050 void Frame(void);
00051
00053 virtual void WindowConfigure(void);
00054
00056 virtual void WindowInitialize(void);
00057
00059 virtual void Initialize(void);
00060
00062 virtual void SetFullScreen(int);
00063
00065 virtual void WindowRemap(void);
00066
00068 virtual void PrefFullScreen(void);
00069
00071 virtual void SetSize(int,int);
00072
00074 virtual int *GetSize();
00075
00077 virtual void SetPosition(int,int);
00078
00080 virtual int *GetScreenSize();
00081
00083 virtual int *GetPosition();
00084
00087 virtual void SetWindowName(const char *);
00088
00090 void SetWindowInfo(void *);
00091
00092
00093 virtual void *GetGenericDisplayId() {return (void *)this->ContextId;};
00094 virtual void *GetGenericWindowId() {return (void *)this->WindowId;};
00095 virtual void *GetGenericParentId() {return (void *)this->ParentId;};
00096 virtual AGLContext GetContextId() {return this->ContextId;};
00097 virtual void *GetGenericContext() {return (void *)this->DeviceContext;};
00098 virtual void SetDisplayId(void *) {};
00099
00100 virtual void* GetGenericDrawable()
00101 {
00102 vtkWarningMacro("GetGenericDrawable Method not implemented.");
00103 return 0;
00104 }
00105 void SetWindowInfo(char*)
00106 {
00107 vtkWarningMacro("SetWindowInfo Method not implemented.");
00108 }
00109 void SetParentInfo(char*)
00110 {
00111 vtkWarningMacro("SetParentInfo Method not implemented.");
00112 }
00113
00115
00116 virtual WindowPtr GetWindowId();
00117 void SetWindowId(void *foo) {this->SetWindowId((WindowPtr)foo);};
00119
00121
00122 virtual void SetParentId(WindowPtr);
00123 void SetParentId(void *foo) {this->SetParentId((WindowPtr)foo);};
00125
00127 virtual void SetWindowId(WindowPtr);
00128
00129 void SetContextId(void *);
00130 void SetDeviceContext(void *);
00131
00132
00133
00134
00135 vtkSetMacro(MultiSamples,int);
00136 vtkGetMacro(MultiSamples,int);
00137
00142 virtual void SetStereoCapableWindow(int capable);
00143
00145 void MakeCurrent();
00146
00150 void SetForceMakeCurrent();
00151
00154 virtual int GetEventPending();
00155
00163 virtual void SetupPalette(void *hDC);
00164 virtual void SetupPixelFormat(void *hDC, void *dwFlags, int debug,
00165 int bpp=16, int zbpp=16);
00167
00169 void Clean();
00170
00172 int GetDepthBufferSize();
00173
00175
00177 void HideCursor();
00178 void ShowCursor();
00180
00181 void UpdateSizeAndPosition(int xPos, int yPos, int xSize, int ySize);
00182
00183
00184 protected:
00185 vtkCarbonRenderWindow();
00186 ~vtkCarbonRenderWindow();
00187
00188 int ApplicationInitialized;
00189 Boolean fAcceleratedMust;
00190 Boolean draggable;
00191 GLint aglAttributes[64];
00192
00193 SInt32 VRAM;
00194
00195 SInt32 textureRAM;
00196
00197 AGLPixelFormat fmt;
00198 AGLContext ContextId;
00199 AGLDrawable DeviceContext;
00200 WindowPtr WindowId;
00201 WindowPtr ParentId;
00202 int OwnWindow;
00203 int ScreenSize[2];
00204
00205 int ScreenMapped;
00206 int ScreenWindowSize[2];
00207 void *ScreenDeviceContext;
00208 int ScreenDoubleBuffer;
00209 void *ScreenContextId;
00210
00211 int CursorHidden;
00212 int ForceMakeCurrent;
00213
00214 void CreateAWindow(int x, int y, int width, int height);
00215 void InitializeApplication();
00216 private:
00217 vtkCarbonRenderWindow(const vtkCarbonRenderWindow&);
00218 void operator=(const vtkCarbonRenderWindow&);
00219 };
00220
00221 #endif