Commit graph

200 commits

Author SHA1 Message Date
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
Sam Lantinga
0f620b7fe4 You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
This code still doesn't quite work yet. :)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404174
2009-11-16 07:13:07 +00:00
Sam Lantinga
1cbfd5b6e0 Partial fix for bug #859
Header file update from Ken for improved doxygen output

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404127
2009-10-19 13:31:58 +00:00
Sam Lantinga
f2ae715bf4 iPhone interruption patch / SDL 1.3
Eric Wing to Sam

I've been sitting on this too long. I need to push.
It's untested because of the unrelated crashing bug I've been experiencing.
Also have a fix for SIZEOF_VOIDP in the config for both iPhone and Mac.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404102
2009-10-17 07:36:45 +00:00
Sam Lantinga
5b2bf45c12 Clarified API documentation
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403728
2009-08-02 18:39:57 +00:00
Sam Lantinga
29167b5730 Documentation fix fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403692
2009-07-07 14:02:57 +00:00
Bob Pendleton
5d3a5aa3bd Documentation fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403688
2009-07-06 21:48:52 +00:00
Bob Pendleton
29a81c8167 Another documentation fix, Thanks to Mason Wheeler for finding these.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403686
2009-07-02 16:53:56 +00:00
Bob Pendleton
8625a0991d Documentation fix.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403685
2009-07-02 16:15:55 +00:00
Bob Pendleton
58ee3a8b76 Corrected documentation error for SDL_RenderFill.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403678
2009-06-30 22:19:10 +00:00
Sam Lantinga
483f2ba3fb indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403608
2009-05-23 22:41:08 +00:00
Sam Lantinga
ba096ad053 Date: Sun, 22 Mar 2009 12:52:29 +0000
From: Luke Benstead
Subject: OpenGL 3.0 Context Creation

I've attached a patch which implements OpenGL 3.x context creation on
the latest SVN. I've added two options to SDL_GL_SetAttribute, these
are SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION.
These default to 2 and 1 respectively. If the major version is less
than 3 then the current context creation method is used, otherwise the
appropriate new context creation function is called (depending on the
platform).

Sample code:

    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        printf("Unable to initialize SDL: %s\n", SDL_GetError());
        return 1;
    }

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3); //Without these 2 lines, SDL will create a GL 2.x context
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

    SDL_Surface* screen = SDL_SetVideoMode( 640, 480, 16, SDL_OPENGL | SDL_FULLSCREEN );


I've implemented context creation on both Win32 and X and run basic
tests on both. This patch doesn't provide access to all the options
allowed by the new context creation (e.g. shared contexts, forward
compatible contexts) but they can be added pretty easily.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403567
2009-03-24 10:43:53 +00:00
Sam Lantinga
65fa34140f Fixed return value for SDL_CreateRenderer()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403557
2009-03-15 15:50:18 +00:00
Sam Lantinga
2aab251e38 Added test program for SDL_CreateWindowFrom()
Make sure OpenGL library is loaded before working with OpenGL windows,
even those created with SDL_CreateWindowFrom()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403521
2009-02-09 05:32:12 +00:00
Couriersud
aa47998f53 Fix third party "-Wall -Werror" builds
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403495
2009-01-12 22:36:12 +00:00
Sam Lantinga
4ca3bd3da1 Added an API to enable/disable the screen saver.
The screensaver is disabled by default when using SDL 1.2 compatibility.
Use the new XScreenSaver extension, removed unused DPMS extension.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403487
2009-01-12 06:19:05 +00:00
Sam Lantinga
1b9b40835c indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403452
2009-01-04 17:14:27 +00:00
Sam Lantinga
fea6781d86 Implemented SDL_SetWindowIcon(), with translucent icon support under X11.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403429
2009-01-02 17:39:48 +00:00
Sam Lantinga
382a1fe6c7 The _NET_WM_ICON protocol doesn't require the icon to be set before the window is shown.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403423
2009-01-02 09:50:25 +00:00
Sam Lantinga
01a9edc33a typo fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403369
2008-12-22 05:29:55 +00:00
Sam Lantinga
f055f6a189 Added RenderPiont() API
Merged the drawing tests into a single test program

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403363
2008-12-21 17:39:41 +00:00
Sam Lantinga
d29d0c965f Minor corrections
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403348
2008-12-20 12:32:38 +00:00
Sam Lantinga
9ba7210778 Date: Fri, 19 Dec 2008 20:17:35 +0100
From: Couriersud
Subject: Re: Aw: Experience using SDL1.3 in sdlmame/Proposal for api additions

> For consistency you'd probably want:
> SDL_SetRenderDrawColor(Uint8 r, Uint8 g, Uint8 b, Uint8 a);
> SDL_SetRenderDrawBlendMode(SDL_BlendMode blendMode);
> SDL_RenderLine(int x1, int y1, int x2, int y2);
> SDL_RenderFill(SDL_Rect *rect);
>
> You probably also want to add API functions query the current state.
>

I have implemented the above api for the opengl, x11, directfb and
software renderers. I have also renamed *TEXTUREBLENDMODE* constants to
BLENDMODE*. The unix build compiles. The windows renderer still needs to
be updated, but I have no windows development machine at hand. Have a
look at the x11 renderer for a sample.

Vector games now run at 90% both on opengl and directfb in comparison to
sdlmame's own opengl renderer. The same applies to raster games.

The diff also includes

a) Changed XDrawRect to XFillRect in x11 renderer
b) A number of changes to fix blending and modulation issues in the
directfb renderer.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403346
2008-12-20 12:00:00 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Holmes Futrell
1051156e2b Added SDL_GL_RETAINED_BACKING attribute to SDL_GLattr
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403200
2008-09-02 20:27:47 +00:00
Sam Lantinga
68d2b55278 Split out the SDL_rect and SDL_surface functions into their own headers.
Removed unused count from the dirty rect list.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402639
2007-09-10 12:20:02 +00:00