Creating surfaces
Surfaces are an object representation of image data buffers. They play the main role in the texture management process. Every image you load needs to be placed onto the surface first. After this, you can use this surface to render your image onto the screen, store it into graphical memory, or do some image manipulation.
Getting ready
Every surface consists of a pixel format description and binary data. The surface object structure is shown in the following table:
Field names |
Description |
---|---|
|
This is the bit mask description of surface properties. |
|
This is the surface pixel format. |
|
This is the surface width in pixels. |
|
This is the surface height in pixels. |
|
This is the length of the surface scanline in bytes. It specifies how many bytes are used to store a single line surface content and it's used mostly in surface blitting operations. The pitch value is always dividable by 4 to optimize surface processing speed. |
|
This is the pointer... |