Multiple viewport in SDL 2?

Is possible to create multiple viewport in renderer with SDL_RenderSetViewport?
My goal is create viewport which similiar with region drawing in GDI.

Thanks in advance

cant you just accomplish what you want by calling SDL_RenderSetViewport before each set of operations?

cant you just accomplish what you want by calling SDL_RenderSetViewport
before each set of operations?

I’m converting a GUI (www.msegui.org) to SDL 2. And in msegui we use
region drawing (multiple rectangle). This region is similiar with
region in windows
(http://msdn.microsoft.com/en-us/library/windows/desktop/dd162916(v=vs.85).aspx).

this function is similiar with stencil buffer in OpenGL.

The functionality is limit drawing area, I use SDL_RenderSetViewport
and it’s OK, but sometimes we use multiple rectangle.

Or maybe any others function from SDL2 for this goal?

thanks

It is currently not possible.

You can however, set a viewport, draw on it, then set another viewport,
draw on it etc. Finally call SDL_RenderPresent() to update everything at
once.On 15-09-2012 02:25, wahono sri wrote:

Is possible to create multiple viewport in renderer with SDL_RenderSetViewport?
My goal is create viewport which similiar with region drawing in GDI.

Thanks in advance


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Pallav Nawani
Game Designer/CEO
http://www.ironcode.com
Twitter: http://twitter.com/Ironcode_Gaming
Facebook: http://www.facebook.com/Ironcode.Gaming