Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoCpuBufferObject.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2023 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20
21#pragma once
22
23#include <Inventor/devices/SoBufferObject.h>
24#include <Inventor/devices/SoCpuContext.h>
25
26SO_PIMPL_PUBLIC_DECLARATION(SoCpuBufferObject)
27
28
151{
152 SO_TYPED_CLASS_HEADER();
153 SO_PIMPL_PUBLIC_HEADER(SoCpuBufferObject)
154
155public:
156
162
185 SoCpuBufferObject(void *buffer, size_t size);
186
213 void setBuffer(void *buffer, size_t size);
214
221
226 virtual void clearInstance();
227
228private:
229
231 const void* getReadOnlyPointer() const;
232
236 virtual void copyToCpuBuffer( SoCpuBufferObject* targetBufferObject, size_t destOffset = 0, size_t sourceOffset = 0, size_t copySize = SO_BUFFER_SIZE_ALL );
237
242 bool isBufferOwner() const;
243
244 static void memcpyPtr2Ptr(void* dest, void* data, size_t dataSize, size_t count);
245
246private:
251 virtual ~SoCpuBufferObject();
252
253};
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> CPU buffer objec...
virtual void clearInstance()
This function clears the content of the buffer, it frees the memory if the mode was COPY.
SoCpuBufferObject()
Default constructor.
SoCpuBufferObject(void *buffer, size_t size)
Constructor that takes an existing block of CPU memory.
void setBuffer(void *buffer, size_t size)
Request that the buffer object manage an existing block of memory.
virtual SoBufferObject * createInstance() const
Create a new buffer with the same properties as the current one.