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:53:21 +0100

On Thu, Mar 24, 2005 at 07:25:16PM +0000, Per Inge Mathisen wrote:
> Here is a suggestion for changes to the ftwl backend API, attached as a
> diff. If you agree with these changes, I will start writing the OpenGL
> backend code to implement it; however I am not able to fix the higher
> level ftwl code (windowing etc).

> -void be_multiply_alphas(struct Sprite *dest_sprite,
> -                     const struct Sprite *src_sprite,
> -                     const struct ct_point *src_pos);

Easy.

> -void be_copy_osda_to_osda(struct osda *dest,
> -                       struct osda *src,
> -                       const struct ct_size *size,
> -                       const struct ct_point *dest_pos,
> -                       const struct ct_point *src_pos);
> +/* Copy canvas to back buffer */
> +void be_buffer_canvas(struct be_canvas *src,
> +                   const struct ct_size *size,
> +                   const struct ct_point *dest_pos,
> +                   const struct ct_point *src_pos);

So I can't copy a canvas to another one? Can't you implement this with
some magic?

Idea for implementation: the opengl backend records the drawing
operations done to an osda. If this osda is drawn to the big screen
these drawing actions are executed.

> -bool be_is_transparent_pixel(struct osda *osda, const struct ct_point *pos);

That is too hard. General OpenGL must support something for this case.

> +void be_flip_buffers(void); /* move back buffer to front buffer */

No idea what this should be.

> +void be_write_canvas_to_file(struct be_canvas *canvas, const char *filename);

Are you sure you can implement this?

        Raimar

-- 
 email: i-freeciv-lists@xxxxxxxxxxxxx
 "On the eigth day, God started debugging"



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