Commit Graph

273 Commits

Author SHA1 Message Date
Sam Lantinga
2a96e84434 CD-ROM support is so passé :) 2009-09-05 09:11:03 +00:00
Bob Pendleton
7e05ef1526 Start of redesign, getting rid of 8 and 16 bit operations in .h and test files. 2009-08-11 21:27:19 +00:00
Bob Pendleton
a71b57e1f0 volitile... duh, yeah the variable need to be labeled volitile 2009-07-09 21:31:27 +00:00
Bob Pendleton
e53cd95852 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. :-)
2009-06-29 19:54:43 +00:00
Bob Pendleton
9302a68559 Disabling 64 bit atomics operations until I figure out why they do not link. 2009-06-24 22:24:23 +00:00
Bob Pendleton
0b5bc4d23b 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.
2009-06-24 20:04:08 +00:00
Mike Gorchak
2949fd46f1 Proper window resize handling in GLES test application. 2009-06-11 06:03:05 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +00:00
Mike Gorchak
49687f83c0 SDL pixel format string is printed near mode number in form of SDL_PIXELFORMAT_XXXXX, when --info option is passed. It is usefull for debugging. 2009-06-10 05:56:36 +00:00
Mike Gorchak
f5c427f988 Support for 15/16/24/32 bpps of icon.bmp has been added, in case if not an original icon.bmp (8bpp with palette) is used for tests. 2009-06-10 05:54:19 +00:00
Bob Pendleton
361a88d8db First commit for SDL atomic operations.
On my linux box it compiles and installs correctly and testatomic runs without errors.
2009-06-09 17:33:44 +00:00
Ryan C. Gordon
1a2c2eebd2 Initial work on power subsystem for SDL 1.3. 2009-06-07 06:06:35 +00:00
Sam Lantinga
83d7309416 indent 2009-05-23 22:41:08 +00:00
Mike Gorchak
d6599a968a Default video mode has been changed from 320x200 to 640x480, since fullscreen 320x200 is often unavailable. 2009-04-28 04:41:25 +00:00
Mike Gorchak
4652a067c9 Added OpenGL ES context creation for the each window which has been created (for --windows=N option). 2009-04-28 04:38:51 +00:00
Sam Lantinga
3532a3491b 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.
2009-03-24 10:33:12 +00:00
Sam Lantinga
983362f89f Fixed potential crash in testbitmap 2009-03-22 06:56:37 +00:00
Sam Lantinga
160ca01b9a Fixed OpenGL library linking issue 2009-03-12 03:51:39 +00:00
Sam Lantinga
4df57c1da2 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.
2009-03-04 15:10:47 +00:00
Sam Lantinga
34ec22eedd indent 2009-02-17 05:57:54 +00:00
Sam Lantinga
17a7c7045f Fixed bug #681
Description From  Philipp   2009-01-16 20:50:01   (-) [reply]

The File test/README from the svn says this:

    testgl        A very simple example of using OpenGL with SDL
    testgl2        Improved version of testgl

It is actually exchanged.

testgl.c is the improved version right now and testgl2.c the simple one.
2009-02-17 05:44:49 +00:00
Sam Lantinga
33ba78ff59 More of the same 2009-02-09 06:42:38 +00:00
Sam Lantinga
5dcf7511db Implemented Win32 version of the native window test 2009-02-09 06:41:49 +00:00
Sam Lantinga
8cb6792622 Whoops, missed a file 2009-02-09 06:28:45 +00:00
Sam Lantinga
e141340a20 Added test program for SDL_CreateWindowFrom()
Make sure OpenGL library is loaded before working with OpenGL windows,
even those created with SDL_CreateWindowFrom()
2009-02-09 05:32:12 +00:00
Sam Lantinga
765fb4319c indent 2009-01-14 04:25:32 +00:00
Ryan C. Gordon
b6c7cede3d testresample.c: Write out correct size for resampled buffer. 2009-01-11 04:29:36 +00:00
Ryan C. Gordon
3194059973 Added testresample.c 2009-01-11 04:05:28 +00:00
Sam Lantinga
773c885015 indent 2009-01-04 23:41:09 +00:00
Sam Lantinga
eb2a8d36a0 Date: Sat, 3 Jan 2009 22:11:18 -0500
From: "Donny Viszneki"
Subject: Re: [SDL] Want to help with SDL 1.3?

>> > For example, here's a good quick project for someone from the TODO list:
>> > * Add diagonal line clipping to SDL_IntersectRectAndLine()

Just wanted to point out that the patch is available at
http://codebad.com/rect-line-ix.patch

I hereby grant Sam Lantinga an irrevocable non-exclusive distribution
license to this patch to do with as he wishes.
2009-01-04 19:33:21 +00:00
Sam Lantinga
e19ae7644f Fine tuned revision code, updated testver 2009-01-04 05:27:13 +00:00
Sam Lantinga
658ede9913 Correct the test program 2008-12-24 13:04:18 +00:00
Sam Lantinga
8074db74ef Fixed crash in testdraw2, added more points 2008-12-21 17:55:02 +00:00
Sam Lantinga
8318ef98b6 Added RenderPiont() API
Merged the drawing tests into a single test program
2008-12-21 17:39:41 +00:00
Sam Lantinga
686e035308 Added test program to verify fill functionality 2008-12-21 08:24:32 +00:00
Sam Lantinga
6fa6a75e4c indent 2008-12-20 23:10:20 +00:00
Sam Lantinga
03a3cba901 Add a few test pattern lines 2008-12-20 18:26:06 +00:00
Sam Lantinga
7c31254bef Added a test program for line drawing 2008-12-20 12:32:53 +00:00
Sam Lantinga
94e70de686 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.
2008-12-20 12:00:00 +00:00
Sam Lantinga
3e8002422c Updated test for API changes 2008-12-13 12:34:28 +00:00
Sam Lantinga
369350caa0 Added current_w and current_h to SDL_VideoInfo for SDL 1.2 compatibility 2008-12-12 06:46:20 +00:00
Sam Lantinga
dc5ac3d35a Fixed palette sharing 2008-12-07 22:56:18 +00:00
Sam Lantinga
7e9c50dc26 Fixed crash in testpalette and potential crash in SDL_LoadBMP_RW() 2008-12-07 22:25:16 +00:00
Sam Lantinga
03719ab259 minor bug 2008-12-05 07:01:12 +00:00
Sam Lantinga
b19a33def3 Removed unused function 2008-12-02 16:10:21 +00:00
Sam Lantinga
a042a1ebc0 You can't use memset() on screen formats with an alpha channel 2008-12-02 16:09:58 +00:00
Sam Lantinga
420db1dc91 Fixed testalpha screen clear for screen formats with an alpha channel 2008-11-29 11:24:18 +00:00
Sam Lantinga
225831e41c Again, map the color with the alpha channel filled in. 2008-11-28 20:09:32 +00:00
Sam Lantinga
6692a9cb93 Map to black, not necessarily 0 2008-11-28 17:44:28 +00:00
Sam Lantinga
1a2a7e3b1d Show the grey background first before starting to blit sprites 2008-11-27 04:51:34 +00:00