On Tue, Jan 11, 2005 at 11:37:48AM +0900, Sasayama wrote:
> Denis Oliver Kropp wrote:
> 
> >Quoting Sasayama:
> > 
> >
> >>Is it possible to implement IDirectFBSurface::TextureTriangles without
> >>non-power-of-two textures? I could not find an explicit way to create a
> >>surface for texture mapping.
> >>   
> >>
> >
> >You can use any surface as a texture if the format is supported.
> >
> >However, at least on Matrox the supported texture size is 8x8 - 2048x2048.
> >
> >So you can use e.g. 395x831 or 800x600, but I had problems with big 
> >textures
> >on CLE266, maybe the driver is not 100% correct.
> >
> > 
> >
> I just wanted to implement TextureTriangles in an experimental driver 
> I'm now working.  The hardware does not support non-power-of-two 
> textures so any texture size must be power of two (eg 256, 512, 1024, or 
> somthing, not 300 nor 500).  Is such a hardware supported in the current 
> design?

Mach64 uses power-of-two textures but the driver doesn't support 
TextureTriangles() for now. I played with it a bit at one point but didn't 
get it working right.

You can set the hardware limits via 
device_info->limits.surface_max_power_of_two_{bytepitch,pixelpith}. If 
either one of those is set (and the surface height is below 
max_power_of_two_height, which you must set also) the memory allocator 
will use power of two pitch.

That approach works quite well for blitting since the coordinates will get 
clipped. But with triangles you should get ugly results if you specify 
texture coordinates beyond 1.0.

-- 
Ville Syrj�l�
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/


Reply via email to