Derek Leach
|
Re: RE: gf_surface_create and incorrect stride
|
Derek Leach
03/26/2009 3:51 AM
post25275
|
Re: RE: gf_surface_create and incorrect stride
> It can be a solution. But gf_surface_attach needs a preallocated memory area.
> If I have an image the memory area is available (like the image example), but
> in other cases I need to allocate an area of memory that is in conformance
> with the passed format. Is it right?
With gf_surface_attach(), it does not matter where the memory comes from, malloc, shmem, or vram ... but yes, you have
to make surface the format corresponds to the bpl (stride), width, and height.
But going back to your original question, do not be worried if you have a stride for the created surface, which is much
larger than the width you specified.
-Derek
|
|
|