HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TextureBaker.h
Go to the documentation of this file.
1 //
2 // Copyright Contributors to the MaterialX Project
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 
6 #ifndef MATERIALX_TEXTUREBAKER_GLSL
7 #define MATERIALX_TEXTUREBAKER_GLSL
8 
9 /// @file
10 /// Texture baking functionality
11 
12 #include <iostream>
13 
14 #include <MaterialXCore/Unit.h>
16 
18 
22 
24 
25 /// A shared pointer to a TextureBaker
26 using TextureBakerPtr = shared_ptr<class TextureBakerGlsl>;
27 
28 /// A vector of baked documents with their associated names.
29 using BakedDocumentVec = std::vector<std::pair<std::string, DocumentPtr>>;
30 
31 /// @class TextureBakerGlsl
32 /// An implementation of TextureBaker based on GLSL shader generation.
33 class MX_RENDERGLSL_API TextureBakerGlsl : public TextureBaker<GlslRenderer, GlslShaderGenerator>
34 {
35  public:
36  static TextureBakerPtr create(unsigned int width = 1024, unsigned int height = 1024, Image::BaseType baseType = Image::BaseType::UINT8)
37  {
38  return TextureBakerPtr(new TextureBakerGlsl(width, height, baseType));
39  }
40 
41  TextureBakerGlsl(unsigned int width, unsigned int height, Image::BaseType baseType);
42 };
43 
45 
46 #endif
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
std::vector< std::pair< std::string, DocumentPtr >> BakedDocumentVec
A vector of baked documents with their associated names.
Definition: TextureBaker.h:24
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
BaseType
Definition: Image.h:48
#define MX_RENDERGLSL_API
Definition: Export.h:18
shared_ptr< class TextureBakerGlsl > TextureBakerPtr
A shared pointer to a TextureBaker.
Definition: TextureBaker.h:26
static TextureBakerPtr create(unsigned int width=1024, unsigned int height=1024, Image::BaseType baseType=Image::BaseType::UINT8)
Definition: TextureBaker.h:36
GLint GLsizei width
Definition: glcorearb.h:103
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26