A Buffer layout in client memory for transferring pixels to or from GPU. More...
#include <Buffer.h>
Public Member Functions | |
Parameters () | |
Creates a new buffer layout with default parameter values. | |
bool | swapBytes () const |
Returns true if little endian mode is used. | |
bool | leastSignificantBitFirst () const |
Returns true if least significant bit is first. | |
GLint | alignment () const |
Returns the alignment of data in memory. | |
GLsizei | compressedSize () const |
Returns the compressed size in bytes of the pixels. | |
vec3< GLint > | subImage2D () const |
Returns the 2D subpart of the buffer that must be used for transferring pixels. | |
vec2< GLint > | subImage3D () const |
Returns the 3D subpart of the buffer that must be used for transferring pixels. | |
Parameters & | swapBytes (bool swapBytes) |
Sets the endianness mode to use. | |
Parameters & | leastSignificantBitFirst (bool leastSignificantBitFirst) |
Sets the bit ordering mode to use. | |
Parameters & | alignment (GLint alignment) |
Sets the alignment of data in memory. | |
Parameters & | compressedSize (GLsizei compressedSize) |
Returns the size in bytes of the compressed pixels. | |
Parameters & | subImage2D (GLint skipPixels, GLint skipRows, GLint rowLength) |
Sets the 2D subpart of the buffer that must be used for transferring pixels. | |
Parameters & | subImage3D (GLint skipImages, GLint imageHeight) |
Sets the 3D subpart of the buffer that must be used for transferring pixels. |
A Buffer layout in client memory for transferring pixels to or from GPU.
ork::Buffer::Parameters::Parameters | ( | ) |
Creates a new buffer layout with default parameter values.
Parameters& ork::Buffer::Parameters::alignment | ( | GLint | alignment | ) |
Sets the alignment of data in memory.
alignment | the alignment of data in memory. |
GLint ork::Buffer::Parameters::alignment | ( | ) | const |
Returns the alignment of data in memory.
Default is 4 bytes.
Parameters& ork::Buffer::Parameters::compressedSize | ( | GLsizei | compressedSize | ) |
Returns the size in bytes of the compressed pixels.
compressedSize | the size in bytes of the compressed pixels, or 0 if the buffer data is not compressed. |
GLsizei ork::Buffer::Parameters::compressedSize | ( | ) | const |
Returns the compressed size in bytes of the pixels.
Default is 0, meaning that the buffer contains uncompressed data.
Parameters& ork::Buffer::Parameters::leastSignificantBitFirst | ( | bool | leastSignificantBitFirst | ) |
Sets the bit ordering mode to use.
leastSignificantBitFirst | true if least significant bit is first. |
bool ork::Buffer::Parameters::leastSignificantBitFirst | ( | ) | const |
Returns true if least significant bit is first.
Default is false.
Parameters& ork::Buffer::Parameters::subImage2D | ( | GLint | skipPixels, | |
GLint | skipRows, | |||
GLint | rowLength | |||
) |
Sets the 2D subpart of the buffer that must be used for transferring pixels.
skipPixels | the x origin of the subpart to transfer. | |
skipRows | the y origin of the subpart to transfer. | |
rowLength | the total width of the image. |
vec3<GLint> ork::Buffer::Parameters::subImage2D | ( | ) | const |
Returns the 2D subpart of the buffer that must be used for transferring pixels.
Default is whole buffer.
Parameters& ork::Buffer::Parameters::subImage3D | ( | GLint | skipImages, | |
GLint | imageHeight | |||
) |
Sets the 3D subpart of the buffer that must be used for transferring pixels.
skipImages | the z origin of the subpart to transfer. | |
imageHeight | the total height of the image. |
vec2<GLint> ork::Buffer::Parameters::subImage3D | ( | ) | const |
Returns the 3D subpart of the buffer that must be used for transferring pixels.
Default is whole buffer.
Parameters& ork::Buffer::Parameters::swapBytes | ( | bool | swapBytes | ) |
Sets the endianness mode to use.
swapBytes | true to use little endian mode. |
bool ork::Buffer::Parameters::swapBytes | ( | ) | const |
Returns true if little endian mode is used.
Default is false.