Commit graph

627 commits

Author SHA1 Message Date
Sam Lantinga
de9566518f Fixed some Visual Studio analyze warnings 2013-06-15 02:46:32 -07:00
Yuri K. Schlesner
5480cdd85c Re-apply texture filter when resetting direct3d renderer. 2013-05-29 06:31:48 -05:00
Sam Lantinga
20c5cf1e8b When the window is resized, the viewport is automatically reset.
This resolves lots of confusion around resizable windows.  Most people don't expect a viewport to be implicitly set when the renderer is created and then not to be reset to the window size if the window is resized.

Added common test command line parameters --logical WxH and --scale N to test the render logical size and scaling APIs.
2013-05-29 03:22:19 -07:00
Sam Lantinga
c55f53aa40 Fixed bug 1622 - SDL_RenderSetViewport with empty SDL_Rect raises wrong error for OpenGL rendering backend
It's now legal to set an empty viewport rect - it will prevent any rendering.

Also added an API to query the output size: SDL_GetRendererOutputSize()
2013-05-29 03:07:55 -07:00
Sam Lantinga
f56b6fdc45 It turns out that GL_ARB_debug_output is really only useful on debug contexts, so for consistency and performance we'll only check and report errors on debug contexts.
I added a --gldebug command line option for the test programs to easily test this, and we may want a hint as well to enable OpenGL error checking.
2013-05-20 12:01:31 -07:00
Sam Lantinga
635a32ed58 Fixed declaration of GL_HandleDebugMessage 2013-05-19 22:57:01 -07:00
Sam Lantinga
11dfd2bff8 Fixed windows build 2013-05-19 22:45:52 -07:00
Sam Lantinga
91ff680aa5 Fixed bug 1837 - Use error extension instead of glGetError()
Implemented support for GL_ARB_debug_output, but was unable to test it on Mac OS X.
2013-05-19 22:28:10 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Sam Lantinga
cbe94acd8e Fixed bug 1838 - [Patch] Direct3D resource leak on SDL_DestroyRenderer() 2013-05-16 00:56:19 -07:00
Philipp Wiesemann
337c6acc60 Inlined expression for consistency in render source. 2013-05-13 22:45:06 +02:00
Philipp Wiesemann
6814d3a09c Fixed building on Visual Studio.
Buildbot
2013-05-12 14:25:38 +02:00
Philipp Wiesemann
df60747e3b Fixed bug 1844 - glScissor calls are wrong - Patch attached
Martin Gerhardy

the coordinate system from sdl is not correctly transformed to the coordinate system of opengl. glScissor expects them to be a little bit different. Attached is a patch that fixes this
2013-05-12 13:40:02 +02:00
Philipp Wiesemann
d7cb8fc61f Corrected spelling in internal include file. 2013-05-12 13:02:07 +02:00
Gabriel Jacobo
293da630b8 Fixed typo in GL_UpdateClipRect 2013-05-10 10:33:15 -03:00
Gabriel Jacobo
7065c6467d Fixes OpenGL* Clip Rect functions (by Emmanuel Gil Peyrot) 2013-05-10 10:31:01 -03:00
Philipp Wiesemann
e2fe26af28 Fixed SDL_RenderSetClipRect() returning undefined instead of -1 on error. 2013-05-04 22:44:03 +02:00
Sam Lantinga
866f2e5f9e First pass on SDL render clip rect functionality 2013-05-04 04:46:00 -07:00
Sam Lantinga
b72f0b741e Fixed bug 1583 - Fix build for disabled SDL render subsystem
Marcus von Appen

If one wants to disable the SDL render subsystem, the build breaks on several platforms due to an empty render_drivers array in SDL_render.c.
2013-04-25 00:15:09 -07:00
Gabriel Jacobo
4b4bea7294 Fixes PSP_DestroyTexture release of data (don't release the SDL_Texture pointer) 2013-04-23 16:54:52 -03:00
Jørgen P. Tjernø
187143d618 SDL_GL_DeleteContext would leave an invalid current_glctx.
Calling SDL_GL_DeleteContext wouldn't update current_glctx, so you could
end up with use-after-free and other goodies when you deleted a context.
2013-04-22 18:15:08 -07:00
David Ludwig
6a01cdf7f3 WinRT: merged with latest, official, SDL 2.x sources 2013-04-21 12:38:44 -04:00
David Ludwig
52a3b9b1f5 WinRT: made SDL's inner WinRT CoreWindow be accessible to non-C++/CX code, in theory 2013-04-16 23:40:03 -04:00
Ryan C. Gordon
71b29b3822 Don't use glDisable(GL_TEXTURE_2D) in GLES2 renderer.
Fixes Bugzilla #1799.

--HG--
extra : rebase_source : bdcc78e0cbdb2879c7ae24666bea567ce24dcd74
2013-04-17 11:45:50 -04:00
Andreas Schiffler
5bd319e5b5 Fix bug 1764: incorrect variable assignment in RenderDrawLinesWithRects 2013-04-17 07:35:30 -07:00
David Ludwig
41ce3814e2 WinRT: merged with latest, official, SDL 2.x sources (at rev. bea100d73d13) 2013-04-14 11:42:55 -04:00
David Ludwig
e40e111591 WinRT: added render-to-texture support for D3D 11.1, via SDL_SetRenderTarget 2013-04-13 23:03:46 -04:00
David Ludwig
b74856f7b7 WinRT: added texture channel color-modulation support for D3D 11.1
--HG--
rename : src/render/direct3d11/SDL_D3D11_PixelShader_TextureCopy.hlsl => src/render/direct3d11/SDL_D3D11_PixelShader_TextureColored.hlsl
2013-04-07 22:35:58 -04:00
David Ludwig
b1b2ba3f09 WinRT: removed a bit of unused code from the D3D 11.1 renderer 2013-04-02 00:21:01 -04:00
David Ludwig
b7887dd326 WinRT: added rotation support to SDL_RenderCopyEx via D3D 11.1 2013-04-02 00:09:49 -04:00
David Ludwig
5230205e27 WinRT: implemented SDL_RenderCopyEx, w/ SDL_RendererFlip support, in D3D 11.1 2013-04-01 22:33:37 -04:00
David Ludwig
33ab98ccee WinRT: implemented SDL_RenderReadPixels in Direct3D 11.1 2013-04-01 21:34:47 -04:00
Ryan C. Gordon
4f438b70a2 Make SDL_SetError and friends unconditionally return -1.
This lets us change things like this...

    if (Failed) {
        SDL_SetError("We failed");
        return -1;
    }

...into this...

    if (Failed) {
        return SDL_SetError("We failed");
    }


 Fixes Bugzilla #1778.
2013-03-31 12:48:50 -04:00
David Ludwig
2e29d030b9 WinRT: removed code that unnecessarily set a blank D3D 11.1 texture's contents 2013-03-31 11:44:50 -04:00
David Ludwig
da65f35eaf WinRT: added SDL_LockTexture and SDL_UnlockTexture support to the D3D 11.1 renderer 2013-03-31 11:16:31 -04:00
David Ludwig
b7476a788a WinRT: added point drawing support to the Direct3D 11.1 rendering backend 2013-03-24 21:57:40 -04:00
David Ludwig
7cb5ae426f WinRT: added line drawing support to the Direct3D 11.1 rendering backend 2013-03-24 21:19:26 -04:00
Sam Lantinga
3afbe992d5 Removed Nintendo DS support since nobody has volunteered to maintain it for over a year. 2013-03-17 09:44:58 -07:00
Captain Lex
47dac69dc7 Add PSP support 2013-03-17 20:07:02 +08:00
Sam Lantinga
541a638836 Fixed compile errors on Windows 2013-03-06 09:45:53 -08:00
Sam Lantinga
4e631c1583 Fixed warning messages when loading Direct3D DLL
kmx

I have investigated the warning "Failed loading D3DX9_*.dll" and come up with the enclosed patch (please forward it to relevant SDL2 mailing list/bugtracker).
2013-03-05 18:52:25 -08:00
Sam Lantinga
4bb1b24573 Don't specify the texture unit when binding a texture, instead use whatever has been set up by the application.
This matches behavior in the OpenGL and OpenGL ES 1.1 renderers.
2013-03-03 11:25:43 -08:00
Sam Lantinga
7999859dda Fixed formatting 2013-03-03 11:25:09 -08:00
Sam Lantinga
7065167e8c Fixed bug 1728 - fixed compiler warnings 2013-02-26 03:34:34 -08:00
David Ludwig
88be433255 WinRT: made the D3D 11.1 renderer respect the 'srcrect' parameter of SDL_RenderCopy 2013-02-24 12:27:28 -05:00
David Ludwig
8d55f67a2f WinRT: allowed for querying of max texture size (via Direct3D 11.1) 2013-02-24 10:30:12 -05:00
David Ludwig
0a9710e1e5 WinRT: made the Direct3D 11.1 renderer correctly report its status regarding render-to-texture (not supported, yet) 2013-02-24 10:14:23 -05:00
David Ludwig
0464946409 WinRT: moved the default vertex shader into the Direct3D 11.1 renderer's folder
--HG--
rename : src/video/windowsrt/SimpleVertexShader.hlsl => src/render/direct3d11/SDL_D3D11_VertexShader_Default.hlsl
2013-02-24 10:11:58 -05:00
David Ludwig
5520a12a33 WinRT: added support for alpha-blended texture rendering 2013-02-23 22:58:09 -05:00
David Ludwig
776ebe3bda WinRT: merged with latest, official, SDL 2.x code 2013-02-23 20:01:46 -05:00