Commit graph

125 commits

Author SHA1 Message Date
Sam Lantinga
b62273437c Clarified SDL_GetWindowSurface() documentation
Matthew Orlando to Sam

Someone asked in IRC whether they should free the surface from SDL_GetWindowSurface. The doc comment is a bit vague so i checked the code and revised the comment.
2011-04-22 09:06:29 -07:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
7472736e2d Fixed related function documentation 2011-03-22 10:48:33 -07:00
Sam Lantinga
7dd0385c57 Gamma support is back!
New API functions:
	SDL_SetWindowBrightness()
	SDL_GetWindowBrightness()
	SDL_SetWindowGammaRamp()
	SDL_GetWindowGammaRamp()
	SDL_CalculateGammaRamp()
2011-03-11 08:49:20 -08:00
Sam Lantinga
ade868c17f Use boolean value for input grab mode, like we do for fullscreen mode. 2011-02-27 20:06:45 -08:00
Sam Lantinga
f8481050cd Simplified and unified the window creation process a little. 2011-02-21 22:03:39 -08:00
Sam Lantinga
c804b92b9e Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Sam Lantinga
93ab733085 Fixed bug #1117
There's a new event that's always sent when the window changes size, and that event is what the renderers listen for to determine if they need to rebind their context.
2011-02-12 19:02:14 -08:00
Sam Lantinga
52df6c6092 changeset: 5272:cb08ef104ac4
tag: tip
user: Martin Decky <martin@decky.cz>
date: Sat Feb 12 20:53:06 2011 +0100
summary: improve header files compatibility with SDL 1.2 applications (namely QEMU)
2011-02-12 12:04:00 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
018af55e16 Window coordinates are in the global space and windows are not tied to a particular display.
Also added Ctrl-Enter keybinding to the test code to toggle fullscreen mode for testing.
2011-02-10 14:44:25 -08:00
Sam Lantinga
e9689c29d5 Be explicit about what display you're querying. The default display is 0. 2011-02-10 12:14:37 -08:00
Sam Lantinga
e0f869b698 Removed gamma support since it wasn't widely used and not well supported. 2011-02-10 11:39:08 -08:00
Sam Lantinga
052351dbe2 Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
The software renderer has been re-routed to use the framebuffer interface, which makes it possible to have software rendering available even on simple ports.
2011-02-03 15:49:37 -08:00
Sam Lantinga
657d4fd190 Extended SDL_SetWindowData() to allow arbitrary named values. 2011-02-03 11:16:57 -08:00
Sam Lantinga
5897ef7d95 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
--HG--
rename : src/video/windows/SDL_d3drender.c => src/render/direct3d/SDL_d3drender.c
rename : src/video/SDL_renderer_gl.c => src/render/opengl/SDL_renderer_gl.c
rename : src/video/SDL_renderer_gles.c => src/render/opengles/SDL_renderer_gles.c
rename : src/video/SDL_renderer_sw.c => src/render/software/SDL_renderer_sw.c
2011-02-02 14:34:54 -08:00
Sam Lantinga
09a8558897 Making the API simpler, removed support for palettized video modes and textures. 2011-02-01 21:23:43 -08:00
Sam Lantinga
b231d0b93d Split the rendering API out into a separate header file. 2011-02-01 15:02:21 -08:00
Sam Lantinga
32406a59c6 Renumbered the renderer flags 2011-02-01 12:44:52 -08:00
Sam Lantinga
d627939049 Making the API simpler, the renderer present semantics are always having a backbuffer and then discarding it. This is best for hardware accelerated rendering.
--HG--
extra : rebase_source : bbe6641fce097c79ccd47f4e1ea6b27683fd0acb
2011-02-01 12:19:46 -08:00
Sam Lantinga
4c06e58153 Making the API simpler, texture color and alpha modulation are supported by all renderers.
--HG--
extra : rebase_source : 880752438aae8f6526503d220bad91aabc3a7d1c
2011-01-31 23:37:30 -08:00
Sam Lantinga
825e1da54d Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
--HG--
extra : rebase_source : f06ea01caa64c8ad14170c723e5af52dad64d779
2011-01-31 23:23:57 -08:00
Sam Lantinga
df1f384c5b Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
--HG--
extra : rebase_source : 4edac7fd162a2eb37a50159b958db37a03e944a5
2011-01-31 22:44:43 -08:00
Sam Lantinga
c3daf0f0cd Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)
2011-01-27 22:44:08 -08:00
Sam Lantinga
a8c8dc3e09 Updated headers to match wiki documentation 2011-01-12 09:47:33 -08:00
Sam Lantinga
35cc558917 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Sam Lantinga
200c3c74ab Fixed grammar, thanks to Sheena's suggestion. 2010-09-18 17:12:19 -07:00
Sam Lantinga
458c6eda30 Fixed documentation 2010-09-14 21:57:29 -07:00
Sam Lantinga
b7c57f809f Documentation consistency 2010-08-29 22:34:50 -07:00
Sam Lantinga
5ba14426fa Documentation consistency 2010-08-29 22:28:38 -07:00
Sam Lantinga
2ef894f75e Fixed typo in header 2010-08-29 22:22:27 -07:00
Sam Lantinga
1877442eb2 Documentation clarification 2010-08-29 22:12:59 -07:00
Sam Lantinga
f56e6b9244 Suspending the screensaver defaults off. 2010-08-29 21:41:11 -07:00
Sam Lantinga
fa8d01e8ab Documentation clarification 2010-08-29 15:26:12 -07:00
Sam Lantinga
d8e7cebd11 Merged Sunny's XRender changes from SDL-gsoc2010_xrender 2010-07-28 00:54:23 -07:00
Sunny Sachanandani
f517fdfa39 Advertise support for all supported texture formats. 2010-07-22 10:53:41 +05:30
Sam Lantinga
338f95eb06 Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
2010-05-09 20:47:22 -07:00
Sam Lantinga
4d3df8b3e3 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404453
2010-01-24 21:10:53 +00:00
Sam Lantinga
ca30a739a8 Documentation consistency
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404444
2010-01-22 06:50:17 +00:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Sam Lantinga
de14fdf2e4 Fixed compiler warning
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404430
2010-01-18 14:16:47 +00:00
Sam Lantinga
b9702243c7 Removed in the interest of actually finishing 1.3. :)
They can be done later, either by me or by someone else.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404353
2009-12-30 19:10:41 +00:00
Sam Lantinga
6da163ab81 Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine().
Added API for rectangle drawing (as opposed to filling)
Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay.
Optimized software line drawing quite a bit.
Added support for Wu's anti-aliased line drawing, currently disabled by default.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404346
2009-12-23 01:55:00 +00:00
Sam Lantinga
8ee9720297 Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
    SDL_BlendPoints()
    SDL_BlendLines()
    SDL_DrawLines()
    SDL_FillRects()
    SDL_BlendRects()
    SDL_RenderPoints()
    SDL_RenderLines()
    SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404279
2009-12-09 15:56:56 +00:00
Sam Lantinga
52f2433c29 Added an API function to query geometry of multiple monitors:
SDL_GetDisplayBounds()

Implemented multi-monitor window positions on Windows

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404271
2009-12-06 08:03:38 +00:00
Sam Lantinga
e7a9fc5a82 Made the window flag comments more consistent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404266
2009-12-05 05:13:17 +00:00
Sam Lantinga
1f1d8b4e67 Added related functions
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404265
2009-12-05 04:39:59 +00:00
Sam Lantinga
1cd715e9db Work in progress on multi-display support:
* Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one.
* The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height.  It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404241
2009-12-01 05:57:15 +00:00
Sam Lantinga
88a5324d0d SDL_CreateWindowFrom() is actually going to be supported. :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404234
2009-11-25 07:42:23 +00:00
Sam Lantinga
3dba28911a Clarified the windowID parameter
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404233
2009-11-25 06:24:15 +00:00