Hello,
I just submitted a new bug:
https://bugzilla.libsdl.org/show_bug.cgi?id=2625
could anyone with Direct3D knowledge have a look to it please?
I supplied the fix but it needs to be checked as I dont know much about D3D.
Thanks you very much!
Regards
Roberto
Hi, after performing more tests I realized the issue wasnt on the SDL code, it was on the way I create textures so I closed the SDL bug. However, I think it will be useful for the community if I shared with you how you wouldnt create the textures when they are SDL_TEXTUREACCESS_TARGET. Before that, I was using these two methods: SDL_Texture *pTex = SDL_CreateTexture(pRenderer, iFormat, SDL_TEXTUREACCESS_TARGET, pSurf->w, pSurf->h); SDL_UpdateTexture(pTex, NULL, pSurf->pixels, pSurf->pitch); and it was fine for OpenGL and software renderers but fails with Direct3D. Having a look to the documentation I read that SDL_UpdateTexture() is intended for SDL_TEXTUREACCESS_STATIC but didnt says that SDL_TEXTUREACCESS_TARGET does not work… Checking the SDL testrendertarget.c code, I saw that it is not using SDL_UpdateTexture() at all and uses something like this: SDL_Texture *pTex = SDL_CreateTexture(pRenderer, iFormat, SDL_TEXTUREACCESS_TARGET, pSurf->w, pSurf->h); SDL_Texture *pTexTmp = SDL_CreateTextureFromSurface(pRenderer, pSurf); SDL_SetRenderTarget(pRenderer, pTex); SDL_RenderCopy(pRenderer, pTexTmp, NULL, NULL); SDL_SetRenderTarget(pRenderer, NULL); SDL_DestroyTexture(pTexTmp); so I used this way of creating the texture and it worked! Hope it can help you, it was driving me crazy!!! Regards Roberto ----Mensaje original---- De: @Roberto_Prieto Fecha: 04/07/2014 21:09 Para: Asunto: [SDL] Direct3D and SDL_TEXTUREACCESS_TARGET textures problems (bug submitted!)
Hello,
I just submitted a new bug:
https://bugzilla.libsdl.org/show_bug.cgi?id=2625
could anyone with Direct3D knowledge have a look to it please?
I supplied the fix but it needs to be checked as I dont know much about D3D.
Thanks you very much!
Regards
Roberto