Sam Lantinga
22a972a440
Fixed bug 2122 - SDL_CreateTexture allows illegal texture sizes
...
Lloyd Bryant
SDL_CreateTexture() is succeeding (i.e. returning a valid pointer) when the requested horizontal or vertical size of the texture exceeds the maximum allowed by the render. This results in hard-to-understand errors showing up when later attempting to use that texture (such as with SDL_SetRenderTarget()).
2013-09-30 22:16:14 -07:00
Sam Lantinga
202528a48f
Call AddRef() on the device so it doesn't accidentally get released from underneath the caller.
2013-09-28 14:07:17 -07:00
Sam Lantinga
25f607a3c2
Make it clear we're just returning a D3D9 device, allowing for new functions to get other D3D versions
2013-09-28 14:07:14 -07:00
Sam Lantinga
cf5e5a8360
Added a hint to create the D3D device in thread-safe mode: SDL_HINT_RENDER_DIRECT3D_THREADSAFE
2013-09-28 14:07:08 -07:00
Sam Lantinga
803965bcc2
Added platform specific call: SDL_RenderGetD3DDevice()
2013-09-28 14:07:05 -07:00
Sam Lantinga
9f390e7967
Moved SDL_Direct3D9GetAdapterIndex() to SDL_windowsvideo.c since it doesn't belong in the window code.
2013-09-28 14:06:59 -07:00
Sam Lantinga
89c31bb42a
Implemented SDL_UpdateYUVTexture() for Direct3D
2013-09-28 14:06:55 -07:00
Sam Lantinga
17c9ff85e2
Added missing SDL_assert.h
2013-09-28 14:06:51 -07:00
Sam Lantinga
57bd514707
Added optimized YUV texture upload path with SDL_UpdateYUVTexture()
2013-09-28 14:06:47 -07:00
Sam Lantinga
b6be1435c5
Moved D3D_LoadDLL and SDL_Direct3D9GetAdapterIndex to SDL_windowswindow.c at Jorgen's insistence. That file is wrapped in a more appropriate define check so it will work if somebody builds a binary without D3D support.
...
Added a reference to SDL_Direct3D9GetAdapterIndex to SDL_test_common.c so SDL will fail to compile if the new symbol isn't included properly.
CR: Jorgen
2013-09-28 14:06:20 -07:00
Edward Rudd
869a707612
add in High DPI support (aka Retina)
...
- based on J?rgen's patch with a few bug fixes
2013-09-20 13:43:00 -04:00
Sam Lantinga
fae4190dca
Added SDL_Direct3D9GetAdapterIndex(), which returns the adapter index you would pass into CreateDevice to get your device on the right monitor in full screen mode. This fixes the default adapter in SDL_render_d3d.c, which means that tests will work fullscreen off the main monitor now.
...
CR: Sam
2013-09-13 17:42:46 -07:00
Gabriel Jacobo
ace1e98a18
Fixes bug #2040 , prepare SDL_GL_CONTEXT_EGL for deprecation on v2.1
...
SDL_GL_CONTEXT_EGL = 1 is now internally treated as profile_mask = SDL_GL_CONTEXT_PROFILE_ES
2013-08-29 15:02:32 -03:00
Sam Lantinga
3e2930defe
Christoph Mallon: Remove pointless if (x) before SDL_FreeSurface(x)
2013-08-29 08:29:51 -07:00
Sam Lantinga
f79fc33a39
Christoph Mallon: Remove pointless if (x) before SDL_free(x)
2013-08-29 08:29:21 -07:00
Gabriel Jacobo
f60bcf8b50
Fix warning in GL ES2 renderer
2013-08-22 17:26:22 -03:00
Gabriel Jacobo
2490166d2d
Fixes for -Wdeclaration-after-statement
2013-08-21 10:12:16 -03:00
Gabriel Jacobo
1e49b1ed6e
OCD fixes: Adds a space after /* (glory to regular expressions!)
2013-08-21 09:47:10 -03:00
Gabriel Jacobo
695344d163
OCD fixes: Adds a space before */
2013-08-21 09:43:09 -03:00
Gabriel Jacobo
552b04c58a
More non C89 compliant comments
2013-08-20 20:34:40 -03:00
Ryan C. Gordon
b44267693d
Fixed leaking of pixel shader object in D3D renderer (thanks, Peter!).
...
Fixes Bugzilla #2047 .
2013-08-19 11:02:44 -04:00
Sam Lantinga
1455a94714
Fixed Windows build
2013-08-17 17:14:15 -07:00
Sam Lantinga
6995ff18d3
Do full state initialization in D3D_Reset(), this fixes blend mode issues when resizing the window on Windows 8.
2013-08-17 09:54:30 -07:00
Gabriel Jacobo
bb2671b7e7
Android quirk:Some devices don't report GL_OES_framebuffer_object but support it
2013-08-16 14:38:04 -03:00
Ryan C. Gordon
4cb0ead795
Patched to compile.
2013-08-16 12:51:29 -04:00
Gabriel Jacobo
02868b6903
[Bug 2042] OpenGL ES renderer tries to load OES functions unconditionally
...
Also, fail more gracefully when creating texture to avoid double free errors.
2013-08-16 13:37:27 -03:00
Gabriel Jacobo
dad420670f
Fixes #2022 , do not resume on Android when surfaceChanged
...
If the app is in landscape mode and the user presses the power button, a pause
is followed immediately by a surfaceChanged event because the lock screen
is shown in portrait mode. This triggers a "false" resume.
So, we just pause and resume following the onWindowFocusChanged events.
Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before
blocking the event pump.
2013-08-12 11:13:50 -03:00