Commit Graph

500 Commits

Author SHA1 Message Date
Ken Rogoway
8c8191deef Software scaling support. Not very fast, but it seems to work. 2011-02-14 11:50:18 -06:00
Sam Lantinga
789241249f Removed renderer definition, removed extra -I statements since no other platform has them (files should be explicit in their include paths). 2011-02-13 14:02:37 -08:00
Sam Lantinga
35db143abf 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
c7b5cc946d 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
e6ec7f6b28 Fixed bug #1117
There's a new event that's always sent when the window changes size, and that event is what the renderers listen for to determine if they need to rebind their context.
2011-02-12 19:02:14 -08:00
Sam Lantinga
362639036a 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
52f11a9f4f The YV12 image isn't w*h*2, it's actually w*h + w*h/4 + w*h/4 2011-02-12 10:13:53 -08:00
Sam Lantinga
8fed295309 Fixed a crash caused by the 1.2 code path getting a YV12 texture. :) 2011-02-12 08:17:58 -08:00
Sam Lantinga
acd458dad9 Ah there, that fixed it. :) 2011-02-12 00:42:39 -08:00
Sam Lantinga
5e1535525c Initial pass at shader YV12 support - doesn't quite work yet. 2011-02-12 00:25:02 -08:00
Sam Lantinga
a2cdcf5486 Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
97ef063646 itsnotabigtruck has given me permission to replace the license for his contribution. 2011-02-11 19:11:27 -08:00
Sam Lantinga
3482e0aa2f Mostly fixed fullscreen mode on Mac OS X, and you can toggle it on and off.
There are still some problems with the ConvertNSRect() calculations when switching video modes, which causes wierd window positioning issues, and the fullscreen window is still minimized on exit.
2011-02-11 00:25:44 -08:00
Sam Lantinga
efc19178c7 Fixed compiling on Windows
Added an untested shader for YV12 textures
2011-02-09 10:31:12 -08:00
Sam Lantinga
385e9bba2e Fixed crash when shaders aren't available. 2011-02-09 10:13:26 -08:00
Sam Lantinga
ca8ed0c39d Added a hint to control whether the OpenGL driver uses shaders. 2011-02-08 22:40:19 -08:00
Sam Lantinga
61d595f2a8 Made the shaders easier to debug when they don't compile 2011-02-08 20:31:39 -08:00
Sam Lantinga
8c85fcf224 Fixed the shaders (needed to use texture2DRect) - thanks Ryan! 2011-02-08 20:23:52 -08:00
Sam Lantinga
fa76d28021 Fixed setting the texture unit, still doesn't work. 2011-02-08 16:50:51 -08:00
Sam Lantinga
e27e8c5cb6 Beginning of a framework for OpenGL shaders 2011-02-08 16:27:52 -08:00
Sam Lantinga
1543672ced Reduce duplicated code in the texture update code paths 2011-02-08 10:38:12 -08:00
Sam Lantinga
5069986bff Made it possible to disable the rendering subsystem with configure --disable-render 2011-02-08 10:04:09 -08:00
Sam Lantinga
da46bc3be3 Added function SDL_RenderSetClipRect() 2011-02-07 20:06:26 -08:00
Sam Lantinga
1f86c7c17d Try to create an OpenGL ES 2.0 context on Android and successfully fall back to OpenGL ES 1.1 if that fails. 2011-02-07 17:44:07 -08:00
Sam Lantinga
47818cfba9 Added a simple log message API 2011-02-07 16:45:40 -08:00
Sam Lantinga
cbc7e8a0b1 You don't need to copy the pixels into the streaming texture's pixel data. This behavior is defined specifically to optimize the UpdateTexture path. 2011-02-06 20:56:21 -08:00
Sam Lantinga
8668130e2d OpenGL ES 2.0 rendering LIVES! 2011-02-06 19:12:55 -08:00
Sam Lantinga
6da9e66522 Fixed compiling source shaders 2011-02-06 10:59:37 -08:00
Sam Lantinga
886171e4ad 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
5cf33c9e22 Fixed crash when binary shaders are not available. 2011-02-06 08:46:48 -08:00
Sam Lantinga
bbf99fa10b Fixed building on Android, added SDL_opengles2.h, removed unnecessary SDL_glesfuncs.h 2011-02-06 02:35:14 -08:00
Sam Lantinga
51284af59d Minor consistency cleanup and documentation link update. 2011-02-06 00:48:41 -08:00
Sam Lantinga
fb51cac4e8 Removed extra unneeded pixel formats, added support for VSYNC on other platforms besides Zune HD. 2011-02-06 00:48:16 -08:00
Sam Lantinga
ae2ce1d91e 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
b31aaaaad7 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
1128c77f9f Renamed files for consistency 2011-02-05 12:01:11 -08:00
Sam Lantinga
59a97fa5e9 Fixed newlines 2011-02-05 11:54:46 -08:00
Sam Lantinga
dd42a41854 Added the SDL_HINT_RENDER_DRIVER and SDL_HINT_RENDER_VSYNC hints. 2011-02-05 10:35:36 -08:00
Sam Lantinga
e113c084a6 Removed execute permissions on source files. 2011-02-05 01:03:51 -08:00
Sam Lantinga
d4a8b09eda Updated the name of the Direct3D renderer. 2011-02-05 00:34:34 -08:00
Sam Lantinga
4f6e1878af Restored SDL_BLENDMODE_MOD for MAME 2011-02-04 19:50:56 -08:00
Sam Lantinga
509c2203d4 SDL_SetTextureBlendMode broken, caught by Kai Sterker - Thanks! 2011-02-05 00:32:04 -08:00
Sam Lantinga
7656894d2a Standardized on using the managed texture pool.
Also experimented with dynamic textures, but didn't get any speed increase with them.  More research and testing is needed.
2011-02-04 12:25:26 -08:00
Sam Lantinga
93a4e38e98 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
e4569cfdca Making the API simpler, moved the surface drawing functions to the software renderer. 2011-02-03 02:45:29 -08:00
Sam Lantinga
004e4cde9f Fixed building for Android 2011-02-03 01:30:28 -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
a5bfac214f Making the API simpler, removed the writepixels interface 2011-02-03 00:22:18 -08:00
Sam Lantinga
405d4ed7e4 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.
2011-02-03 00:19:40 -08:00
Sam Lantinga
8bf50cc83c 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. 2011-02-02 14:34:54 -08:00