comparison src/video/SDL_sysvideo.h @ 1912:8d384b647307

Setting up the OpenGL support
author Sam Lantinga <slouken@libsdl.org>
date Sun, 16 Jul 2006 09:34:01 +0000
parents 06c27a737b7a
children 83420da906a5
comparison
equal deleted inserted replaced
1911:7577fd11cee4 1912:8d384b647307
225 or if the application is shutting down the video subsystem. 225 or if the application is shutting down the video subsystem.
226 */ 226 */
227 void (*VideoQuit) (_THIS); 227 void (*VideoQuit) (_THIS);
228 228
229 /* * * */ 229 /* * * */
230 /* OpenGL support */ 230 /* OpenGL support
231 231 */
232 /* Sets the dll to use for OpenGL and loads it */
233 int (*GL_LoadLibrary) (_THIS, const char *path); 232 int (*GL_LoadLibrary) (_THIS, const char *path);
234
235 /* Retrieves the address of a function in the gl library */
236 void *(*GL_GetProcAddress) (_THIS, const char *proc); 233 void *(*GL_GetProcAddress) (_THIS, const char *proc);
237
238 /* Get attribute information from the windowing system. */
239 int (*GL_GetAttribute) (_THIS, SDL_GLattr attrib, int *value); 234 int (*GL_GetAttribute) (_THIS, SDL_GLattr attrib, int *value);
240 235 SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
241 /* Make the context associated with this driver current */ 236 int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
242 int (*GL_MakeCurrent) (_THIS); 237 int (*GL_SetSwapInterval) (_THIS, int interval);
243 238 int (*GL_GetSwapInterval) (_THIS);
244 /* Swap the current buffers in double buffer mode. */ 239 void (*GL_SwapWindow) (_THIS, SDL_Window * window);
245 void (*GL_SwapBuffers) (_THIS); 240 void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
246 241
247 /* Determine whether the mouse should be in relative mode or not. 242 /* * * */
248 This function is called when the input grab state or cursor 243 /* Event manager functions
249 visibility state changes. 244 */
250 If the cursor is not visible, and the input is grabbed, the
251 driver can place the mouse in relative mode, which may result
252 in higher accuracy sampling of the pointer motion.
253 */
254 void (*CheckMouseMode) (_THIS);
255
256 /* * * */
257 /* Event manager functions */
258
259 /* Handle any queued OS events */
260 void (*PumpEvents) (_THIS); 245 void (*PumpEvents) (_THIS);
261 246
262 /* * * */ 247 /* * * */
263 /* Data common to all drivers */ 248 /* Data common to all drivers */
264 int num_displays; 249 int num_displays;
265 SDL_VideoDisplay *displays; 250 SDL_VideoDisplay *displays;
266 int current_display; 251 int current_display;
267 Uint32 next_object_id; 252 Uint32 next_object_id;
268
269 /* Driver information flags */
270 253
271 /* * * */ 254 /* * * */
272 /* Data used by the GL drivers */ 255 /* Data used by the GL drivers */
273 struct 256 struct
274 { 257 {