Commit graph

429 commits

Author SHA1 Message Date
Sam Lantinga
d4f133c2bf Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403823
2009-09-19 13:29:40 +00:00
Sam Lantinga
948c701041 Removed outdated VGL support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403817
2009-09-19 07:30:29 +00:00
Sam Lantinga
5e78005b86 Removed outdated wscons support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403816
2009-09-19 07:28:59 +00:00
Sam Lantinga
b02edf2009 Removed outdated Nano-X support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403815
2009-09-19 07:26:51 +00:00
Sam Lantinga
351e3d48d9 Removed outdated OS/2 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403814
2009-09-19 07:22:07 +00:00
Sam Lantinga
232c747269 Removed outdated Dreamcast support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403813
2009-09-19 07:21:22 +00:00
Sam Lantinga
76d2bc3e7f Removed outdated OS/2 support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403810
2009-09-19 06:43:45 +00:00
Sam Lantinga
303667b4b7 Removed outdated iPodLinux support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403809
2009-09-19 06:24:07 +00:00
Bob Pendleton
11921a8b7d The new, cleaner, version of the atomic operations. The dummy code is what you should start working with to port atomic ops.
The linux code appears to be complete and *should* be the base of all Unix and GCC based versions. The macosx and win32 versions
are currently just copies of the dummy code. I will begin working on the windows version as soon as this check in is done. I
need someone to work on the Mac OS X version.

I'm afraid that this check in will break QNX (Sorry!)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403802
2009-09-17 20:35:12 +00:00
Sam Lantinga
700b3bb677 Merged Martin's code changes from Google Summer of Code 2009
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403787
2009-09-07 04:51:29 +00:00
Sam Lantinga
d036689ab0 Fixed issues building 64-bit Windows binary
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403783
2009-09-05 23:37:35 +00:00
Sam Lantinga
633d710201 CD-ROM support is so passé :)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403773
2009-09-05 09:11:03 +00:00
Sam Lantinga
8c260f6e84 Bye bye SoundManager, you are officially obsolete...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403772
2009-09-05 09:03:35 +00:00
Sam Lantinga
063b24f5a2 Fixed a few issues compiling with Mac OS X 10.6
Unfortunately the audio and cdrom systems do not build at all, and if you
disable those, SDL still fails to link with these errors:

Undefined symbols:
  "_OBJC_IVAR_$_NSScreen._frame", referenced from:
      -[NSScreen(NSScreenAccess) setFrame:] in SDL_cocoamodes.o
  "_KLGetKeyboardLayoutProperty", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
      _UpdateKeymap in SDL_cocoakeyboard.o
  "_KLGetCurrentKeyboardLayout", referenced from:
      _UpdateKeymap in SDL_cocoakeyboard.o
ld: symbol(s) not found

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403771
2009-09-05 07:33:54 +00:00
Sam Lantinga
824f06e60b Updated glext.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403770
2009-09-05 07:13:01 +00:00
Bob Pendleton
96e3a0d5c7 Start of redesign, getting rid of 8 and 16 bit operations in .h and test files.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403763
2009-08-11 21:27:19 +00:00
Sam Lantinga
f558ab804b Fixed bug #746
Fixed freeze when trying to memset with 0 length

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403756
2009-08-07 10:20:10 +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
51273d8424 Better check which includes #define used in stdint.h
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403718
2009-08-02 12:54:59 +00:00
Sam Lantinga
72e444bb08 Don't redefine types if HAVE_STDINT_H is defined
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403717
2009-08-02 12:45:20 +00:00
Bob Pendleton
66de021c3d volitile... duh, yeah the variable need to be labeled volitile
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403698
2009-07-09 21:31:27 +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
Bob Pendleton
dad8f05067 I've made so many changes I don't dare continue until I check the current stuff in.
/test/testatomic.c performs absolutely basic tests to show that the function work as expected. Need a second test to do more detailed tests.

/include/SDL_atomic.h provides declarations for all included functions.

/src/atomic/linux/SDL_atomic.c provided all the functions. On a generic built the 64 bit functions work, but they are emulated. On a build for -march=pentium and above the 64 bit functions use native instructions
/src/atomic/dummy/SDL_atomic.c emulates all the operations using SDL_mutex.h.
/src/atomic/win32/SDL_atomic.c is a copy of dummy
/src/atomic/macosx/SDL_atomic.s is a copy of dummy

These versions of SDL_atomic.c provide a frame work for building the library with a mixture of native and emulated functions. This allows the whole library to be provided on all platforms. (I hope.)
I hope this fits with the SDL philosophy of either providing a common subset or emulating when the platform is missing a feature.

I have not added dummy, macosx, or win32 to the build. They are there as place holders for future work.

I have modified congifure.in to compile sources in /src/atomic/linux. (The SDL configure.in file is an amazing piece of work and I hope I didn't mess it up. :-)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403671
2009-06-29 19:54:43 +00:00
Bob Pendleton
386dceedb4 This check in updates SDL_atomic.h to reflect the new set of atomic operations in 32 and 64 bit form.
It also update configure.in to compile the linux version of the library. The three versions are all dummies
implementations that do nothing. They are being checked in as place holders. Mostly, I just wanted to get
place holders and the configure.in checked in.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403667
2009-06-24 20:04:08 +00:00
Sam Lantinga
17db454b5c Fixed bug #750
Since many different event structures include windowID it should be placed near
the beginning of the structure (preferably right after type) so it's position
is the same between different events.

This is to avoid code like this:
if (event.type == SDL_WINDOWEVENT)
    win = event.window.windowID;
else if ((SDL_EVENTMASK(event.type) & SDL_KEYEVENTMASK) != 0)
    win = event.key.windowID;
else if (event.type == SDL_TEXTINPUT)
    win = event.text.windowID;
else if (event.type == SDL_MOUSEMOTION)
    win = event.motion.windowID;
else if ((SDL_EVENTMASK(event.type) & (SDL_MOUBUTTONDOWNMASK |
SDL_MOUBUTTONUPMASK)) != 0)
    win = event.button.windowID;
else if (event.type == SDL_MOUSEWHEEL)
    win = event.wheel.windowID;
...

in favor of:
win = event.window.windowID;

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403650
2009-06-10 14:00:21 +00:00
Sam Lantinga
63be31556a Added missing header file for Pandora support
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403648
2009-06-10 13:53:53 +00:00
Sam Lantinga
388df73e0d indent is really bad at handling assembly
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403646
2009-06-10 13:38:19 +00:00
Sam Lantinga
d03a7700eb indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403645
2009-06-10 13:34:20 +00:00
Bob Pendleton
5424dfae24 OK, had to add some casts to get SDL_atomic.h to compile with C++. testatomic still compiles and runs.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403639
2009-06-09 19:39:23 +00:00
Bob Pendleton
d813a7eac5 First commit for SDL atomic operations.
On my linux box it compiles and installs correctly and testatomic runs without errors.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403638
2009-06-09 17:33:44 +00:00
Sam Lantinga
b280ab9e6c Fixed 4 bit-per-pixel definition. Thanks Mike!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403635
2009-06-09 04:34:50 +00:00
Ryan C. Gordon
2af9ddbafd BeOS support for power subsystem.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403631
2009-06-07 22:44:59 +00:00
Ryan C. Gordon
a5b5f691d9 Initial work on power subsystem for SDL 1.3.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403628
2009-06-07 06:06:35 +00:00
Sam Lantinga
f64089822e Hi,
I have prepared a set of patches to readd WindowsCE support to SDL 1.3.
I've created a new GAPI/Rawframebuffer and a DirectDraw renderer.
Both renderers are work in progress and there are several unimplemented
cases. (Notably
RenderLine/RenderPoint/RenderFill/QueryTexturePixels/UpdateTexture and
texture blending )
Nevertheless I am successfully using these renderers together with the
SDL software renderer. (On most devices the SDL software renderer will
be much faster as there are only badly optimized vendor drivers available)

I send these patches now in this unpolished state because there seems to
be some interest in win ce and someone has to start supporting SDL 1.3

Now on to the patches:
wince_events_window_fixes.patch
fixes some wince incompatibilities and adds fullscreen support via
SHFullScreen. NOTE: This patch shouldn't have any side effects on
Windows, but I have NOT tested it on Windows, so please double-check.
This patch doesn't dependent on the following ones.

wince_renderers_system.patch
This patch does all necessary modifications to the SDL system.
- it adds the renderers to the configure system
- it adds the renderers to win32video

SDL_ceddrawrender.c
SDL_ceddrawrender.h
SDL_gapirender_c.h
SDL_gapirender.c
SDL_gapirender.h
these files add the new render drivers and should be placed in
src/video/win32

Some notes to people who want to test this:
- I have only compiled sdl with ming32ce, so the VisualC files are not
up to date
- As mingw32ce has no ddraw.h this file must be taken from the MS SDK
and modified to work with gcc
- I had to modify line 2611 in configure.in to
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lcoredll -lcommctrl -lmmtimer
-Wl,--image-base -Wl,0x10000"
otherwise GetCPinfo wouldn't link. If someone knows whats causing this
I'd be happy to hear about it.

It would be great if these patches could make their way into SVN as this
would make collaboration much much easier.

I'm out of office for the next week and therefore will be unavailable
via email.

Regards
Stefan

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403626
2009-06-07 02:44:46 +00:00
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
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
483f2ba3fb indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403608
2009-05-23 22:41:08 +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
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
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
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
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
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