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.



Hi,

On Thursday 12 August 2004 10:57 pm, Ville Syrjälä wrote:
> Some OpenGL / D3D tutorial maybe. The OpenGL specification may have some
> useful information too.

I'm going through the NeHe OpenGL tutorials now, pretty OK. They're at 
http://nehe.gamedev.net/default.asp, for other 3D newbie's information :)

> 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 }
> };
>
> surf->TextureTriangles( surf, tex, vertices, NULL, 4, DTTF_FAN );
>
> If you don't want to use DTTF_FAN for some reason you can draw it as two
> triangles like so:
>
> int indices[6] = { 0, 2, 3, 0, 1, 2 };
> surf->TextureTriangles( surf, tex, vertices, indices, 6, DTTF_LIST );

Not sure what FAN vs. LIST is yet, but I'll come across it I guess.

The tutorials mention that the texture dimensions have to be a power of 2. 
Does that mean I have to resort to splitting trickery in order to rotate my 
(worst case) 1280x768 texture 90 degrees?

Cheers!

     Rob

-- 
aibohphobia
      n. : fear of palindromes




Home | Main Index | Thread Index


directfb.org / Development / Old Archives