VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtGLTextureBufferObject.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 #pragma once
10 
11 #include "DtGraphicsUtilsPreReqs.h"
12 #include "DtDataFormat.h"
13 #include "DtCommonTypes.h"
14 #include "DtUsage.h"
15 #include "DtCPUAccess.h"
16 
17 #include <GL/glew.h>
18 
19 namespace makVrv {
20 
21  class Device;
22 
26  {
27  public:
29  DtGLTextureBufferObject(Device* pDevice
30  , const byte* pData, size_t sizeInBytes
31  , DtDataFormat format
32  , DtUsage usage
33  , DtCpuAccess cpuAccess);
34 
36  virtual ~DtGLTextureBufferObject();
37 
39  size_t sizeInBytes(void) const;
40 
42  void copyData(void* pData, size_t sizeInBytes, size_t offsetInBytes = 0);
43 
45  void copyDataMapped(void* pData, size_t sizeInBytes, size_t offsetInBytes = 0);
46 
48  DtDataFormat format(void) const {return myFormat;}
49 
50  void bindTexture(void);
51  void bindTBO(void);
52  void* mapTBO(void);
53  void unmapTBO(void);
54 
56  void resize(size_t sizeInBytes);
57  private:
59  GLuint myTextureID;
60  size_t mySizeInBytes;
61 
65 
66  GLenum myGLUsage;
68 
69  void tearDown(void);
70  void reInitialize(const byte* pData);
71  };
72 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)