Commit graph

2683 commits

Author SHA1 Message Date
Bob Pendleton
2011e3d29b Added a #ifndef SDL_NO_COMPAT around SDL_ActiveEvent and SDL_ResizeEvent so that code
that has a #defien SDL_NO_COMPAT before the #include SDL.h with not be able to use
these obsolete events.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403624
2009-06-05 23:36:00 +00:00
Mike Gorchak
3795d42a61 Best pixel formats with alpha search code has been added to function which converts surface to texture with enabled color keys. Now "testsprite2 --renderer opengl_es" works fine with all pixel formats with alpha. This affects other renderers too.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403623
2009-06-05 07:35:06 +00:00
Mike Gorchak
2ff2eb39e2 QNX quirk has been added, QNX OpenGL ES implementation is broken regarding support of textures with packed pixel formats.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403622
2009-06-05 07:30:51 +00:00
Bob Pendleton
de866fcecb Added an ifdef so that if you
#define SDL_NO_COMPAT

before you include SDL.h then SDL_compat.h will never be included in your code.
This is useful for making sure that your code uses only SDL 1.3 features.
It is also handy for finding things that are in SDL_compat.h that belong elsewhere.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403621
2009-06-04 21:00:45 +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
e526b61873 Von: Thomas Zimmermann
Betreff: [SDL] [PATCH] Make static variables const
Datum: Tue, 19 May 2009 19:45:37 +0200

Hi,

this is a set of simple changes which make some of SDL's internal static
arrays constant. The purpose is to shrink the number of write-able
static bytes and thus increase the number of memory pages shared between
SDL applications.

The patch set is against trunk@4513. Each of the attached patch files is
specific to a sub-system. The set is completed by a second mail, because
of the list's 40 KiB limit.

The files readelf-r4513.txt and readelf-const-patch.txt where made by
calling 'readelf -S libSDL.so'. They show the difference in ELF sections
without and with the patch. Some numbers measured on my x86-64:

Before

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000008170  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         00000000003045e0  001045e0
      00000000000023d0  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         00000000003076e0  001076e0
      0000000000004988  0000000000000000  WA       0     0     32

After

 [13] .rodata           PROGBITS         00000000000eaaa0  000eaaa0
      0000000000009a50  0000000000000000   A       0     0     32
 [19] .data.rel.ro      PROGBITS         0000000000306040  00106040
      0000000000002608  0000000000000000  WA       0     0     32
 [23] .data             PROGBITS         0000000000309360  00109360
      0000000000002e88  0000000000000000  WA       0     0     32

The size of the write-able data section decreased considerably. Some
entries became const-after-relocation, while most of its content went
straight into the read-only data section.

Best regards, Thomas

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403618
2009-06-03 04:37:27 +00:00
Sam Lantinga
3ef9fa9931 OpenPandora support added by David Carré
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403616
2009-05-31 11:53:12 +00:00
Sam Lantinga
1decfd1ab0 error message typo fix
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403614
2009-05-28 09:39:14 +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
Mike Gorchak
3071101f22 Few new video modes have been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403607
2009-05-15 15:47:37 +00:00
Mike Gorchak
ad8b9f8805 More checks for current GF state were added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403606
2009-05-14 11:51:42 +00:00
Mike Gorchak
9c65a7a51c Set audio device handle to NULL in case of open was not successful.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403605
2009-05-14 11:50:05 +00:00
Mike Gorchak
3fa79ac60b OpenGL ES renderer state fixes. Now GL_TEXTURE_2D is not enabled by default.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403604
2009-05-14 10:54:34 +00:00
Sam Lantinga
c03b673e2e Reminder to implement landscape mode for iPhone
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403603
2009-05-07 12:50:55 +00:00
Sam Lantinga
5bae799b91 Temporary workaround for building on 64-bit Mac OS X
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403601
2009-05-07 12:27:42 +00:00
Sam Lantinga
6c26794172 Fixed dynamic loading on Windows CE
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403600
2009-05-07 12:04:53 +00:00
Mike Gorchak
fed9a98f21 Added few OpenGL ES 1.0 defines, which are not present in OpenGL ES 1.1 and 2.0.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403598
2009-05-06 09:46:55 +00:00
Mike Gorchak
30a86a694d Added _OES suffix for GL_OES_vertex_buffer_object extension for OpenGL ES.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403597
2009-05-06 07:00:32 +00:00
Mike Gorchak
8c10b07962 Added support for single buffering, if double buffering is not available.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403596
2009-05-05 17:50:34 +00:00
Mike Gorchak
c2566086e3 Added handler for all window events.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403595
2009-05-05 17:47:41 +00:00
Mike Gorchak
59e09f9044 GF header must be included before Photon header for QNX.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403594
2009-04-28 06:04:21 +00:00
Mike Gorchak
260b9a9f92 Added hiddi library linkage when GF target is available for QNX
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403593
2009-04-28 04:46:05 +00:00
Mike Gorchak
820895189c New last cursor position must rely on the clamped coordinates.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403592
2009-04-28 04:43:21 +00:00
Mike Gorchak
d01b767241 Default video mode has been changed from 320x200 to 640x480, since fullscreen 320x200 is often unavailable.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403591
2009-04-28 04:41:25 +00:00
Mike Gorchak
cd61a12a39 Added OpenGL ES context creation for the each window which has been created (for --windows=N option).
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403590
2009-04-28 04:38:51 +00:00
Mike Gorchak
cf3c16b210 Support for HID devices (mice and keyboards only for now) has been added
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403589
2009-04-28 04:33:30 +00:00
Mike Gorchak
79abe77b26 Continue working on QNX Photon with OpenGL ES support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403588
2009-04-28 04:30:52 +00:00
Mike Gorchak
173f682e1e Update README for QNX 6.x
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403583
2009-04-24 03:46:54 +00:00
Sam Lantinga
24a17de88c Added a reminder for the jobs mailing list
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403582
2009-04-13 09:33:55 +00:00
Sam Lantinga
d7b72e290b Fixed bug #721
From  michalziulek@gmail.com   2009-03-28 07:43:34   (-) [reply]

There is a bug in OpenGL 3.x context creation code.
Function glXGetProcAddress is used directly where it should be:
_this->gl_data->glXGetProcAddress. I have attached patch which fixes this on
x11 and win32. Thanks.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403575
2009-04-03 17:19:05 +00:00
Sam Lantinga
ce21b3731c Fixed undefined references to joystick code
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403574
2009-04-03 13:35:05 +00:00
Sam Lantinga
107632a278 Added SDL_GetColorKey()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403573
2009-04-03 13:27:33 +00:00
Sam Lantinga
e62d2f485e Oops
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403569
2009-03-28 06:00:42 +00:00
Sam Lantinga
29be1b210a Added credits for OpenGL 3.0 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403568
2009-03-24 10:46:18 +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
fd618abec1 Date: Mon, 23 Mar 2009 09:17:24 +0200
From: "Mike Gorchak"
Subject: New QNX patches

Please apply patch qnx4.diff, which is attached. What has been done:
1)Added back OpenGL ES renderer for QNX target. Added few corrections to
OpenGL ES renderer to let it work under QNX. OpenGL ES renderer do not
support textures under QNX, so I think some additional work must be done.
2) Added GL_OES_query_matrix extension to SDL_opengles.h header file, which
required by OpenGL ES 1.1 specification.
3) Added attribute clearing at the entrance of function
SDL_GL_GetAttribure(). Added error checking into the function
SDL_GL_GetAttribure(), because some attributes can't be obtained in OpenGL
ES 1.0.
4) Porting testdyngles to OpenGL ES 1.0 (1.1 has glColor4ub() and
glColor4f() functions, but 1.0 has glColor4f() only).
5) Added error checking after obtaining attributes using
SDL_GL_GetAttribute() function to the testgl2 and testgles.
6) Small correction to testmultiaudio with printing errors.
7) Added software and accelerated OpenGL ES 1.0 support into the QNX GF
driver.

Please remove ./src/audio/nto directory - it will not be used anymore.
Please create ./src/audio/qsa directory and add content of the archive
qsa.tar.gz into this directory. I rewrote some sound code, added support for
multiple audio cards, enumeration, etc. Added initial support for capture.

As far as I can understand SDL 1.3 is not supporting audio capture right now
? Sam, Am I right ? Or audio capture must be supported through the
PlayDevice routine ?

And last, please put file SDL_gf_opengles.c to  the ./src/video/qnxgf
directory. It is OpenGL ES 1.1 emulation layer for some functions, which are
not supported by OpenGL ES 1.0.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403566
2009-03-24 10:33:12 +00:00
Sam Lantinga
0543b444ac Date: Thu, 05 Feb 2009 17:27:54 +0100
From: Stefan Klug
Subject: [SDL] SDL_SetVideoMode compatibility fix

SDL_SetVideoMode(0,0,0,flags) used to be valid in SDL 1.2
Attached is a patch to replicate this behaviour in SDL 1.3

Cheers Stefan

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403565
2009-03-23 05:37:45 +00:00
Sam Lantinga
d2d2e1c376 Date: Thu, 05 Feb 2009 18:07:35 +0100
From: Stefan Klug
Subject: [SDL] SDL 1.3 WinCE backend

as promised, I've started to work on the WinCE backend of SDL 1.3
I've modified the win32 video backend and the gdi renderer, to work
properly in WinCE.
The results till now are great, but there is still some work to do.

Attached are two patches with my changes.
I would be happy if someone could review and propably commit them.

The first one (configure.in.patch) should be straight forward without
any side effects.

The second one does the necessary changes to the win32 backend. I was
really unhappy to start slicing this shiny new backend with
#ifdef/#endif but I saw no other option.

The most problematic issues are:
- WinCe has no GetDIBits, so its practically impossible to fill a
BITMAPINFO with correct values. I therefore removed the bmi member from
the GDI_RenderData in SDL_gdirender.c to prevent usage of a not or not
properly initialized  bmi.
- In SDL_win32window.c I exchanged some ASCII function by their general
counterparts, (In CE only the Unicode versions are available). I don't
know if this has a negative effect when running in win32


Cheers
Stefan

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403564
2009-03-23 05:35:21 +00:00
Sam Lantinga
e403bb296f Date: Tue, 17 Feb 2009 14:00:25 +0100
From: Stefan Klug
Subject: [SDL] Possible bug, paused audio playing garbage

On my WinCE device a paused audio device plays random garbage.
This might also be the issue in the thread "sound cracks with SDL_mixer
and AUDIO_S16LSB"

I don't have that much knowledge of the SDL audio part, but the attached
patch fixes it for me, and collapses two redundant ifs.

I'm not sure if this is the correct way to fix this.
Shouldn't the complete stream conversion part of the RunAudio loop be
dependent on the paused property of the device? (not only the call to
(*fill)(udata, istream, istream_len).

Anyways. Would be great if the patch or a fix could find its way to SVN ;-)

Cheers
Stefan

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403563
2009-03-23 05:21:40 +00:00
Sam Lantinga
2bacdee082 Date: Sat, 21 Mar 2009 19:41:52 -0700 (PDT)
From: Mason Wheeler
Subject: [SDL] Critical SDL 1.3 patch

Displaying a window created with SDL_CreateWindowFrom was causing stack overf
lows for me under certain conditions.  After far too much work trying to get
Visual Studio's debugger to play nice with a program written in Delphi, I tra
cked it down to a nasty reentrancy cycle in the WndProc handling.  Here's a p
atch that fixes the problem

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403562
2009-03-23 02:02:30 +00:00
Sam Lantinga
a01cdb4253 Fixed potential crash in testbitmap
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403561
2009-03-22 06:56:37 +00:00
Sam Lantinga
7a8aae678e Fixed iPhone demos
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403559
2009-03-17 03:56:21 +00:00
Sam Lantinga
4d78fdcef7 Date: Thu, 12 Mar 2009 15:14:38 +0200
From: "Mike Gorchak"
Subject: New QNX patches

In photon.tar.gz there are new files to be placed into ./src/video/photon/
directory.

qnx3.diff - new patches for QNX support. Since I've found a lot of bugs in
the new GF QNX Graphics Framework and I'm suspended development for GF
driver until already found bugs will be fixed and switched to Photon driver
implementation.

sdl.diff - I've found that renderer creation result has not been checked and
SDL shows error like: "there is no current renderer", now SDL will show
correct error which was set be renderer.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403558
2009-03-17 03:24:22 +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
98c33d2db1 Fixed OpenGL library linking issue
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403556
2009-03-12 03:51:39 +00:00
Sam Lantinga
17406a3e50 Fixed potential double-free crash
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403555
2009-03-06 05:53:33 +00:00
Sam Lantinga
2bed25d87c Reverted dangerous change that could remove /bin/sh :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403554
2009-03-06 05:48:52 +00:00
Sam Lantinga
ba4c542eeb Date: Wed, 4 Mar 2009 15:38:22 +0200
From: "Mike Gorchak"
Subject: Re: About QNX support in SDL 1.3

Here is another batch of patches.

1) Makefile.in - added SDL_opengles.h header as header to install.
2) configure.in - Added special define to detect Common Lite OpenGL ES
library in case if Common library is not installed. Added check for
clock_gettime in libc (in QNX it is in libc).
3) SDL_config.h.in - Added SDL_VIDEO_RENDER_OPENGL_ES and
SDL_VIDEO_OPENGL_ES declarations for configure script autodetection.
4) SDL_opengles.h - Added GL_API definition if it is not defined. Added
extension GL_OES_draw_texture because OpenGL ES Renderer uses it without
declaration. Added GL_OES_vertex_buffer_object extension, which is supported
under QNX OpenGL ES. Added GL_OES_single_precision extension.
5) To the test directory I've added building OpenGL ES test applications
through the autotools suite. Was support for iPhone IDE building only.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403553
2009-03-04 15:10:47 +00:00
Sam Lantinga
7c0777a910 Updated config.guess and config.sub
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403552
2009-03-04 09:35:32 +00:00
Sam Lantinga
dc650bdd28 Updated libtool from version 1.5.22 to 2.2.6a, so it works on current QNX
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403551
2009-03-04 08:57:30 +00:00