DirectFB - Home of the pragmatist Roadmap


[directfb-users] Re: Portrait mode display.
Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[directfb-users] Re: Portrait mode display.



Quoting Ville Syrjälä:
> > Hmm, I don't even see how a rectangle is drawn in df_texture, if the entire 3D 
> > system works with triangles. 3D newbie for sure..
> 
> This small example should draws a rectangle with the full texture mapped 
> on it.
> 
> DFBVertex vertices[4] = {
>  { x,     y,     0.0, 1.0, 0.0, 0.0 },
>  { x+w-1, y,     0.0, 1.0, 1.0, 0.0 },
>  { x+w-1, y+h-1, 0.0, 1.0, 1.0, 1.0 },
>  { x,     y+h-1, 0.0, 1.0, 0.0, 1.0 }
> };

That's right, you don't need ve.c for this simple case.

But I think the right and bottom pixels are not inclusive,
so you'd have to use "x+w" instead of "x+w-1" etc.

Oh, and the rotation of the image is missing (last two
values of each row have to be changed, i.e. tex coords).

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH




Home | Main Index | Thread Index


directfb.org / Development / Old Archives