[SDL] [SDL2] Resize issues

Flamaros flamaros.xavier at gmail.com
Tue Mar 19 14:16:42 PDT 2013


Certainly, for the moment I call glViewport each frame.


Forest Hale wrote:
> Don't forget to call glViewport also, with the new size.
> 
> On 03/18/2013 12:21 PM, Jonathan Dearborn wrote:
> 
> > Maybe try to draw, swap buffers, then draw again?  If disabling double-buffering helped, then this is probably what you need to do.
> > 
> > Jonny D
> > 
> > 
> > On Mon, Mar 18, 2013 at 3:14 PM, Flamaros <flamaros.xavier at gmail.com <mailto:flamaros.xavier at gmail.com>> wrote:
> > 
> > __
> > 
> > 
> > 
> > Gabriele Greco wrote:	
> > 
> > 
> > 
> > 
> > Quote:	
> > 
> > Yes I had try to force repaint, by calling explicitly my draw method on resize event with no effect. I know it's necessary to do it with win32 API.
> > I really need that feature as I am not doing a game.
> > 
> > 	
> > 
> > 
> > 
> > I'm quite sure yoy don't need to redraw on the resize event, I think it's enough to redraw on the SDL_WINDOWEVENT_EXPOSE that you'll receive once the resize is occurred.
> > 
> > 
> > You have to use the resize event (SDL_WINDOWEVENT_RESIZED) only to get your new surface size.
> > 
> > 
> > 
> > -- 
> > Ing. Gabriele Greco, DARTS Engineering
> > Tel: +39-0100980150  Fax: +39-0100980184
> > s-mail: Piazza Della Vittoria 9/3 - 16121 GENOVA (ITALY)
> > 	
> > 
> > 
> > 
> > 
> > 
> > Add a draw call on SDL_WINDOWEVENT_EXPOSE event don't change anything.
> > You may notice I am using Opengl and after the SDL_PollEvent loop I always call my draw method.
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> > 
> > 
> > 
> > 
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> > 
> > 
> 
> 
> -- 
> LordHavoc
> Author of DarkPlaces Quake1 engine - http://icculus.org/twilight/darkplaces
> Co-designer of Nexuiz - http://alientrap.org/nexuiz
> "War does not prove who is right, it proves who is left." - Unknown
> "Any sufficiently advanced technology is indistinguishable from a rigged demo." - James Klass
> "A game is a series of interesting choices." - Sid Meier
> 
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130319/9d073ac7/attachment-0009.htm>


More information about the SDL mailing list