本文整理汇总了C++中MemoryBuffer::setCreatedState方法的典型用法代码示例。如果您正苦于以下问题:C++ MemoryBuffer::setCreatedState方法的具体用法?C++ MemoryBuffer::setCreatedState怎么用?C++ MemoryBuffer::setCreatedState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MemoryBuffer
的用法示例。
在下文中一共展示了MemoryBuffer::setCreatedState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: executeRegion
void WriteBufferOperation::executeRegion(rcti *rect, unsigned int tileNumber)
{
MemoryBuffer *memoryBuffer = this->m_memoryProxy->getBuffer();
float *buffer = memoryBuffer->getBuffer();
if (this->m_input->isComplex()) {
void *data = this->m_input->initializeTileData(rect);
int x1 = rect->xmin;
int y1 = rect->ymin;
int x2 = rect->xmax;
int y2 = rect->ymax;
int x;
int y;
bool breaked = false;
for (y = y1; y < y2 && (!breaked); y++) {
int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS;
for (x = x1; x < x2; x++) {
this->m_input->read(&(buffer[offset4]), x, y, data);
offset4 += COM_NUMBER_OF_CHANNELS;
}
if (isBreaked()) {
breaked = true;
}
}
if (data) {
this->m_input->deinitializeTileData(rect, data);
data = NULL;
}
}
else {
int x1 = rect->xmin;
int y1 = rect->ymin;
int x2 = rect->xmax;
int y2 = rect->ymax;
int x;
int y;
bool breaked = false;
for (y = y1; y < y2 && (!breaked); y++) {
int offset4 = (y * memoryBuffer->getWidth() + x1) * COM_NUMBER_OF_CHANNELS;
for (x = x1; x < x2; x++) {
this->m_input->readSampled(&(buffer[offset4]), x, y, COM_PS_NEAREST);
offset4 += COM_NUMBER_OF_CHANNELS;
}
if (isBreaked()) {
breaked = true;
}
}
}
memoryBuffer->setCreatedState();
}