RAMSES Documentation  27.0.130
Information for RAMSES users and developers
IBinaryShaderCache.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2015 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_RENDERERAPI_IBINARYSHADERCACHE_H
10 #define RAMSES_RENDERERAPI_IBINARYSHADERCACHE_H
11 
14 
15 namespace ramses
16 {
72  {
73  public:
77  virtual ~IBinaryShaderCache() = default;
78 
88  virtual void deviceSupportsBinaryShaderFormats(const binaryShaderFormatId_t* supportedFormats, uint32_t numSupportedFormats) = 0;
89 
97  virtual bool hasBinaryShader(effectId_t effectId) const = 0;
98 
108  virtual uint32_t getBinaryShaderSize(effectId_t effectId) const = 0;
109 
125 
139  virtual bool shouldBinaryShaderBeCached(effectId_t effectId, sceneId_t sceneId) const = 0;
140 
153  virtual void getBinaryShaderData(effectId_t effectId, uint8_t* buffer, uint32_t bufferSize) const = 0;
154 
174  virtual void storeBinaryShader(effectId_t effectId, sceneId_t sceneId, const uint8_t* binaryShaderData, uint32_t binaryShaderDataSize, binaryShaderFormatId_t binaryShaderFormat) = 0;
175 
185  virtual void binaryShaderUploaded(effectId_t effectId, bool success) const = 0;
186  };
187 }
188 
189 #endif
#define RAMSES_API
Definition: APIExport.h:35
An interface used to exchange Binary Shader Cache with the RamsesRenderer. The RamsesRenderer will no...
Definition: IBinaryShaderCache.h:72
virtual ~IBinaryShaderCache()=default
Destructor of IBinaryShaderCache.
virtual bool hasBinaryShader(effectId_t effectId) const =0
Used by RamsesRenderer to ask the application if it provides binary data for the Effect with the give...
virtual binaryShaderFormatId_t getBinaryShaderFormat(effectId_t effectId) const =0
Used by RamsesRenderer to ask the application for the shader format of the binary shader for the give...
virtual bool shouldBinaryShaderBeCached(effectId_t effectId, sceneId_t sceneId) const =0
Used by RamsesRenderer to ask the application whether a specific effect should be cached.
virtual void deviceSupportsBinaryShaderFormats(const binaryShaderFormatId_t *supportedFormats, uint32_t numSupportedFormats)=0
Provides a list of binary shader formats supported by the device in use. The cache implementation sho...
virtual void getBinaryShaderData(effectId_t effectId, uint8_t *buffer, uint32_t bufferSize) const =0
Used by RamsesRenderer to ask the application to provide the binary shader data for the given effectI...
virtual uint32_t getBinaryShaderSize(effectId_t effectId) const =0
Used by RamsesRenderer to ask the application for the size in bytes of the binary shader for the give...
virtual void storeBinaryShader(effectId_t effectId, sceneId_t sceneId, const uint8_t *binaryShaderData, uint32_t binaryShaderDataSize, binaryShaderFormatId_t binaryShaderFormat)=0
Used by RamsesRenderer to provide the application with a binary shader data an effect with the given ...
virtual void binaryShaderUploaded(effectId_t effectId, bool success) const =0
Used by RamsesRenderer to provide a callback with information on the result of a binary shader upload...
Helper class to create strongly typed values out of various types.
Definition: StronglyTypedValue.h:23
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
Resource identifier used to refer to a resource on the renderer.
Definition: Types.h:33