Show bufferregion.h syntax highlighted
/***************************************************************************
bufferregion.h - Abstract representation of memory region
-------------------
begin : Thu Apr 24 2003
copyright : (C) 2003 by Reality Rift Studios
email : mattias@realityrift.com
***************************************************************************
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is the NeoEngine, NeoDevOpenGL, bufferregion.cpp
The Initial Developer of the Original Code is Mattias Jansson.
Portions created by Mattias Jansson are Copyright (C) 2003
Reality Rift Studios. All Rights Reserved.
***************************************************************************/
#ifndef __NEOGLBUFFERREGION_H
#define __NEOGLBUFFERREGION_H
#include "extensions.h"
/**
* \file bufferregion.h
* Memory region abstraction
*/
namespace NeoOGL
{
/**
* \brief Memory region
* \author Mattias Jansson (mattias@realityrift.com)
*/
class BufferRegion
{
public:
/*! Size of region */
unsigned int m_uiRegionSize;
/*! Offset from start of buffer */
unsigned int m_uiRegionOffset;
/*! Flag indicating region can be invalidated safely */
bool m_bBackingStore;
/*! Invalid flag */
bool m_bInvalid;
/**
* Create fence object and initialize data
* \param bBackingStore Flag indicating buffer has backing store and can be invalidated safely
*/
BufferRegion( bool bBackingStore ) : m_uiRegionSize( 0 ), m_uiRegionOffset( 0 ), m_bBackingStore( bBackingStore ), m_bInvalid( false ) {}
/**
* Make sure fence object is finished, then free fence object
*/
virtual ~BufferRegion() {}
/**
* Set fence on buffer
*/
virtual void SetFence() {}
/**
* Block until fence finished
*/
virtual void FinishFence() {}
/**
* Query if fence is finished
* \return true if fence is finished, false if not
*/
virtual bool TestFence() { return true; }
};
}; // namespace NeoOGL
#endif
See more files for this project here