The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL1/OGL To SDL2/DX Conversion-"glScissor" Alterna
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
SDL1/OGL To SDL2/DX Conversion-"glScissor" Alternative?

Hi,

My development team and I are currently converting a word game from SDL1/OpenGL to SDL2/DirectX.
It will be a Microsoft Windows only game when finished.

We were using the OpenGL command "glScissor" to only draw parts of the game playing screen to improve performance.
Is there some similar command in SDL2/DirectX?

We are targeting Microsoft Windows XP, Vista, 7, 8, & 10 and dirty rectangle drawing optimization will be necessary for Win XP users.
Let us know, thanks!

Top Secret Development Screenshot:
http://16bitsoft.com/images/temp/LFR-LettersAreWorking-01.png
SDL1/OGL To SDL2/DX Conversion-"glScissor" Alterna
Jonny D


Joined: 12 Sep 2009
Posts: 932
Google's top result says to look at this method:https://msdn.microsoft.com/en-us/library/windows/desktop/bb174457%28v=vs.85%29.aspx



Also, SDL2 has a clip rect setting:
https://wiki.libsdl.org/SDL_RenderSetClipRect



If you look it up in the SDL source, you'd find that D3D_UpdateClipRect() has it laid out for you.


Jonny D








On Tue, Apr 21, 2015 at 12:42 AM, JeZ-l-Lee wrote:
Quote:
SDL1/OGL To SDL2/DX Conversion-"glScissor" Alternative?

Hi,

My development team and I are currently converting a word game from SDL1/OpenGL to SDL2/DirectX.
It will be a Microsoft Windows only game when finished.

We were using the OpenGL command "glScissor" to only draw parts of the game playing screen to improve performance.
Is there some similar command in SDL2/DirectX?

We are targeting Microsoft Windows XP, Vista, 7, 8, & 10 and dirty rectangle drawing optimization will be necessary for Win XP users.
Let us know, thanks!

Top Secret Development Screenshot:
http://16bitsoft.com/images/temp/LFR-LettersAreWorking-01.png



JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Re: SDL1/OGL To SDL2/DX Conversion-"glScissor" Alt
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
Jonny D wrote:
... Also, SDL2 has a clip rect setting:
https://wiki.libsdl.org/SDL_RenderSetClipRect
Hi,

I think that should work, thanks for the info!