RAMSES Documentation  27.0.130
Information for RAMSES users and developers
GeometryBinding.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2014 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_GEOMETRYBINDING_H
10 #define RAMSES_GEOMETRYBINDING_H
11 
13 
14 namespace ramses
15 {
16  class ArrayBuffer;
17  class AttributeInput;
18  class ArrayResource;
19  class Effect;
20 
25  {
26  public:
27 
37  status_t setIndices(const ArrayResource& indicesResource);
38 
48  status_t setIndices(const ArrayBuffer& arrayBuffer);
49 
59  status_t setInputBuffer(const AttributeInput& attributeInput, const ArrayResource& arrayResource, uint32_t instancingDivisor = 0);
60 
72  status_t setInputBuffer(const AttributeInput& attributeInput, const ArrayResource& arrayResource, uint16_t offset, uint16_t stride);
73 
83  status_t setInputBuffer(const AttributeInput& attributeInput, const ArrayBuffer& arrayBuffer, uint32_t instancingDivisor = 0);
84 
96  status_t setInputBuffer(const AttributeInput& attributeInput, const ArrayBuffer& arrayBuffer, uint16_t offset, uint16_t stride);
97 
103  const Effect& getEffect() const;
104 
108  class GeometryBindingImpl& impl;
109 
110  protected:
114  friend class SceneImpl;
115 
121  explicit GeometryBinding(GeometryBindingImpl& pimpl);
122 
129 
137 
141  virtual ~GeometryBinding();
142  };
143 }
144 
145 #endif
#define RAMSES_API
Definition: APIExport.h:35
The ArrayBuffer is a data object used to provide vertex or index data to ramses::GeometryBinding::set...
Definition: ArrayBuffer.h:27
The ArrayResource stores a data array of a given type. The data is immutable. The resource can be use...
Definition: ArrayResource.h:26
The AttributeInput is a description of an attribute effect input.
Definition: AttributeInput.h:22
An effect describes how an object will be rendered to the screen.
Definition: Effect.h:26
A geometry binding together with an appearance describe how an object will be rendered to the screen.
Definition: GeometryBinding.h:25
GeometryBinding(GeometryBindingImpl &pimpl)
Constructor of GeometryBinding.
status_t setInputBuffer(const AttributeInput &attributeInput, const ArrayResource &arrayResource, uint16_t offset, uint16_t stride)
Assign a data array resource to a given effect attribute input with offset and stride.
status_t setIndices(const ArrayResource &indicesResource)
Assign a data array with data type UInt16 or UInt32 to be used when accessing vertex data.
class GeometryBindingImpl & impl
Stores internal data for implementation specifics of GeometryBinding.
Definition: GeometryBinding.h:108
status_t setInputBuffer(const AttributeInput &attributeInput, const ArrayResource &arrayResource, uint32_t instancingDivisor=0)
Assign a data array resource to a given effect attribute input.
virtual ~GeometryBinding()
Destructor of the GeometryBinding.
GeometryBinding & operator=(const GeometryBinding &other)
Assignment operator of GeometryBinding.
status_t setIndices(const ArrayBuffer &arrayBuffer)
Assign indices (using index data buffer) to be used when accessing vertex data.
status_t setInputBuffer(const AttributeInput &attributeInput, const ArrayBuffer &arrayBuffer, uint32_t instancingDivisor=0)
Assign a vertex attribute buffer to a given effect attribute input.
status_t setInputBuffer(const AttributeInput &attributeInput, const ArrayBuffer &arrayBuffer, uint16_t offset, uint16_t stride)
Assign vertex attribute buffer with offset and stride.
const Effect & getEffect() const
Gets the effect used to create this geometry binding.
GeometryBinding(const GeometryBinding &other)
Copy constructor of GeometryBinding.
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26