#include <BufferFillingHelper.h>
Public Member Functions | |
BufferFillingHelper (void) | |
~BufferFillingHelper (void) | |
Static Public Member Functions | |
static unsigned int __stdcall | fillBufferSegments (void *params) |
static void * | fillBufferSegmentsVoid (void *params) |
static void | multithreadFill (Quad2f *quads, unsigned int numThreads, unsigned int offset, unsigned int nQuadsAdjustment) |
Classes | |
struct | ArrayQuad2f |
struct | Quad2f |
BufferFillingHelper::BufferFillingHelper | ( | void | ) |
Constructs a buffer filling helper.
BufferFillingHelper::~BufferFillingHelper | ( | void | ) |
Destroys this buffer filling object.
unsigned int __stdcall BufferFillingHelper::fillBufferSegments | ( | void * | params | ) | [static] |
Fills the buffer segments with an array of quads passed as parameter. It is meant to be called in a separate thread.
params | the array of quads to be filled. |
void * BufferFillingHelper::fillBufferSegmentsVoid | ( | void * | params | ) | [static] |
Utility wrapper method which calls fillBufferSegments(void*), except the returned variable is discarded. This method was created for use with pthreads.
params | the array of quads to be filled. |
void BufferFillingHelper::multithreadFill | ( | Quad2f * | quads, | |
unsigned int | numThreads, | |||
unsigned int | offset, | |||
unsigned int | nQuadsAdjustment | |||
) | [static] |
Fills a buffer with the values given by the array of quads using multithreading.
quads | the array of quads to be filled. | |
numThreads | the number of threads to be created. | |
offset | the offset in the quads array for the data to be used for each thread. | |
nQuadsAdjustment | the adjustment done to the number of quads for the last thread. |