Commit graph

3120 commits

Author SHA1 Message Date
Sam Lantinga
78855cf981 Adjust the vertices to be over the texel center.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404195
2009-11-19 04:33:35 +00:00
Sam Lantinga
ffed135358 Fixed a bunch of bugs in the blit blend mode tests
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404194
2009-11-18 09:39:32 +00:00
Sam Lantinga
ae9dabec32 Use SDL's string and memory functions instead of stdlib
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404193
2009-11-18 09:28:35 +00:00
Sam Lantinga
a6bfcda464 Implemented SDL_RenderReadPixels()/SDL_RenderWritePixels() for the dummy renderer.
This is helpful to validate the automated test suite, since this renderer is super simple and should always pass tests.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404192
2009-11-18 09:20:01 +00:00
Sam Lantinga
6e102beb88 Don't add the OpenGL renderers for drivers that don't support OpenGL
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404191
2009-11-18 09:17:29 +00:00
Sam Lantinga
50cac453d4 Fixes for the automated rendering test
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404190
2009-11-18 09:07:13 +00:00
Sam Lantinga
9e98b7ad9e If we explicitly request a driver, try to initialize it.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404189
2009-11-18 08:54:13 +00:00
Sam Lantinga
a192c6e6bc Fixed GL_RenderReadPixels() - thanks Ryan!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404188
2009-11-18 08:07:37 +00:00
Sam Lantinga
2d9880b962 First pass (untested) at RenderWritePixels()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404187
2009-11-18 07:35:00 +00:00
Sam Lantinga
7f4f3792ce Refactored to use render_loadTestFace()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404186
2009-11-18 07:34:05 +00:00
Sam Lantinga
86dbbd0dd3 Fixed endianness of the face image surface
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404185
2009-11-18 07:22:22 +00:00
Sam Lantinga
87442cb483 Trying to figure out why the OpenGL tests are failing...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404184
2009-11-18 06:15:44 +00:00
Sam Lantinga
200856fb2b Compare against the correct image
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404183
2009-11-18 06:15:21 +00:00
Sam Lantinga
508336f894 Debug info to help track down render test failures
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404182
2009-11-17 06:51:14 +00:00
Sam Lantinga
a3226cf7d3 Added missing return values
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404181
2009-11-17 06:50:29 +00:00
Sam Lantinga
c635254fa1 Fixed some bugs in the automated test suite, revealed by working SDL_RenderReadPixels()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404180
2009-11-17 05:17:11 +00:00
Sam Lantinga
82d400ccd4 Scott to slouken
Heres the wiz patch and additional files. (I think I got everything)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404177
2009-11-17 04:53:15 +00:00
Sam Lantinga
f62ed3cb3f Thank you automated tests (and bobbens!), fixed alpha blending for accuracy
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404176
2009-11-16 09:47:34 +00:00
Sam Lantinga
209448b796 Fixed memory corruption in SW_RenderReadPixels()
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404175
2009-11-16 07:39:08 +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
ea4fb3a1a4 Added a utility function to convert blocks of pixels
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404172
2009-11-15 09:21:46 +00:00
Sam Lantinga
08aadfdc9f Hmm, this isn't going to work, is it?
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404171
2009-11-15 08:01:34 +00:00
Sam Lantinga
df2499a35c Work in progress: SDL_RenderReadPixels() should be implemented soon.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404170
2009-11-15 08:01:07 +00:00
Sam Lantinga
960459ec63 Work in progress on OpenGL ReadPixels/WritePixels interface
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404169
2009-11-15 04:58:03 +00:00
Sam Lantinga
143563c826 Updated for the new pixel format structure
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404167
2009-11-11 06:34:33 +00:00
Sam Lantinga
70f4c52c68 The docs directory doesn't exist anymore
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404166
2009-11-11 06:23:19 +00:00
Sam Lantinga
fbaee18c6d Fixed gcc warning
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404164
2009-11-09 15:12:31 +00:00
Sam Lantinga
0e8fa16511 Work in progress on implementation of SDL_RenderReadPixels() and SDL_RenderWritePixels(), code untested.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404163
2009-11-09 05:20:11 +00:00
Sam Lantinga
15e287332f Fixed bug #878
Jack Jansen      2009-11-05 14:20:22 PST

I'm building "fat" SDL 1.3 libraries for MacOSX, but now I am running into the
issue that audio does not work on PowerPC macintoshes if you build the library
on an Intel.

The problem is that configure hard-codes the byteorder, which is then stored in
SDL_config.h

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404162
2009-11-09 04:13:51 +00:00
Sam Lantinga
27a44195ae Fixed compile warning
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404161
2009-11-08 04:21:59 +00:00
Sam Lantinga
6c0d20ab8c Skip renderers that fail to initialize
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404160
2009-11-08 04:16:42 +00:00
Sam Lantinga
f9293220c1 Removed the separate static simulator target, all targets create libSDLiPhoneOS.a
Removed generic thread files, they shouldn't have been in there.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404149
2009-11-02 07:57:51 +00:00
Sam Lantinga
8f71172aad Fixed bug #847
Roger Willcocks      2009-10-25 08:45:37 PDT

appDidFinishLaunching is triggered before all the setup's complete. The easiest
fix is to arrange for another event to be sent when it's really ready, and run
SDL_main from there. Ref.
http://blog.rightsprite.com/2008/11/iphone-applicationdidfinishlaunching.html

SDL-1.3.0-4563/src/video/uikit/SDL_uikitappdelegate.m:



- (void)postFinishLaunch {

    /* run the user's application, passing argc and argv */
    int exit_status = SDL_main(forward_argc, forward_argv);

    /* free the memory we used to hold copies of argc and argv */
    int i;
    for (i=0; i<forward_argc; i++) {
        free(forward_argv[i]);
    }
    free(forward_argv);

    /* exit, passing the return status from the user's application */
    exit(exit_status);

}

- (void)applicationDidFinishLaunching:(UIApplication *)application {

    /* Set working directory to resource path */
    [[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle
mainBundle] resourcePath]];

    [self performSelector:@selector(postFinishLaunch) withObject:nil
afterDelay:0.0];

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404148
2009-11-02 07:55:42 +00:00
Sam Lantinga
115c22f261 cpuid doesn't actually change the flags register
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404146
2009-10-30 05:02:47 +00:00
Sam Lantinga
a0fd7e1cba Fixed bug #734
Save and restore the PIC register %ebx/%rbx using push/pop instead of %edi/%rdi

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404145
2009-10-30 04:45:01 +00:00
Mike Gorchak
ef88f68a9d Cursor hotspot fixes.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404144
2009-10-29 09:20:50 +00:00
Sam Lantinga
1599f33522 Fixed compile error
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404142
2009-10-28 06:08:48 +00:00
Sam Lantinga
6d92d75009 Automatically initialize the video system and create a renderer to simplify use.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404141
2009-10-28 06:04:07 +00:00
Sam Lantinga
47997f877c Adam Strzelecki to SDL
This patch significantly speeds up make process (mostly noticeable on MinGW+MSYS) canceling implicit rules for dependencies and Makefile.in that caused lot of unnecessary file checks (in case of Windoze those are pretty slow). See "make -d" before and after applying this patch.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404140
2009-10-28 04:33:24 +00:00
Sam Lantinga
303b14025b Adam Strzelecki to SDL
Actually after my patch commited in r4928 MinGW configure seems to generate broken Makefile due MSYS bash bug. (Attaching cure/patch below)

The problem is that:

TEST=`echo 'one\\
two\\
three\\'`
echo "$TEST"

Should echo:
one\
two\
three\

Does it on Linux, Mac.. all UNIX but not on MSYS (MinGW) which outputs:
one\two\three\
(new lines removed, probably it doesn't like backslashes)
Probably this bug should be submitted to MSYS team, but not waiting till MSYS gets it fixed (they have very slow release cycles) here goes simple cure...

My patch simply replaces single quoted SED rules where we needed newlien injection with double quoted ones.

Tested on Mac, Linux & MinGW. Please review it ASAP coz this may be showstopper for everybody compiling with MinGW.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404139
2009-10-28 04:27:50 +00:00
Sam Lantinga
cf7ca27b19 Adam Strzelecki to SDL
I think something is wrong (look at the fix patch below):
(1) NSRect rect shouldn't be initialized with contentRectForFrameRect: at the top of the function, contentRectForFrameRect is called in non-fullscreen case anyway (1st @@)
(2) I think you've left two lines that should be removed completely (2nd @@)

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404138
2009-10-23 04:08:32 +00:00
Sam Lantinga
f9c1667f92 Adam Strzelecki to SDL
When using deployment in Xcode we use 10.4 SDK for PPC & i386 and 10.6 SDK for x86_64 unfortunately MAC_OS_X_VERSION_10_6 is defined only in 10.6 SDK, in older SDKs it is undefined which makes >= comparison return always TRUTH, so the GCC complains about undefined <NSWindowDelegate>, even if the original intention was to omit <NSWindowDelegate> on older SDKs.

Solution, don't relay on MAC_OS_X_VERSION_10_6 but use OSX revision number 1060 directly as SDL does in many other places.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404137
2009-10-23 03:58:23 +00:00
Mike Gorchak
40aaaac9e1 Fixes in GLES configuration selection.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404136
2009-10-22 06:09:03 +00:00
Mike Gorchak
ae491a8246 Fixes in GLES configuration selection. Support for an old QNX 6.3.2.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404135
2009-10-22 06:08:36 +00:00
Mike Gorchak
6a7f207cd7 Optimizations.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404134
2009-10-22 06:07:05 +00:00
Sam Lantinga
c558493b24 Adam Strzelecki to SDL
Sending a patch for fullscreen Mac OS X SDL 1.3 (SVN) Cocoa mouse position handling. In fullscreen mouse coordinates should be relative to SCREEN not to the window, which doesn't really occupy fullscreen.
Without this patch mouse position (especially Y) was totally incorrect (shifted) in fullscreen.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404132
2009-10-22 04:46:11 +00:00
Mike Gorchak
78dec43e00 Support for GL initialization parameters has been added.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404131
2009-10-21 14:51:42 +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
4483fc99e3 There's a bug with gcc 4.4.1 and -O2 where srcp doesn't get the correct value after the first scanline. Ugh.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404115
2009-10-18 23:21:15 +00:00
Sam Lantinga
7df7cdde39 Merged improvements to SDL_SoftStretch() from SDL 1.2
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404113
2009-10-18 17:49:40 +00:00