Commit graph

47 commits

Author SHA1 Message Date
Sam Lantinga
5095592ce5 A few fixes:
Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
2011-02-13 13:46:10 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -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
e27077bfaf The format detection code works better with 555 and 565 pixel formats 2011-02-04 16:55:50 -08:00
Sam Lantinga
067058ff3a Support the new 16-bit formats in SDL_MasksToPixelFormatEnum() 2011-01-12 15:21:12 -08:00
Sam Lantinga
fdea37a756 Added some missing pixel formats and SDL_GetPixelFormatName() 2011-01-12 14:53:23 -08: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
87672bbcfa Fixed bug #912
SDL_MasksToPixelFormatEnum() wasn't correctly returning RGB24 formats

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404347
2009-12-23 06:39:18 +00:00
Sam Lantinga
9ea9c7518d Added support for SDL_PIXELFORMAT_RGB24 and SDL_PIXELFORMAT_BGR24 to SDL_PixelFormatEnumToMasks()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404305
2009-12-14 06:35:27 +00:00
Sam Lantinga
21611bcf67 The SDL_PaletteWatch structure is really internal-only.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404303
2009-12-13 08:00:25 +00:00
Sam Lantinga
45a366faf7 Set the error so someone can get more information
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404225
2009-11-22 20:53:53 +00:00
Sam Lantinga
4309e3326a Fixed compatibility with SDL 1.2 pixel format (24 bits per pixel of color data with 4 bytes per pixel == 32 bpp)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403834
2009-09-20 22:47:28 +00:00
Mike Gorchak
66dca33f37 Support for 24 bpp pixel formats has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403640
2009-06-10 05:51:44 +00:00
Mike Gorchak
f2f1af2732 Support for BGR565 pixel format has been added, mainly for OpenGL ES renderer. OpenGL ES renderer now have new texture formats.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403619
2009-06-03 10:40:44 +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
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
ede44c4b85 Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403188
2008-08-27 15:10:03 +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
Sam Lantinga
cf548d0a6b Okay, still some bugs, but everything builds again...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402629
2007-08-18 05:39:09 +00:00
Sam Lantinga
4d9ae37508 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402622
2007-08-17 02:55:21 +00:00
Sam Lantinga
79f25b0b9e Moved the colorkey and per-surface alpha into the blit info,
in preparation for support for general color channel modulation.

Removed and consolidated some data in the blit info.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402619
2007-08-17 00:54:53 +00:00
Sam Lantinga
554147b6c7 make indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402345
2007-06-14 13:21:29 +00:00
Ryan C. Gordon
dfd9387039 Merged r3007:3008 from branches/SDL-1.2: MapRGB/MapRGBA const correctness.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402299
2007-04-04 09:43:53 +00:00
Sam Lantinga
bfe4f31c0e SDL constants are all uppercase.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402012
2006-08-05 17:09:42 +00:00
Sam Lantinga
2fe561616a Convert SDL_malloc to SDL_calloc if appropriate, slightly faster on operating systems which map the zero page for memory allocations.
OpenGL renderer in progress

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401965
2006-07-22 08:33:18 +00:00
Sam Lantinga
0f030a1802 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401938
2006-07-10 21:04:37 +00:00
Sam Lantinga
ed659a7d15 Fixed bug #90
The palette -> RGBA blit wasn't following the rule:
 * RGB->RGBA:
 *     SDL_SRCALPHA not set:
 *      copy RGB, set destination alpha to source per-surface alpha value.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401561
2006-03-20 06:37:58 +00:00
Sam Lantinga
c36118165e Use consistent identifiers for the various platforms we support.
Make sure every source file includes SDL_config.h, so the proper system
headers are chosen.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401406
2006-02-21 08:46:50 +00:00
Sam Lantinga
684909fae2 More header massaging... works great on Windows. ;-)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401362
2006-02-10 06:48:43 +00:00
Sam Lantinga
09cd73f1b5 Removed uses of stdlib.h and string.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401342
2006-02-07 09:29:18 +00:00
Sam Lantinga
5d53175e4d Use SDL_ prefixed versions of C library functions.
FIXME:
Change #include <stdlib.h> to #include "SDL_stdlib.h"
Change #include <string.h> to #include "SDL_string.h"
Make sure nothing else broke because of this...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401340
2006-02-07 06:59:48 +00:00
Sam Lantinga
6c3f928cd8 It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401334
2006-02-06 08:28:51 +00:00
Sam Lantinga
eea4857268 Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401315
2006-02-01 06:32:25 +00:00
Sam Lantinga
86cb73f365 Date: Mon, 02 May 2005 04:23:16 -0500
From: Jonathan Atkins
Subject: Re: [PATCH] *CRITICAL* 8bit direct RGB palette not being created

I think that SDL_AllocFormat should create the palette for all 8bit
surfaces.  And when the RGBAmasks match the normal 3:3:2:0 we need to
apply the old behavior.  If the mask doesn't match that, then we need
to make the right palette assuming the masks are valid (I don't think
we validate any masks for high color surfaces...so we wouldn't here)
Then there's always a palette available for the 8bit surfaces.
This restores the normal behavior and allows for masks to create
palettes automatically for odd masks even, which would be a neato
thing to have in there, as SDL never did this before.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401058
2005-05-16 05:34:58 +00:00
Sam Lantinga
74c5533520 Clarified the code in the pixel format allocation
Added support for direct color 8-bpp modes.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401028
2005-01-12 19:38:24 +00:00
Sam Lantinga
ca383efa22 Date: Sat, 27 Nov 2004 13:35:43 +0100
From: "Martin Bickel"
Subject: [SDL] Patch: fixing uninitilized palette

while running Valgrind over my application I found the following
problem in SDL:

The function MapNto1 allocates  SDL_Color colors[256]  but does not
initialize it.
SDL_DitherColors is then called which initialized the r, g and b
component, but not the 'unused' component of each color.
When Map1to1 is called from MapNto1, it runs a memcmp on the colors,
which also evaluates the unused component and therefor returns
differences much more often than necessary.

So the 'unused' component of SDL_Color should be initialized. This
patch does this by calling memset for the whole array in MapNto1 .

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40998
2004-11-30 14:28:20 +00:00
Sam Lantinga
54478fc8ca Fixed a bug in detecting surface mapping changes
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40846
2004-02-19 21:13:24 +00:00
Sam Lantinga
cb9c2efd17 Updated copyright information for 2004 (Happy New Year!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40770
2004-01-04 16:49:27 +00:00
Sam Lantinga
f32aece36b Whitespace
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40696
2003-08-27 04:53:40 +00:00
Sam Lantinga
d8ae01f168 Date: Tue, 12 Aug 2003 14:26:19 +0200 (MEST)
From: "Mattias Engdeg?rd"
Subject: bug in SDL_GetRGB/GetRGBA

There's an embarrassing bug in GetRGB/GetRGBA which apparently has been there
for years. It incorrectly converts colours with < 8 bits/channel.
It came to my attention today in #sdl.

What it does now is (for each channel):

  rv = (pixel & fmt->Rmask) >> fmt->Rshift;
  *r = (rv << fmt->Rloss) + (rv >> (8 - fmt->Rloss));

which is wrong; the last line should be

  *r = (rv << fmt->Rloss) + (rv >> (8 - (fmt->Rloss << 1)));

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40689
2003-08-12 15:17:20 +00:00
Sam Lantinga
7705734fbc *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40629
2003-05-29 04:29:13 +00:00
Sam Lantinga
ea5d630479 Updated copyright information for 2002
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40298
2002-03-06 11:23:08 +00:00
Sam Lantinga
3ceea60069 Updated the source with the correct e-mail address
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40253
2001-12-14 12:38:15 +00:00
Sam Lantinga
a4fc83d5fc Oops, back it out...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4051
2001-06-07 15:04:04 +00:00
Sam Lantinga
4c41ee7dc2 Mattias' patch
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4049
2001-06-07 14:53:18 +00:00
Sam Lantinga
2f110628a7 Initial revision
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401
2001-04-26 16:45:43 +00:00