Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/MemoryIndexBuffer.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _MEMORY_INDEX_BUFFER_H_
00004 #define _MEMORY_INDEX_BUFFER_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <render/IndexBuffer.h>
00009 
00010 namespace render
00011 {
00012 
00013 class ENGINE_PUBLIC_EXPORT MemoryIndexBuffer : public IndexBuffer
00014 {
00015 public:
00016 
00017         MemoryIndexBuffer(IndexType idxType, u32 numIndexes, resource::BufferUsage usage);
00018 
00019         virtual ~MemoryIndexBuffer();
00020 
00021         void* lock(u32 offset, u32 length, resource::BufferLocking options);
00022 
00023         void unlock();
00024 
00025         void readData(u32 offset, u32 length, void* pDest);
00026 
00027         void writeData(u32 offset, u32 length, const void* pSource, bool discardWholeBuffer = false);
00028         
00029 protected:
00030 
00031         u8* mpData;
00032 
00033         void* lockImpl(u32 offset, u32 length, resource::BufferLocking options);
00034 
00035         void unlockImpl();
00036 };
00037 
00038 }// end namespace render
00039 
00040 #endif// _MEMORYINDEXBUFFER_H_

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:04 by Doxygen (1.7.4)