dox/Rendering/vtkCocoaRenderWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00023
#ifndef __vtkCocoaRenderWindow_h
00024
#define __vtkCocoaRenderWindow_h
00025
00026
#include "vtkOpenGLRenderWindow.h"
00027
#include <OpenGL/gl.h>
00028
00029
class vtkIdList;
00030
00031 class VTK_RENDERING_EXPORT vtkCocoaRenderWindow :
public vtkOpenGLRenderWindow
00032 {
00033
public:
00034
static vtkCocoaRenderWindow *
New();
00035 vtkTypeRevisionMacro(vtkCocoaRenderWindow,
vtkOpenGLRenderWindow);
00036
void PrintSelf(ostream& os,
vtkIndent indent);
00037
00039
virtual void Start(
void);
00040
00042
virtual void Frame(
void);
00043
00045
virtual void WindowConfigure(
void);
00046
00048
virtual void WindowInitialize(
void);
00049
00051
virtual void Initialize(
void);
00052
00054
virtual void SetFullScreen(
int);
00055
00057
virtual void WindowRemap(
void);
00058
00060
virtual void PrefFullScreen(
void);
00061
00063
virtual void SetSize(
int,
int);
00064
00066
virtual int *
GetSize();
00067
00069
virtual void SetPosition(
int,
int);
00070
00072
virtual int *GetScreenSize();
00073
00075
virtual int *
GetPosition();
00076
00079
virtual void SetWindowName(
const char *);
00080
00082
virtual void SetWindowInfo(
void *);
00083
00084 void SetNextWindowInfo(
char *)
00085 {
00086 vtkWarningMacro(
"SetNextWindowInfo not implemented (WindowRemap not implemented).");
00087 }
00088
00089
00090
00091 virtual void *
GetGenericDisplayId() {
return (
void *)this->ContextId;};
00092 virtual void *
GetGenericWindowId() {
return (
void *)this->WindowId;};
00093 virtual void *
GetGenericContext() {
return (
void *)this->DeviceContext;};
00094 virtual void SetDisplayId(
void *) {};
00095 virtual void SetParentId(
void *)
00096 {
00097 vtkWarningMacro(
"Method not implemented.");
00098 }
00099 virtual void*
GetGenericParentId()
00100 {
00101 vtkWarningMacro(
"Method not implemented.");
00102
return 0;
00103 }
00104 virtual void*
GetGenericDrawable()
00105 {
00106 vtkWarningMacro(
"Method not implemented.");
00107
return 0;
00108 }
00109 virtual void SetWindowInfo(
char*)
00110 {
00111 vtkWarningMacro(
"Method not implemented.");
00112 }
00113 virtual void SetParentInfo(
char*)
00114 {
00115 vtkWarningMacro(
"Method not implemented.");
00116 }
00117
00119
virtual void *GetWindowId();
00120
00122
virtual void SetWindowId(
void *);
00123
00124 void SetNextWindowId(
void*)
00125 {
00126 vtkWarningMacro(
"SetNextWindowId not implemented (WindowRemap not implemented).");
00127 }
00128
00129
00130
void SetContextId(
void *);
00131
void SetDeviceContext(
void *);
00132
00133
00134
00135
00136 vtkSetMacro(MultiSamples,
int);
00137 vtkGetMacro(MultiSamples,
int);
00138
00140
virtual void StereoUpdate();
00141
00146
virtual void SetStereoCapableWindow(
int capable);
00147
00149
virtual void MakeCurrent();
00150
00152
const char *
ReportCapabilities();
00153
00155
int SupportsOpenGL();
00156
00158
int IsDirect();
00159
00163
virtual void SetForceMakeCurrent();
00164
00167
virtual int GetEventPending();
00168
00176
virtual void SetupPalette(
void *hDC);
00177
virtual void SetupPixelFormat(
void *hDC,
void *dwFlags,
int debug,
00178
int bpp=16,
int zbpp=16);
00180
00182
void Clean();
00183
00185
void RegisterTextureResource (GLuint
id);
00186
00188
int GetDepthBufferSize();
00189
00191
00193
virtual void HideCursor();
00194
virtual void ShowCursor();
00196
00197
void UpdateSizeAndPosition(
int xPos,
int yPos,
int xSize,
int ySize);
00198
00199
00200
protected:
00201 vtkCocoaRenderWindow();
00202 ~vtkCocoaRenderWindow();
00203
00204 int ApplicationInitialized;
00205 void *ContextId;
00206 void *DeviceContext;
00207 void *WindowId;
00208 void *WindowController;
00209 int OwnWindow;
00210 int ScreenSize[2];
00211 int MultiSamples;
00212 vtkIdList *TextureResourceIds;
00213
00214
int GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
unsigned char* data);
00215
int GetZbufferData(
int x1,
int y1,
int x2,
int y2,
float* z );
00216
int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
float* data);
00217
int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
00218
unsigned char* data);
00219
00220
00221
00222
00223
00224
00225
00226 int ScreenMapped;
00227 int ScreenWindowSize[2];
00228 void *ScreenDeviceContext;
00229 int ScreenDoubleBuffer;
00230 void *ScreenContextId;
00231
00232 int CursorHidden;
00233 int ForceMakeCurrent;
00234
00235 char *Capabilities;
00236
00237
private:
00238 vtkCocoaRenderWindow(
const vtkCocoaRenderWindow&);
00239
void operator=(
const vtkCocoaRenderWindow&);
00240 };
00241
00242
#endif