Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
Rendering/vtkCarbonRenderWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00037 #ifndef __vtkCarbonRenderWindow_h
00038 #define __vtkCarbonRenderWindow_h
00039
00040 #include "vtkOpenGLRenderWindow.h"
00041
00042
00043 #include <Carbon/Carbon.h>
00044 #include <OpenGL/gl.h>
00045 #include <AGL/agl.h>
00046
00047 class vtkIdList;
00048
00049 class VTK_RENDERING_EXPORT vtkCarbonRenderWindow : public vtkOpenGLRenderWindow
00050 {
00051 public:
00052 static vtkCarbonRenderWindow *New();
00053 vtkTypeRevisionMacro(vtkCarbonRenderWindow,vtkOpenGLRenderWindow);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00057 void Start(void);
00058
00060 void Frame(void);
00061
00063 virtual void WindowConfigure(void);
00064
00066 virtual void WindowInitialize(void);
00067
00069 virtual void Initialize(void);
00070
00072 virtual void SetFullScreen(int);
00073
00075 virtual void WindowRemap(void);
00076
00078 virtual void PrefFullScreen(void);
00079
00081 virtual void SetSize(int,int);
00082
00084 virtual int *GetSize();
00085
00087 virtual void SetPosition(int,int);
00088
00090 virtual int *GetScreenSize();
00091
00093 virtual int *GetPosition();
00094
00097 virtual void SetWindowName(const char *);
00098
00100 void SetWindowInfo(void *);
00101
00102
00103 virtual void *GetGenericDisplayId() {return (void *)this->ContextId;};
00104 virtual void *GetGenericWindowId() {return (void *)this->WindowId;};
00105 virtual void *GetGenericParentId() {return (void *)this->ParentId;};
00106 virtual AGLContext GetContextId() {return this->ContextId;};
00107 virtual void *GetGenericContext() {return (void *)this->DeviceContext;};
00108 virtual void SetDisplayId(void *) {};
00109
00110 virtual void* GetGenericDrawable()
00111 {
00112 vtkWarningMacro("GetGenericDrawable Method not implemented.");
00113 return 0;
00114 }
00115 void SetWindowInfo(char*)
00116 {
00117 vtkWarningMacro("SetWindowInfo Method not implemented.");
00118 }
00119 void SetParentInfo(char*)
00120 {
00121 vtkWarningMacro("SetParentInfo Method not implemented.");
00122 }
00123
00125
00126 virtual WindowPtr GetWindowId();
00127 void SetWindowId(void *foo) {this->SetWindowId((WindowPtr)foo);};
00129
00131
00132 virtual void SetParentId(WindowPtr);
00133 void SetParentId(void *foo) {this->SetParentId((WindowPtr)foo);};
00135
00137 virtual void SetWindowId(WindowPtr);
00138
00139 void SetContextId(void *);
00140 void SetDeviceContext(void *);
00141
00142
00143
00144
00145 vtkSetMacro(MultiSamples,int);
00146 vtkGetMacro(MultiSamples,int);
00147
00152 virtual void SetStereoCapableWindow(int capable);
00153
00155 void MakeCurrent();
00156
00160 void SetForceMakeCurrent();
00161
00164 virtual int GetEventPending();
00165
00173 virtual void SetupPalette(void *hDC);
00174 virtual void SetupPixelFormat(void *hDC, void *dwFlags, int debug,
00175 int bpp=16, int zbpp=16);
00177
00179 void Clean();
00180
00182 int GetDepthBufferSize();
00183
00185
00187 void HideCursor();
00188 void ShowCursor();
00190
00191 void UpdateSizeAndPosition(int xPos, int yPos, int xSize, int ySize);
00192
00193
00194 protected:
00195 vtkCarbonRenderWindow();
00196 ~vtkCarbonRenderWindow();
00197
00198 int ApplicationInitialized;
00199 Boolean fAcceleratedMust;
00200 Boolean draggable;
00201 GLint aglAttributes[64];
00202
00203 SInt32 VRAM;
00204
00205 SInt32 textureRAM;
00206
00207 AGLPixelFormat fmt;
00208 AGLContext ContextId;
00209 AGLDrawable DeviceContext;
00210 WindowPtr WindowId;
00211 WindowPtr ParentId;
00212 int OwnWindow;
00213 int ScreenSize[2];
00214
00215 int ScreenMapped;
00216 int ScreenWindowSize[2];
00217 void *ScreenDeviceContext;
00218 int ScreenDoubleBuffer;
00219 void *ScreenContextId;
00220
00221 int CursorHidden;
00222 int ForceMakeCurrent;
00223
00224 void CreateAWindow(int x, int y, int width, int height);
00225 void InitializeApplication();
00226 private:
00227 vtkCarbonRenderWindow(const vtkCarbonRenderWindow&);
00228 void operator=(const vtkCarbonRenderWindow&);
00229 };
00230
00231 #endif