Mercurial > sdl-ios-xcode
annotate src/video/maccommon/SDL_lowvideo.h @ 885:9f6ad2286011
Date: Wed, 28 Apr 2004 16:52:41 -0400
From: "Damien A"
Subject: testdyngl fix
The test program you included in the latest version of SDL crashes on startup in Window (XP). The reason for this is that OpenGL functions on Windows use the __stdcall calling convention, not the C convention. Placing APIENTRY infront of the * operator solves this problem.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 30 Apr 2004 18:33:30 +0000 |
parents | 0c3e00cc9580 |
children | 609c060fd2a2 |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
769
b8d311d90021
Updated copyright information for 2004 (Happy New Year!)
Sam Lantinga <slouken@libsdl.org>
parents:
297
diff
changeset
|
3 Copyright (C) 1997-2004 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
6 modify it under the terms of the GNU Library General Public | |
7 License as published by the Free Software Foundation; either | |
8 version 2 of the License, or (at your option) any later version. | |
9 | |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 Library General Public License for more details. | |
14 | |
15 You should have received a copy of the GNU Library General Public | |
16 License along with this library; if not, write to the Free | |
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
18 | |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
0
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
22 | |
23 #ifdef SAVE_RCSID | |
24 static char rcsid = | |
25 "@(#) $Id$"; | |
26 #endif | |
27 | |
28 #ifndef _SDL_lowvideo_h | |
29 #define _SDL_lowvideo_h | |
30 | |
31 #if TARGET_API_MAC_CARBON | |
32 #include <Carbon.h> | |
33 #else | |
34 #include <Quickdraw.h> | |
35 #include <Palettes.h> | |
36 #include <Menus.h> | |
37 #include <DrawSprocket.h> | |
38 #endif | |
39 | |
40 #ifdef HAVE_OPENGL | |
41 #ifdef MACOSX | |
42 #include <OpenGL/gl.h> /* OpenGL.framework */ | |
43 #include <AGL/agl.h> /* AGL.framework */ | |
44 #else | |
45 #include <GL/gl.h> | |
46 #include <agl.h> | |
47 #endif /* MACOSX */ | |
48 #endif /* HAVE_OPENGL */ | |
49 | |
50 #include "SDL_video.h" | |
51 #include "SDL_sysvideo.h" | |
52 | |
53 /* Hidden "this" pointer for the video functions */ | |
54 #define _THIS SDL_VideoDevice *this | |
55 | |
56 #if !TARGET_API_MAC_CARBON /* not available in OS X (or more accurately, Carbon) */ | |
57 /* Global QuickDraw data */ | |
58 extern QDGlobals *theQD; | |
59 #endif | |
60 | |
61 /* Private display data */ | |
62 struct SDL_PrivateVideoData { | |
63 GDevice **SDL_Display; | |
64 WindowRef SDL_Window; | |
65 SDL_Rect **SDL_modelist; | |
66 CTabHandle SDL_CTab; | |
67 PaletteHandle SDL_CPal; | |
68 | |
69 #if TARGET_API_MAC_CARBON | |
70 /* For entering and leaving fullscreen mode */ | |
71 Ptr fullscreen_ctx; | |
72 #endif | |
73 | |
74 /* The current window document style */ | |
75 int current_style; | |
76 | |
77 /* Information about the last cursor position */ | |
78 Point last_where; | |
79 | |
80 /* Information about the last keys down */ | |
81 EventModifiers last_mods; | |
82 KeyMap last_keys; | |
83 | |
84 /* A handle to the Apple Menu */ | |
85 MenuRef apple_menu; | |
86 | |
87 /* Information used by DrawSprocket driver */ | |
88 struct DSpInfo *dspinfo; | |
89 | |
90 #ifdef HAVE_OPENGL | |
91 AGLContext appleGLContext; | |
774
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
92 |
0c3e00cc9580
Date: Mon, 5 Jan 2004 00:09:36 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
769
diff
changeset
|
93 void *libraryHandle; |
0 | 94 #endif |
95 }; | |
96 /* Old variable names */ | |
97 #define SDL_Display (this->hidden->SDL_Display) | |
98 #define SDL_Window (this->hidden->SDL_Window) | |
99 #define SDL_modelist (this->hidden->SDL_modelist) | |
100 #define SDL_CTab (this->hidden->SDL_CTab) | |
101 #define SDL_CPal (this->hidden->SDL_CPal) | |
102 #define fullscreen_ctx (this->hidden->fullscreen_ctx) | |
103 #define current_style (this->hidden->current_style) | |
104 #define last_where (this->hidden->last_where) | |
105 #define last_mods (this->hidden->last_mods) | |
106 #define last_keys (this->hidden->last_keys) | |
107 #define apple_menu (this->hidden->apple_menu) | |
108 #define glContext (this->hidden->appleGLContext) | |
109 | |
110 #endif /* _SDL_lowvideo_h */ |