35 Commits

Author SHA1 Message Date
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Ryan C. Gordon
ab0fcbfbd2 Added orientation rotation for iOS. 2011-03-28 23:21:22 -04:00
Sam Lantinga
c804b92b9e Changed the concept of a render clip rect to a render viewport.
The render viewport is automatically re-centered when the window changes size, so applications that don't care will not have to handle recalculating their rendering coordinates.

Fixed API for drawing and filling multiple rectangles - the parameter should be an array of rects, not an array of pointers to rects.

Fixed API for updating window rects for consistency with other APIs - the order is pointer to array followed by count in array.
2011-02-15 13:59:59 -08:00
Sam Lantinga
8209e2a9a9 Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
fe2b0d9703 Simplified and improved the process of creating a texture from a surface. 2011-02-03 00:54:29 -08:00
Sam Lantinga
df94d4c6a4 The rendering functions take a context so it's clear what window they're drawing to. This also potentially opens to the door to multi-threaded rendering in the future. 2011-02-01 19:19:43 -08:00
Sam Lantinga
825e1da54d Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers.
--HG--
extra : rebase_source : f06ea01caa64c8ad14170c723e5af52dad64d779
2011-01-31 23:23:57 -08:00
Sam Lantinga
df1f384c5b Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers.
--HG--
extra : rebase_source : 4edac7fd162a2eb37a50159b958db37a03e944a5
2011-01-31 22:44:43 -08:00
Sam Lantinga
35cc558917 Use the enumerated type for blend and scale mode instead of int
Renamed SDL_TextureScaleMode to SDL_ScaleMode
2010-12-12 15:19:05 -08:00
Andreas Schiffler
1975b91fae - added directx include path to VS2008 solution
- updated shape vcproj and add it to VS2008 solution
- minor changes (i.e. typecasting) to get rid of compiler warnings in VS
2010-09-15 22:15:47 -07:00
Sam Lantinga
a0e019f786 Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404438
2010-01-21 06:21:52 +00:00
Sam Lantinga
6da163ab81 Added SDL_RenderClear() as a fast method of clearing the screen to the drawing color.
Renamed SDL_RenderPoint() and SDL_RenderLine() to SDL_RenderDrawPoint() and SDL_RenderDrawLine().
Added API for rectangle drawing (as opposed to filling)
Added placeholder API functions for circles and ellipses ... I'm not sure whether these will stay.
Optimized software line drawing quite a bit.
Added support for Wu's anti-aliased line drawing, currently disabled by default.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404346
2009-12-23 01:55:00 +00:00
Sam Lantinga
0158b925d3 The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404309
2009-12-14 23:29:37 +00:00
Sam Lantinga
8ee9720297 Added interfaces for batch drawing of points, lines and rects:
SDL_DrawPoints()
    SDL_BlendPoints()
    SDL_BlendLines()
    SDL_DrawLines()
    SDL_FillRects()
    SDL_BlendRects()
    SDL_RenderPoints()
    SDL_RenderLines()
    SDL_RenderRects()
Renamed SDL_RenderFill() to SDL_RenderRect()

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404279
2009-12-09 15:56:56 +00:00
Sam Lantinga
0a027f75d0 Fall back to opaque sprite if no formats with alpha are supported.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403835
2009-09-20 23:09:30 +00:00
Sam Lantinga
a5b7ba39e6 More test coverage
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403807
2009-09-19 05:45:49 +00:00
Sam Lantinga
117273ed79 Added more tests for the different primitive types
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403806
2009-09-19 05:43:15 +00:00
Sam Lantinga
1d966b1f67 Fixed bug #783
Fixed coordinate positioning with OpenGL renderer, and added a test case

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403805
2009-09-19 05:12:26 +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
Mike Gorchak
05b71a0fbd 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.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403641
2009-06-10 05:54:19 +00:00
Sam Lantinga
9ba7210778 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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403346
2008-12-20 12:00:00 +00:00
Sam Lantinga
d9bd99d552 minor bug
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403295
2008-12-05 07:01:12 +00:00
Sam Lantinga
a733eee1b8 indent
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403247
2008-11-25 02:21:53 +00:00
Sam Lantinga
32593c2bac Fixed Direct3D rendering
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403244
2008-11-25 00:29:44 +00:00
Sam Lantinga
6b348f07c7 Emphasized the separation between SDL_Surface and SDL_Texture
- SDL_Surface is a system memory representation of pixel data
 - SDL_Texture is a video memory representation of pixel data

The concept of SDL_Surface with SDL_HWSURFACE is no longer used.

Separated SDL_Texture types by usage rather than memory type
 - SDL_TEXTUREACCESS_STATIC is for rarely changed pixel data,
   can be placed in video memory.
 - SDL_TEXTUREACCESS_STREAMING is for frequently changing pixel
   data, usually placed in system memory or AGP memory.

Optimized the SDL_compat usage of the OpenGL renderer by only
using one copy of the framebuffer instead of two.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402584
2007-08-11 20:54:31 +00:00
Sam Lantinga
fdafca64b3 Added source color and alpha modulation support.
Added perl script to generate optimized render copy functions.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402032
2006-08-28 03:17:39 +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
cfe0a80302 Implemented scaling in the D3D renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401962
2006-07-19 05:45:42 +00:00
Sam Lantinga
9eea51e280 Implemented blend modes in the D3D renderer
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401961
2006-07-19 05:03:21 +00:00
Sam Lantinga
f2c829616b Implemented multi-window OpenGL program with test framework.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401960
2006-07-19 04:24:41 +00:00
Sam Lantinga
3b997f233d Added a test program framework for easy initialization.
Started work on multi-window OpenGL demo

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401959
2006-07-18 07:49:51 +00:00
Sam Lantinga
d5d8761b60 Streamlined the API a bit and optimized the software renderer.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401952
2006-07-15 09:46:36 +00:00
Sam Lantinga
e920af3d1b Yay! D3D renderer works!
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401949
2006-07-14 07:41:16 +00:00
Sam Lantinga
5877021286 More of the Direct3D renderer is implemented, I'm not sure why it's not showing texture copies yet...
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401948
2006-07-14 06:40:53 +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