Commit graph

26 commits

Author SHA1 Message Date
Sam Lantinga
84c86a8df1 Reverted the experiment, it didn't work. 2011-02-20 23:51:31 -08:00
Sam Lantinga
e4acc9ef07 Experiment to try to account for source clipping 2011-02-20 23:16:58 -08:00
Sam Lantinga
92f76388ca Zero streaming textures to reduce confusion.
(See mailing list message with subject "Streaming textures not properly initialized?")
2011-02-17 18:58:43 -08:00
Sam Lantinga
ea8037a625 Implemented OpenGL ES RenderClear() 2011-02-17 02:23:48 -08:00
Sam Lantinga
30d36c1c80 Fixed SDL_RenderClear() if the render driver doesn't implement it. 2011-02-17 02:17:38 -08:00
Sam Lantinga
c1b336b8ee Don't accidentally pick a YV12 format as the closest format. 2011-02-15 15:50:21 -08: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
f9a5f416fb Frank Zago to SDL
On 02/12/2011 01:44 PM, Sam Lantinga wrote:
> BTW, you probably want to nuke the NDS renderer and just implement these three
> functions instead:
>     int (*CreateWindowFramebuffer) (_THIS, SDL_Window * window, Uint32 *
> format, void ** pixels, int *pitch);
>     int (*UpdateWindowFramebuffer) (_THIS, SDL_Window * window, int numrects,
> SDL_Rect * rects);
>     void (*DestroyWindowFramebuffer) (_THIS, SDL_Window * window);

Patch attached. The renderer for the DS is not used anymore, but I left the
file in place if someone wants to finish it.

I've also added a README.ds and fixed the spinlocks.
2011-02-13 14:01:02 -08:00
Sam Lantinga
5095592ce5 A few fixes:
Fixed creating render texture framebuffer.
Removed the need for palette watch, added surface format caching.
Added an SDL_DONTFREE flag so you can't free the window and 1.2 shadow surfaces.
2011-02-13 13:46:10 -08:00
Sam Lantinga
96656bb924 Frank Zago to sdl
The following patch fixes some of the bitrot for the Nintendo DS port.
The support is still basic at the moment, but it allows to run the "general"
test under the current head of tree (parent: 5269:11bd1585efb5 tip).
Most of the patch is mine, but I integrated a couple changes that John
Magnotti posted on Feb 1st.
2011-02-12 11:36:56 -08:00
Sam Lantinga
ba0ff6d7c8 Fixed a crash caused by the 1.2 code path getting a YV12 texture. :) 2011-02-12 08:17:58 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
7133afac5f Made it possible to disable the rendering subsystem with configure --disable-render 2011-02-08 10:04:09 -08:00
Sam Lantinga
8253658837 Added function SDL_RenderSetClipRect() 2011-02-07 20:06:26 -08:00
Sam Lantinga
f582f9e58e Added a simple log message API 2011-02-07 16:45:40 -08:00
Sam Lantinga
b1c0c48f03 Prefer the OpenGL ES 2.0 context when it's available, make it possible to create an OpenGL 2.0 context on iPhoneOS 2011-02-06 10:22:25 -08:00
Sam Lantinga
f2c40726b6 Added an OpenGL ES 2.0 renderer, contributed by itsnotabigtruck
This compiles, but it untested.
2011-02-06 00:00:13 -08:00
Sam Lantinga
8b3eb38df2 Updated the DirectFB support, from Couriersud
attached is a working directfb driver diff which works with the current
changes. There are a number of changes around it as well, e.g.
configure.in.

The directfb renderdriver right now still depends on a some "includes"
from src/video/directfb. That's why it is not yet moved to the new
render folder.
2011-02-05 16:07:10 -08:00
Sam Lantinga
f002356b91 Renamed files for consistency
--HG--
rename : src/render/direct3d/SDL_d3drender.c => src/render/direct3d/SDL_render_d3d.c
rename : src/render/opengl/SDL_renderer_gl.c => src/render/opengl/SDL_render_gl.c
rename : src/render/opengles/SDL_renderer_gles.c => src/render/opengles/SDL_render_gles.c
rename : src/render/software/SDL_renderer_sw.c => src/render/software/SDL_render_sw.c
rename : src/render/software/SDL_renderer_sw_c.h => src/render/software/SDL_render_sw_c.h
2011-02-05 12:01:11 -08:00
Sam Lantinga
f8247546d6 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints. 2011-02-05 10:35:36 -08:00
Sam Lantinga
065cf0f75a SDL_SetTextureBlendMode broken, caught by Kai Sterker - Thanks! 2011-02-05 00:32:04 -08:00
Sam Lantinga
052351dbe2 Added a way to get a framebuffer interface for a window, and also a way to create a software renderer for an arbitrary surface.
The software renderer has been re-routed to use the framebuffer interface, which makes it possible to have software rendering available even on simple ports.
2011-02-03 15:49:37 -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
31b3ad2414 Making the API simpler, removed the writepixels interface 2011-02-03 00:22:18 -08:00
Sam Lantinga
d2b54f7d24 Made it possible to create a texture of any format, even if not supported by the renderer.
This allows me to reduce the set of formats supported by the renderers to the most optimal set, for a nice speed boost.

--HG--
rename : src/video/SDL_yuv_mmx.c => src/render/SDL_yuv_mmx.c
rename : src/video/SDL_yuv_sw.c => src/render/SDL_yuv_sw.c
rename : src/video/SDL_yuv_sw_c.h => src/render/SDL_yuv_sw_c.h
rename : src/video/mmx.h => src/render/mmx.h
2011-02-03 00:19:40 -08:00
Sam Lantinga
5897ef7d95 Moved the rendering code out to a separate directory in the hope that it can someday be completely decoupled from the rest of the library and be expanded to an awesome 2D on 3D library.
--HG--
rename : src/video/windows/SDL_d3drender.c => src/render/direct3d/SDL_d3drender.c
rename : src/video/SDL_renderer_gl.c => src/render/opengl/SDL_renderer_gl.c
rename : src/video/SDL_renderer_gles.c => src/render/opengles/SDL_renderer_gles.c
rename : src/video/SDL_renderer_sw.c => src/render/software/SDL_renderer_sw.c
2011-02-02 14:34:54 -08:00