Mercurial > sdl-ios-xcode
annotate docs/html/sdlsetgammaramp.html @ 4427:eada7e321df6 SDL-1.2
Fixed bug #943
Ozkan Sezer 2010-02-06 12:31:06 PST
Hi:
Here are some small fixes for compiling SDL against mingw-w64.
(see http://mingw-w64.sourceforge.net/ . Despite the name, it
supports both win32 and win64.) Two patches, one for SDL-1.2
and one for SDL-1.3 attached.
src/audio/windx5/directx.h and src/video/windx5/directx.h (both
SDL-1.2 and SDL-1.3.) I get compilation errors about some union
not having a member named u1 and alike, because of other system
headers being included before this one and them already defining
DUMMYUNIONNAME and stuff. This header probably assumes that those
stuff are defined in windef.h, but mingw-w64 headers define them
in _mingw.h. Easily fixed by moving NONAMELESSUNION definition to
the top of the file. SDL_dx5yuv.c (SDL-1.2-only) also needs to
include the header before SDL_video.h to avoid the same problem.
src/thread/win32/SDL_systhread.c (both SDL-1.2 and SDL-1.3.) :
The __GNUC__ case for pfnSDL_CurrentBeginThread is 32-bit centric
because _beginthreadex returns uintptr_t, not unsigned long which
is 32 bits in win64. Changing the return type to uintptr_t fixes
it.
Hope these are useful. Thanks.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 10 Mar 2010 15:04:13 +0000 |
parents | 355632dca928 |
children |
rev | line source |
---|---|
0 | 1 <HTML |
2 ><HEAD | |
3 ><TITLE | |
4 >SDL_SetGammaRamp</TITLE | |
5 ><META | |
6 NAME="GENERATOR" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ |
0 | 8 "><LINK |
9 REL="HOME" | |
10 TITLE="SDL Library Documentation" | |
11 HREF="index.html"><LINK | |
12 REL="UP" | |
13 TITLE="Video" | |
14 HREF="video.html"><LINK | |
15 REL="PREVIOUS" | |
16 TITLE="SDL_GetGammaRamp" | |
17 HREF="sdlgetgammaramp.html"><LINK | |
18 REL="NEXT" | |
19 TITLE="SDL_MapRGB" | |
20 HREF="sdlmaprgb.html"></HEAD | |
21 ><BODY | |
22 CLASS="REFENTRY" | |
23 BGCOLOR="#FFF8DC" | |
24 TEXT="#000000" | |
25 LINK="#0000ee" | |
26 VLINK="#551a8b" | |
27 ALINK="#ff0000" | |
28 ><DIV | |
29 CLASS="NAVHEADER" | |
30 ><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
31 SUMMARY="Header navigation table" |
0 | 32 WIDTH="100%" |
33 BORDER="0" | |
34 CELLPADDING="0" | |
35 CELLSPACING="0" | |
36 ><TR | |
37 ><TH | |
38 COLSPAN="3" | |
39 ALIGN="center" | |
40 >SDL Library Documentation</TH | |
41 ></TR | |
42 ><TR | |
43 ><TD | |
44 WIDTH="10%" | |
45 ALIGN="left" | |
46 VALIGN="bottom" | |
47 ><A | |
48 HREF="sdlgetgammaramp.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
49 ACCESSKEY="P" |
0 | 50 >Prev</A |
51 ></TD | |
52 ><TD | |
53 WIDTH="80%" | |
54 ALIGN="center" | |
55 VALIGN="bottom" | |
56 ></TD | |
57 ><TD | |
58 WIDTH="10%" | |
59 ALIGN="right" | |
60 VALIGN="bottom" | |
61 ><A | |
62 HREF="sdlmaprgb.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
63 ACCESSKEY="N" |
0 | 64 >Next</A |
65 ></TD | |
66 ></TR | |
67 ></TABLE | |
68 ><HR | |
69 ALIGN="LEFT" | |
70 WIDTH="100%"></DIV | |
71 ><H1 | |
72 ><A | |
73 NAME="SDLSETGAMMARAMP" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
74 ></A |
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
75 >SDL_SetGammaRamp</H1 |
0 | 76 ><DIV |
77 CLASS="REFNAMEDIV" | |
78 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
79 NAME="AEN1624" |
0 | 80 ></A |
81 ><H2 | |
82 >Name</H2 | |
83 >SDL_SetGammaRamp -- Sets the color gamma lookup tables for the display</DIV | |
84 ><DIV | |
85 CLASS="REFSYNOPSISDIV" | |
86 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
87 NAME="AEN1627" |
0 | 88 ></A |
89 ><H2 | |
90 >Synopsis</H2 | |
91 ><DIV | |
92 CLASS="FUNCSYNOPSIS" | |
93 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
94 NAME="AEN1628" |
0 | 95 ></A |
96 ><P | |
97 ></P | |
98 ><PRE | |
99 CLASS="FUNCSYNOPSISINFO" | |
100 >#include "SDL.h"</PRE | |
101 ><P | |
102 ><CODE | |
103 ><CODE | |
104 CLASS="FUNCDEF" | |
105 >int <B | |
106 CLASS="FSFUNC" | |
107 >SDL_SetGammaRamp</B | |
108 ></CODE | |
109 >(Uint16 *redtable, Uint16 *greentable, Uint16 *bluetable);</CODE | |
110 ></P | |
111 ><P | |
112 ></P | |
113 ></DIV | |
114 ></DIV | |
115 ><DIV | |
116 CLASS="REFSECT1" | |
117 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
118 NAME="AEN1634" |
0 | 119 ></A |
120 ><H2 | |
121 >Description</H2 | |
122 ><P | |
123 >Sets the gamma lookup tables for the display for each color component. | |
124 Each table is an array of 256 Uint16 values, representing a mapping | |
125 between the input and output for that channel. The input is the index | |
126 into the array, and the output is the 16-bit gamma value at that index, | |
127 scaled to the output color precision. You may pass NULL to any of the | |
128 channels to leave them unchanged.</P | |
129 ><P | |
130 >This function adjusts the gamma based on lookup tables, you can also | |
131 have the gamma calculated based on a "gamma function" parameter with | |
132 <A | |
133 HREF="sdlsetgamma.html" | |
134 >SDL_SetGamma</A | |
135 >.</P | |
136 ><P | |
137 >Not all display hardware is able to change gamma.</P | |
138 ></DIV | |
139 ><DIV | |
140 CLASS="REFSECT1" | |
141 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
142 NAME="AEN1640" |
0 | 143 ></A |
144 ><H2 | |
145 >Return Value</H2 | |
146 ><P | |
147 >Returns -1 on error (or if gamma adjustment is not supported).</P | |
148 ></DIV | |
149 ><DIV | |
150 CLASS="REFSECT1" | |
151 ><A | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
152 NAME="AEN1643" |
0 | 153 ></A |
154 ><H2 | |
155 >See Also</H2 | |
156 ><P | |
157 ><A | |
158 HREF="sdlsetgamma.html" | |
159 >SDL_SetGamma</A | |
160 > | |
161 <A | |
162 HREF="sdlgetgammaramp.html" | |
163 >SDL_GetGammaRamp</A | |
164 ></P | |
165 ></DIV | |
166 ><DIV | |
167 CLASS="NAVFOOTER" | |
168 ><HR | |
169 ALIGN="LEFT" | |
170 WIDTH="100%"><TABLE | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
171 SUMMARY="Footer navigation table" |
0 | 172 WIDTH="100%" |
173 BORDER="0" | |
174 CELLPADDING="0" | |
175 CELLSPACING="0" | |
176 ><TR | |
177 ><TD | |
178 WIDTH="33%" | |
179 ALIGN="left" | |
180 VALIGN="top" | |
181 ><A | |
182 HREF="sdlgetgammaramp.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
183 ACCESSKEY="P" |
0 | 184 >Prev</A |
185 ></TD | |
186 ><TD | |
187 WIDTH="34%" | |
188 ALIGN="center" | |
189 VALIGN="top" | |
190 ><A | |
191 HREF="index.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
192 ACCESSKEY="H" |
0 | 193 >Home</A |
194 ></TD | |
195 ><TD | |
196 WIDTH="33%" | |
197 ALIGN="right" | |
198 VALIGN="top" | |
199 ><A | |
200 HREF="sdlmaprgb.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
201 ACCESSKEY="N" |
0 | 202 >Next</A |
203 ></TD | |
204 ></TR | |
205 ><TR | |
206 ><TD | |
207 WIDTH="33%" | |
208 ALIGN="left" | |
209 VALIGN="top" | |
210 >SDL_GetGammaRamp</TD | |
211 ><TD | |
212 WIDTH="34%" | |
213 ALIGN="center" | |
214 VALIGN="top" | |
215 ><A | |
216 HREF="video.html" | |
803
355632dca928
Updated SDL HTML documentation
Sam Lantinga <slouken@libsdl.org>
parents:
181
diff
changeset
|
217 ACCESSKEY="U" |
0 | 218 >Up</A |
219 ></TD | |
220 ><TD | |
221 WIDTH="33%" | |
222 ALIGN="right" | |
223 VALIGN="top" | |
224 >SDL_MapRGB</TD | |
225 ></TR | |
226 ></TABLE | |
227 ></DIV | |
228 ></BODY | |
229 ></HTML | |
230 > |