Mercurial > sdl-ios-xcode
comparison src/video/photon/SDL_ph_video.h @ 1662:782fd950bd46 SDL-1.3
Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API.
WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid.
The code is now run through a consistent indent format:
indent -i4 -nut -nsc -br -ce
The headers are being converted to automatically generate doxygen documentation.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 28 May 2006 13:04:16 +0000 |
parents | 141528317f4f |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
1661:281d3f4870e5 | 1662:782fd950bd46 |
---|---|
33 #include <Pt.h> | 33 #include <Pt.h> |
34 #include <photon/Pg.h> | 34 #include <photon/Pg.h> |
35 #include <photon/PdDirect.h> | 35 #include <photon/PdDirect.h> |
36 | 36 |
37 #if SDL_VIDEO_OPENGL | 37 #if SDL_VIDEO_OPENGL |
38 #if (_NTO_VERSION < 630) | 38 #if (_NTO_VERSION < 630) |
39 #include <photon/PdGL.h> | 39 #include <photon/PdGL.h> |
40 #else | 40 #else |
41 #include <GL/qnxgl.h> | 41 #include <GL/qnxgl.h> |
42 #include <GL/GLPh.h> | 42 #include <GL/GLPh.h> |
43 #endif /* 6.3.0 */ | 43 #endif /* 6.3.0 */ |
44 #endif /* SDL_VIDEO_OPENGL */ | 44 #endif /* SDL_VIDEO_OPENGL */ |
45 | 45 |
46 /* Hidden "this" pointer for the video functions */ | 46 /* Hidden "this" pointer for the video functions */ |
47 #define _THIS SDL_VideoDevice* this | 47 #define _THIS SDL_VideoDevice* this |
48 | 48 |
52 #define SDLPH_PAL_EMULATE 0x00000001L | 52 #define SDLPH_PAL_EMULATE 0x00000001L |
53 #define SDLPH_PAL_SYSTEM 0x00000002L | 53 #define SDLPH_PAL_SYSTEM 0x00000002L |
54 | 54 |
55 typedef struct | 55 typedef struct |
56 { | 56 { |
57 unsigned char* Y; | 57 unsigned char *Y; |
58 unsigned char* V; | 58 unsigned char *V; |
59 unsigned char* U; | 59 unsigned char *U; |
60 } FRAMEDATA; | 60 } FRAMEDATA; |
61 | 61 |
62 /* Mask values for SDL_ReallocFormat() */ | 62 /* Mask values for SDL_ReallocFormat() */ |
63 struct ColourMasks | 63 struct ColourMasks |
64 { | 64 { |
70 }; | 70 }; |
71 | 71 |
72 /* Private display data */ | 72 /* Private display data */ |
73 struct SDL_PrivateVideoData | 73 struct SDL_PrivateVideoData |
74 { | 74 { |
75 PgDisplaySettings_t mode_settings; | 75 PgDisplaySettings_t mode_settings; |
76 PtWidget_t *Window; /* used to handle input events */ | 76 PtWidget_t *Window; /* used to handle input events */ |
77 PhImage_t *image; /* used to display image */ | 77 PhImage_t *image; /* used to display image */ |
78 #if SDL_VIDEO_OPENGL | 78 #if SDL_VIDEO_OPENGL |
79 #if (_NTO_VERSION < 630) | 79 #if (_NTO_VERSION < 630) |
80 PdOpenGLContext_t* OGLContext; /* OpenGL context */ | 80 PdOpenGLContext_t *OGLContext; /* OpenGL context */ |
81 void* OGLBuffers; /* OpenGL buffers (unused) */ | 81 void *OGLBuffers; /* OpenGL buffers (unused) */ |
82 #else | 82 #else |
83 qnxglc_t* OGLContext; /* OpenGL context for the 6.3 */ | 83 qnxglc_t *OGLContext; /* OpenGL context for the 6.3 */ |
84 qnxgl_bufs_t* OGLBuffers; /* OpenGL buffers for the 6.3 */ | 84 qnxgl_bufs_t *OGLBuffers; /* OpenGL buffers for the 6.3 */ |
85 #endif /* 630 */ | 85 #endif /* 630 */ |
86 | 86 |
87 Uint32 OGLFlags; /* OpenGL flags */ | 87 Uint32 OGLFlags; /* OpenGL flags */ |
88 Uint32 OGLBPP; /* OpenGL bpp */ | 88 Uint32 OGLBPP; /* OpenGL bpp */ |
89 #endif /* SDL_VIDEO_OPENGL */ | 89 #endif /* SDL_VIDEO_OPENGL */ |
90 PgColor_t savedpal[_Pg_MAX_PALETTE]; | 90 PgColor_t savedpal[_Pg_MAX_PALETTE]; |
91 PgColor_t syspalph[_Pg_MAX_PALETTE]; | 91 PgColor_t syspalph[_Pg_MAX_PALETTE]; |
92 | 92 |
93 struct | 93 struct |
94 { | 94 { |
95 PdDirectContext_t* direct_context; | 95 PdDirectContext_t *direct_context; |
96 PdOffscreenContext_t* offscreen_context; | 96 PdOffscreenContext_t *offscreen_context; |
97 PdOffscreenContext_t* offscreen_backcontext; | 97 PdOffscreenContext_t *offscreen_backcontext; |
98 PhDrawContext_t* oldDC; | 98 PhDrawContext_t *oldDC; |
99 uint8_t* dc_ptr; | 99 uint8_t *dc_ptr; |
100 unsigned char* CurrentFrameData; | 100 unsigned char *CurrentFrameData; |
101 unsigned char* FrameData0; | 101 unsigned char *FrameData0; |
102 unsigned char* FrameData1; | 102 unsigned char *FrameData1; |
103 Uint32 current; | 103 Uint32 current; |
104 Uint32 flags; | 104 Uint32 flags; |
105 } ocimage; | 105 } ocimage; |
106 | 106 |
107 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */ | 107 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */ |
108 PgVideoModeInfo_t desktop_mode; /* Current desktop video mode information */ | 108 PgVideoModeInfo_t desktop_mode; /* Current desktop video mode information */ |
109 int old_video_mode; /* Stored mode before fullscreen switch */ | 109 int old_video_mode; /* Stored mode before fullscreen switch */ |
110 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ | 110 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ |
111 | 111 |
112 int mouse_relative; | 112 int mouse_relative; |
113 WMcursor* BlankCursor; | 113 WMcursor *BlankCursor; |
114 uint32_t videomode_emulatemode; | 114 uint32_t videomode_emulatemode; |
115 | 115 |
116 Uint32 visualbpp; /* current visual bpp */ | 116 Uint32 visualbpp; /* current visual bpp */ |
117 Uint32 desktopbpp; /* bpp of desktop at the moment of start */ | 117 Uint32 desktopbpp; /* bpp of desktop at the moment of start */ |
118 Uint32 desktoppal; /* palette mode emulation or system */ | 118 Uint32 desktoppal; /* palette mode emulation or system */ |
119 | 119 |
120 int currently_fullscreen; | 120 int currently_fullscreen; |
121 int currently_hided; /* 1 - window hided (minimazed), 0 - normal */ | 121 int currently_hided; /* 1 - window hided (minimazed), 0 - normal */ |
122 int currently_maximized; /* 1 - window hided (minimazed), 0 - normal */ | 122 int currently_maximized; /* 1 - window hided (minimazed), 0 - normal */ |
123 | 123 |
124 PhEvent_t* event; | 124 PhEvent_t *event; |
125 SDL_Overlay* overlay; | 125 SDL_Overlay *overlay; |
126 }; | 126 }; |
127 | 127 |
128 #define mode_settings (this->hidden->mode_settings) | 128 #define mode_settings (this->hidden->mode_settings) |
129 #define window (this->hidden->Window) | 129 #define window (this->hidden->Window) |
130 #define SDL_Image (this->hidden->image) | 130 #define SDL_Image (this->hidden->image) |
146 #define mouse_relative (this->hidden->mouse_relative) | 146 #define mouse_relative (this->hidden->mouse_relative) |
147 #define SDL_BlankCursor (this->hidden->BlankCursor) | 147 #define SDL_BlankCursor (this->hidden->BlankCursor) |
148 #define videomode_emulatemode (this->hidden->videomode_emulatemode) | 148 #define videomode_emulatemode (this->hidden->videomode_emulatemode) |
149 | 149 |
150 #if SDL_VIDEO_OPENGL | 150 #if SDL_VIDEO_OPENGL |
151 #define oglctx (this->hidden->OGLContext) | 151 #define oglctx (this->hidden->OGLContext) |
152 #define oglbuffers (this->hidden->OGLBuffers) | 152 #define oglbuffers (this->hidden->OGLBuffers) |
153 #define oglflags (this->hidden->OGLFlags) | 153 #define oglflags (this->hidden->OGLFlags) |
154 #define oglbpp (this->hidden->OGLBPP) | 154 #define oglbpp (this->hidden->OGLBPP) |
155 #endif /* SDL_VIDEO_OPENGL */ | 155 #endif /* SDL_VIDEO_OPENGL */ |
156 | 156 |
157 #endif /* __SDL_PH_VIDEO_H__ */ | 157 #endif /* __SDL_PH_VIDEO_H__ */ |
158 /* vi: set ts=4 sw=4 expandtab: */ |