SDL2 direct3d renderer and Windows XP |
Gabriele Greco
Guest
|
Does the "direct3d" renderer still supports windows XP?
I've not seen notice anywhere that SDL dropped XP.... I've a minimal program that updates a texture in a loop that using both mingw-w64 2.0.3 binaries from libsdl.org and with self compiled HG head binaries does work with software renderer but does not with the default accelerated one (direct3d), while it works perfectly on a wide range of windows 7 machines (and linux removing outputdebugstring stuff). The program is supposed to show a white line moving on a black background, in windows XP it just displays a black window. The code is here (excuse the indent but I tried to keep it small), maybe it's a problem with mingw64 build, can someone try to build it with visual studio and check if it works? #include "SDL.h" #include "debugapi.h" int SW=352, SH=288; int main(int argc, char *argv[]) { Â Â OutputDebugString("Start!"); Â Â if (SDL_Init(SDL_INIT_VIDEO)) { OutputDebugString(SDL_GetError()); return 0; } Â Â SDL_Window *w = SDL_CreateWindow("Test", 100, 100, SW, SH, SDL_WINDOW_RESIZABLE); Â Â if (!w) { OutputDebugString(SDL_GetError()); return 0; Â } Â Â SDL_Renderer *r = SDL_CreateRenderer(w, -1, Â SDL_RENDERER_ACCELERATED|SDL_RENDERER_PRESENTVSYNC /* WORKS replacing the previous flags with SDL_RENDERER_SOFTWARE */); Â Â if (!r) { OutputDebugString(SDL_GetError()); return 0; } Â Â SDL_RendererInfo info; Â Â SDL_GetRendererInfo(r, &info); Â Â OutputDebugString(info.name); Â Â SDL_Texture *t = SDL_CreateTexture(r, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_STATIC, Â SW, SH); Â Â if (!t) { OutputDebugString(SDL_GetError()); return 0; } Â Â Uint8 *v = (Uint8*)SDL_malloc(SW * SH * 3 / 2); Â Â memset(v, 0, SW * SH * 3 / 2); Â memset(v + SW * SH, 127, SW * SH / 2); Â Â Uint8 *y = v; Â Â OutputDebugString("Starting loop!"); Â Â while(1) { Â Â Â Â SDL_Event e; Â Â Â Â while (SDL_PollEvent(&e)) { Â Â Â Â Â Â if ( (e.type == SDL_KEYUP && e.key.keysym.sym == SDLK_ESCAPE) || Â Â Â Â Â Â Â Â Â (e.type == SDL_WINDOWEVENT && e.window.event == SDL_WINDOWEVENT_CLOSE)) Â { Â Â Â Â Â Â Â Â OutputDebugString("Quit!"); Â Â Â Â Â Â Â Â SDL_Quit(); Â Â Â Â Â Â Â Â return 0; Â Â Â Â Â Â } Â Â Â Â } Â Â Â Â y += SW; Â Â Â Â memset(v, 0, SW * SH); memset(y, 255, SW * 50); Â Â Â Â if ((y + 50 * SW) >= (v + SW * SH)) y = v; Â Â Â Â SDL_UpdateYUVTexture(t, NULL, v, SW, v + (SW*SH), SW/2, v + (SW*SH*5/4), SW/2); Â Â Â Â SDL_RenderCopy(r, t, NULL, NULL); Â Â Â Â SDL_RenderPresent(r); Â Â } } -- Bye, Â Gabry |
|||||||||||
|
SDL2 direct3d renderer and Windows XP |
Sik
|
2015-09-24 5:42 GMT-03:00, Gabriele Greco:
Isn't that the Direct3D 9 one? It should in that case if it isn't calling something new in the Windows API.
Yeah, although I wonder if anybody has checked that this is 100% the case among SDL. I know that with the binaries I had used with Sol, it would work even on Windows 98 with KernelEx as long as you stubbed two more functions (AllocConsole and FreeConsole). Not sure if this is still true in the custom 2.0.4 the final version shipped (yes, Sol is using something between 2.0.3 and 2.0.4 I needed that iBus support on Linux!) There's also the question about whether it's still worth supporting, but then again the OpenGL 1.x fixed pipeline is still supported as well as far as I know... _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
SDL2 direct3d renderer and Windows XP |
Gabriele Greco
Guest
|
On Wed, Sep 30, 2015 at 12:22 AM, AntTheAlchemist wrote:
Can you try if the provided code (in the original topic) on your system shows a white line moving on a black window or not? Maybe it's only an issue in the shader with old video hardware and not an OS problem. -- Bye, Â Gabry |
|||||||||||||
|