Re: [AD] fixes for some al_resize_display cases in Windows

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Fri, 13 Jul 2012 23:27:23 +0200
Dennis-Busch@xxxxxxxxxx wrote:

Hm. The code is broken right now. And works with your patch. I'm still
not comfortable applying it since I don't understand what it does at
all. So it's probably best if Trent looks over it first. Else I'll at
least wait until I find time to boot into Windows and re-produce all
the issues.

Maybe you can also explain what your changes do below?

> New patch is attached (also fixes OpenGL bitmap preservation between 
> fullscreen mode changes now:
> https://sourceforge.net/tracker/?func=detail&aid=3543463&group_id=5665&atid=105665
> ).
> 
> Patch notes:
> * fixed missing/incorrect resize events under Windows   in
>  Direct3D and OpenGL displays (could be seen in
>  ex_display_events)
> 

Which part of the patch does that?

> * fixed a case where changing fullscreen mode in D3D via
> al_resize_display caused a crash and loss of loaded bitmaps
> information causing the bitmap not to be converted and thus
> disappearing after mode change (problem could be observed running
> ex_fs_resize)

Same.

> 
> * fixed a case where changing fullscreen mode in OpenGL(Windows) via
>   al_resize_display cause nothing at all to be rendered after the
> mode change
> 

What was the problem, and how does the patch fix it?

> * fixed OpenGL(Windows) bitmap preservation between fullscreen mode
> changes (problem could be observed running ex_fs_resize with an
> OpenGL display) (major credits to Elias who helped debugging this
> through screenshots of debugger states and by providing tons of
> knowledge)
> 

Is it ok to call _al_opengl_backup_dirty_bitmaps in every
al_flip_display? It seems to be what IOS does as well so probably no
performance problem.

But a comment about it would be nice. Stating that this is not
necessary (since WGL can *never* lose a texture) - but just simplifies
code elsewhere to have the bitmap synched to memory.

Also, at one point you just set the refresh rate to 0. Will it still
honor the refresh rate possibly requested by the user?




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/