Commit Graph

35 Commits

Author SHA1 Message Date
Sam Lantinga
6196aa221e SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Ryan C. Gordon
fe1c0bd3ae Added orientation rotation for iOS. 2011-03-28 23:21:22 -04:00
Sam Lantinga
b59da3ffdc 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
4f6e1878af Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
533d4862d6 Simplified and improved the process of creating a texture from a surface. 2011-02-03 00:54:29 -08:00
Sam Lantinga
adaab5944f 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
0efb1ea0b2 Making the API simpler, the blend modes are "none, blend, add" and are supported by all renderers. 2011-01-31 23:23:57 -08:00
Sam Lantinga
471a85fb52 Making the API simpler, scaling is always defined as linear interpolation and should be supported as much as possible on all renderers. 2011-01-31 22:44:43 -08:00
Sam Lantinga
d6eac2c481 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
04a527d771 - 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
e0a31b4dbb Switched from SDL_WindowID and SDL_TextureID to SDL_Window* and SDL_Texture* for code simplicity and improved performance. 2010-01-21 06:21:52 +00:00
Sam Lantinga
c3629ff44a 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.
2009-12-23 01:55:00 +00:00
Sam Lantinga
2ac49a53bd The SDL 1.3 tests have been cleaned up not to include any 1.2 compatibility code. 2009-12-14 23:29:37 +00:00
Sam Lantinga
70a40d51b2 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()
2009-12-09 15:56:56 +00:00
Sam Lantinga
8ced47d33f Fall back to opaque sprite if no formats with alpha are supported. 2009-09-20 23:09:30 +00:00
Sam Lantinga
6bb3053c3b More test coverage 2009-09-19 05:45:49 +00:00
Sam Lantinga
7c90c0e871 Added more tests for the different primitive types 2009-09-19 05:43:15 +00:00
Sam Lantinga
1ef102a99f Fixed bug #783
Fixed coordinate positioning with OpenGL renderer, and added a test case
2009-09-19 05:12:26 +00:00
Sam Lantinga
aed8be2521 indent 2009-06-10 13:34:20 +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
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
03719ab259 minor bug 2008-12-05 07:01:12 +00:00
Sam Lantinga
8f182d2156 indent 2008-11-25 02:21:53 +00:00
Sam Lantinga
b0b75884f3 Fixed Direct3D rendering 2008-11-25 00:29:44 +00:00
Sam Lantinga
16792e5ed3 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.
2007-08-11 20:54:31 +00:00
Sam Lantinga
7462d2796b Added source color and alpha modulation support.
Added perl script to generate optimized render copy functions.
2006-08-28 03:17:39 +00:00
Sam Lantinga
5b0dc2c1d5 SDL constants are all uppercase. 2006-08-05 17:09:42 +00:00
Sam Lantinga
26eb39ffa6 Implemented scaling in the D3D renderer 2006-07-19 05:45:42 +00:00
Sam Lantinga
6bdc957609 Implemented blend modes in the D3D renderer 2006-07-19 05:03:21 +00:00
Sam Lantinga
e48bd78a26 Implemented multi-window OpenGL program with test framework. 2006-07-19 04:24:41 +00:00
Sam Lantinga
dcd15904cd Added a test program framework for easy initialization.
Started work on multi-window OpenGL demo
2006-07-18 07:49:51 +00:00
Sam Lantinga
ed287169af Streamlined the API a bit and optimized the software renderer. 2006-07-15 09:46:36 +00:00
Sam Lantinga
aa2eab852a Yay! D3D renderer works! 2006-07-14 07:41:16 +00:00
Sam Lantinga
0c86ca7a06 More of the Direct3D renderer is implemented, I'm not sure why it's not showing texture copies yet... 2006-07-14 06:40:53 +00:00
Sam Lantinga
6bc598ea61 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head. 2006-07-10 21:04:37 +00:00