Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2003:
[Freeciv-Dev] Re: city text , sdl widgets and rock & roll ( was Re: (PR#
Home

[Freeciv-Dev] Re: city text , sdl widgets and rock & roll ( was Re: (PR#

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: city text , sdl widgets and rock & roll ( was Re: (PR#2858) )
From: "Rafa³ Bursig via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 23 Jan 2003 16:56:42 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Dnia 2003.01.23 18:00 Jason Short via RT napisa³(a):
> Rafa³ Bursig via RT wrote:
> > Dnia 2003.01.23 02:45 Jason Short via RT napisa³(a):
> >
> >>Rafa³ Bursig via RT wrote:
> 
> > If I have next buffer to city text or widgets then this buffer must
> > be 32bit surfaces becouse all city text and widgets use ALPHA 
> chanel.
> > City text use AA and are full 32bit surfaces and widgets have 
> screen bit
> > coding but have global alpha variable.
> >
> > And this slow down drawing if screen has 8bit or 16 bit pixel
> > coding. ( almost all video card use 32bit insteed 24bit ( totaly 
> horror )
> > but this give lose 8bit per pixel (without alpha) or rgb is 10 12 
> 10 )
> >
> > Fastest draw is when both surfaces ( "src" and "dst" ) has the same
> > pixel coding.
> > (SDLClient convert all loades graphics to screen format )
> 
> Okay, but...
> 
> Using a second buffer may slow the drawing down (or maybe not...since
> it means only one display refresh instead of two, and you have to 
> redraw
> the map widgets much less often), but unless you do it I don't see how
> you can avoid drawing problems: namely, the flicker of the widgets as
> they are redrawn, and that partial canvas updates will overwrite the
> widgets.
> 

Jason wait a moment ...

Primo : How should I do it when all main draw functions are outside gui 
depended code ?

Secundo :
I don't know gtk API and only suspect about which "buffer" you speak 
now.

I suspect that you want have :
1) main screen/display buffer - gtk use funct. gtk_flush() to flush 
this buffer to framebuffer.
2) map buffer - terrain, cities , units are draw here.
3) city text/widgets buffer -  city descriptions or sdl widgets should 
be draw here.

   update_map_canvas(..., FALSE) - will redraw 2)
   show_city_descriptions() - will redraw 3)
   flush_mapcanvas_full() - will draw 2) -> 1) and 3) -> 1) and call 
gtk_flush() ( copy 1) to framebuffer )

but here is small problem :   show_city_descriptions() is "common" 
function.

I propose :
1) main screen/display buffer. 2) map buffer - terrain, cities , units 
are draw here.

   update_map_canvas(..., TRUE) - will redraw 2) and draw it to 1)
   update_city_descriptions( FALSE ) - will draw city text /widgets to 
1)
   flush_screen() - call gtk_flush() ( copy 1) to framebuffer )

Rafal

----------------------------------------------------------------------
Rajd MONTE CARLO >>> http://link.interia.pl/f16c1
Najswiezsze doniesienia, zapowiedzi, relacje, galerie zdjec, atrakcje!





[Prev in Thread] Current Thread [Next in Thread]