VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBufferObject.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2023 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
7 
8 #pragma once
9 
11 
12 namespace makVrv
13 {
14 
18  {
19  public:
20 
21  enum Usage
22  {
23  Static, //Data hardly changes
24  Dynamic, //Data frequently changes
25  Stream //Data usually changes
26  };
27 
29  DtBufferObject(Usage usage, int type);
30 
32  ~DtBufferObject();
33 
34  //Change the size of the buffer.
35  void resize(unsigned int sizeBytes);
36 
37  //Get the buffer's size
38  unsigned int size() const;
39 
41  inline unsigned int objectId() const { return myBufferObjectId; }
42 
43  //Set the size and initialize the buffer with data.
44  void setData(const void* data, unsigned int sizeBytes);
45 
46  //Upload a subsection of data starting at the offset for count floats,
47  //Either resize or setData must be called before uploading data.
48  void uploadData(unsigned int offsetBytes, unsigned int sizeBytes, const void* data);
49 
50  protected:
51  unsigned int myBufferObjectId;
52  unsigned int myGlUsage;
53  unsigned int mySize;
54  const int myType;
55 
56  };
57 
58 }
A class the wraps a OpenGL Array Buffer object.
Definition: DtBufferObject.h:17
voidpf void uLong size
Definition: ioapi.h:39
unsigned int objectId() const
Get the object id.
Definition: DtBufferObject.h:41
unsigned int myBufferObjectId
Definition: DtBufferObject.h:51
unsigned int myGlUsage
Definition: DtBufferObject.h:52
Usage
Definition: DtBufferObject.h:21
Definition: DtBufferObject.h:24
#define DT_DLL_VRVGRAPHICS
Contains DLL export macros.
Definition: vrvGraphics.h:19
Definition: DtBufferObject.h:23
unsigned int mySize
Definition: DtBufferObject.h:53
Definition: surface.h:52
const int myType
Definition: DtBufferObject.h:54

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)