comparison src/video/photon/SDL_ph_video.h @ 701:aaf3b8af6616

Date: Sat, 30 Aug 2003 16:28:10 +0300 From: "Mike Gorchak" Subject: Re: SDL 1.2.6 - minor changes about shared library building under QNX6 into README.QNX - added forgotten libSDLmain.a into distribution, SDL.qpg.in - added header guards to the all headers. - fixed fullscreen double buffered mode. - fixed Photon crashes after/during using fullscreen OpenGL modes. - added GL_MakeCurrent function. - added SDL_VIDEOEXPOSE event, when OpenGL window have been resized - added more HAVE_OPENGL checks to avoid dead code compilation without using OpenGL - finished code reorganization (began into previous patches).
author Sam Lantinga <slouken@libsdl.org>
date Sat, 30 Aug 2003 17:07:59 +0000
parents 04dd6c6d7c30
children b14fdadd8311
comparison
equal deleted inserted replaced
700:c35edafc84d1 701:aaf3b8af6616
44 #define SDLPH_PAL_EMULATE 0x00000001L 44 #define SDLPH_PAL_EMULATE 0x00000001L
45 #define SDLPH_PAL_SYSTEM 0x00000002L 45 #define SDLPH_PAL_SYSTEM 0x00000002L
46 46
47 typedef struct 47 typedef struct
48 { 48 {
49 unsigned char* Y; 49 unsigned char* Y;
50 unsigned char* V; 50 unsigned char* V;
51 unsigned char* U; 51 unsigned char* U;
52 } FRAMEDATA; 52 } FRAMEDATA;
53 53
54 /* Mask values for SDL_ReallocFormat() */ 54 /* Mask values for SDL_ReallocFormat() */
55 struct ColourMasks 55 struct ColourMasks
56 { 56 {
66 PgDisplaySettings_t mode_settings; 66 PgDisplaySettings_t mode_settings;
67 PtWidget_t *Window; /* used to handle input events */ 67 PtWidget_t *Window; /* used to handle input events */
68 PhImage_t *image; /* used to display image */ 68 PhImage_t *image; /* used to display image */
69 #ifdef HAVE_OPENGL 69 #ifdef HAVE_OPENGL
70 PdOpenGLContext_t* OGLContext; /* OpenGL context */ 70 PdOpenGLContext_t* OGLContext; /* OpenGL context */
71 Uint32 OGLFlags; /* OpenGL flags */
72 Uint32 OGLBPP; /* OpenGL bpp */
71 #endif /* HAVE_OPENGL */ 73 #endif /* HAVE_OPENGL */
72 PgColor_t savedpal[_Pg_MAX_PALETTE]; 74 PgColor_t savedpal[_Pg_MAX_PALETTE];
73 PgColor_t syspalph[_Pg_MAX_PALETTE]; 75 PgColor_t syspalph[_Pg_MAX_PALETTE];
74 76
75 struct 77 struct
80 PhDrawContext_t* oldDC; 82 PhDrawContext_t* oldDC;
81 uint8_t* dc_ptr; 83 uint8_t* dc_ptr;
82 unsigned char* CurrentFrameData; 84 unsigned char* CurrentFrameData;
83 unsigned char* FrameData0; 85 unsigned char* FrameData0;
84 unsigned char* FrameData1; 86 unsigned char* FrameData1;
85 int current; 87 Uint32 current;
86 long flags; 88 Uint32 flags;
87 } ocimage; 89 } ocimage;
88 90
89 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */ 91 PgHWCaps_t graphics_card_caps; /* Graphics card caps at the moment of start */
90 PgVideoModeInfo_t desktop_mode; /* Current desktop video mode information */ 92 PgVideoModeInfo_t desktop_mode; /* Current desktop video mode information */
91 int old_video_mode; /* Stored mode before fullscreen switch */ 93 int old_video_mode; /* Stored mode before fullscreen switch */
92 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */ 94 int old_refresh_rate; /* Stored refresh rate befor fullscreen switch */
93 95
94 int mouse_relative; 96 int mouse_relative;
95 WMcursor* BlankCursor; 97 WMcursor* BlankCursor;
96 98
97 int depth; /* current visual depth (not bpp) */ 99 Uint32 depth; /* current visual depth (not bpp) */
98 int desktopbpp; /* bpp of desktop at the moment of start */ 100 Uint32 desktopbpp; /* bpp of desktop at the moment of start */
99 int desktoppal; /* palette mode emulation or system */ 101 Uint32 desktoppal; /* palette mode emulation or system */
100 102
101 int currently_fullscreen; 103 int currently_fullscreen;
102 int currently_hided; /* 1 - window hided (minimazed), 0 - normal */ 104 int currently_hided; /* 1 - window hided (minimazed), 0 - normal */
103 105
104 PhEvent_t* event; 106 PhEvent_t* event;
105 SDL_Overlay* overlay; 107 SDL_Overlay* overlay;
106 }; 108 };
107 109
108 #define mode_settings (this->hidden->mode_settings) 110 #define mode_settings (this->hidden->mode_settings)
109 #define window (this->hidden->Window) 111 #define window (this->hidden->Window)
110 #define oglctx (this->hidden->OGLContext)
111 #define SDL_Image (this->hidden->image) 112 #define SDL_Image (this->hidden->image)
112 #define OCImage (this->hidden->ocimage) 113 #define OCImage (this->hidden->ocimage)
113 #define old_video_mode (this->hidden->old_video_mode) 114 #define old_video_mode (this->hidden->old_video_mode)
114 #define old_refresh_rate (this->hidden->old_refresh_rate) 115 #define old_refresh_rate (this->hidden->old_refresh_rate)
115 #define graphics_card_caps (this->hidden->graphics_card_caps) 116 #define graphics_card_caps (this->hidden->graphics_card_caps)
120 #define currently_fullscreen (this->hidden->currently_fullscreen) 121 #define currently_fullscreen (this->hidden->currently_fullscreen)
121 #define currently_hided (this->hidden->currently_hided) 122 #define currently_hided (this->hidden->currently_hided)
122 #define event (this->hidden->event) 123 #define event (this->hidden->event)
123 #define current_overlay (this->hidden->overlay) 124 #define current_overlay (this->hidden->overlay)
124 #define desktop_mode (this->hidden->desktop_mode) 125 #define desktop_mode (this->hidden->desktop_mode)
125
126 /* Old variable names */
127 #define mouse_relative (this->hidden->mouse_relative) 126 #define mouse_relative (this->hidden->mouse_relative)
128 #define SDL_BlankCursor (this->hidden->BlankCursor) 127 #define SDL_BlankCursor (this->hidden->BlankCursor)
129 128
129 #ifdef HAVE_OPENGL
130 #define oglctx (this->hidden->OGLContext)
131 #define oglflags (this->hidden->OGLFlags)
132 #define oglbpp (this->hidden->OGLBPP)
133 #endif /* HAVE_OPENGL */
134
130 #endif /* __SDL_PH_VIDEO_H__ */ 135 #endif /* __SDL_PH_VIDEO_H__ */