Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: Using opengl in ftwl
Home

[Freeciv-Dev] Re: Using opengl in ftwl

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Per Inge Mathisen <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Using opengl in ftwl
From: Raimar Falke <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 24 Mar 2005 20:26:36 +0100

On Thu, Mar 24, 2005 at 07:07:47PM +0000, Per Inge Mathisen wrote:
> > > This means we need a clear separation and abstraction between unchangable
> > > graphics sources (textures) and the destination (the OpenGL back buffer).
> > > In ftwl this separation is not yet present.
> 
> 1. We need to separate out the back buffer as a special case, instead of
> as any other osda as it is now.

I would also say easy.

> 2. We need to add a clear separation between "constant" graphics sources
> and the "target" buffer, which is either a number of pixel buffers (ftwl
> as of now) or a 3D drawing buffer (OpenGL).

FTWL right now has three types of graphical data: sprites, osda and
the screen (the target buffer). You want to remove all the
osdas. Right?

> 3. Dirty rectangles must be optional. OpenGL has no use of it, since it
> redraws everything anyway.

Easy.

> > In general: a window widget has a OSDA as the backing store. All
> > elements of the window draw on this. The window than may draw into the
> > parent backing store. There is a root window.
> >
> > No idea how this can be supported with opengl.
> 
> Instead of drawing into a pixel buffer backing store, the OpenGL backend
> would draw directly into the OpenGL back buffer, with scissors testing so
> that anything that falls outside the window dimensions is cut. The given
> z-dimension would allow OpenGL to do its own z-ordering of the drawing.

It would be nice if you can do this without changing the drawing code.

> > > The code using be_is_transparent_pixel() needs a different mechanic
> > > altogether (it is used to find click-throughs on windows).
> >
> > How?
> 
> I don't know. Is it really necessary? From what I can tell, we could
> instead assign click-through-ableness as a property of the window, instead
> of each pixel. We are not likely to have large, non-rectangular objects
> that need precision clicking.

Take the http://www.freeciv.org/~rfalke/fs8_pics/screen-0002.png. It
shouldn't work if I right click to drag the map on the round buttons
at the left side or on the bottom bar.

I want to keep this feature. We may have to disable it in the opengl
backend but I'm against removing it completely.

        Raimar

-- 
 email: i-freeciv-lists@xxxxxxxxxxxxx
 "If at first you don't succeed... well so much for skydiving."



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