RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Texture2DBuffer.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2017 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_TEXTURE2DBUFFER_H
10 #define RAMSES_TEXTURE2DBUFFER_H
11 
13 #include "TextureEnums.h"
14 
15 namespace ramses
16 {
26  {
27  public:
28 
46  status_t updateData(uint32_t mipLevel, uint32_t offsetX, uint32_t offsetY, uint32_t width, uint32_t height, const void* data);
47 
54  uint32_t getMipLevelCount() const;
55 
65  status_t getMipLevelSize(uint32_t mipLevel, uint32_t& widthOut, uint32_t& heightOut) const;
66 
73  uint32_t getMipLevelDataSizeInBytes(uint32_t mipLevel) const;
74 
81 
93  status_t getMipLevelData(uint32_t mipLevel, void* buffer, uint32_t bufferSize) const;
94 
98  class Texture2DBufferImpl& impl;
99 
100  protected:
104  friend class SceneImpl;
105 
111  explicit Texture2DBuffer(Texture2DBufferImpl& pimpl);
112 
116  virtual ~Texture2DBuffer();
117  };
118 }
119 
120 #endif
#define RAMSES_API
Definition: APIExport.h:35
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The Texture2DBuffer is a mutable texture buffer used to hold texture data with the possibility to per...
Definition: Texture2DBuffer.h:26
uint32_t getMipLevelDataSizeInBytes(uint32_t mipLevel) const
Returns the size of a specific mipmap level in bytes.
ETextureFormat getTexelFormat() const
Returns the texel format provided at creation.
virtual ~Texture2DBuffer()
Destructor of the Texture2DBuffer.
uint32_t getMipLevelCount() const
Returns the number of mipmap levels created for the Texture2DBuffer (same as provided in ramses::Scen...
class Texture2DBufferImpl & impl
Definition: Texture2DBuffer.h:98
status_t getMipLevelData(uint32_t mipLevel, void *buffer, uint32_t bufferSize) const
Copies the data of a single mip-level into a user-provided buffer. The amount of data copied is buffe...
Texture2DBuffer(Texture2DBufferImpl &pimpl)
Constructor for Texture2DBuffer.
status_t getMipLevelSize(uint32_t mipLevel, uint32_t &widthOut, uint32_t &heightOut) const
Returns the size of a specific mipmap level in texels.
status_t updateData(uint32_t mipLevel, uint32_t offsetX, uint32_t offsetY, uint32_t width, uint32_t height, const void *data)
Update a subregion of the data of Texture2DBuffer. The caller is responsible to check that the data h...
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
ETextureFormat
Texture data format.
Definition: TextureEnums.h:40
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26