Diligent Engine API Reference: D:/GitHub/DiligentEngine/DiligentCore/Graphics/HLSL2GLSLConverterLib/interface/HLSL2GLSLConverter.h Source File

Diligent Engine API Reference

HLSL2GLSLConverter.h
1 /* Copyright 2015-2018 Egor Yusov
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
12 *
13 * In no event and under no legal theory, whether in tort (including negligence),
14 * contract, or otherwise, unless required by applicable law (such as deliberate
15 * and grossly negligent acts) or agreed to in writing, shall any Contributor be
16 * liable for any damages, including any direct, indirect, special, incidental,
17 * or consequential damages of any character arising as a result of this License or
18 * out of the use or inability to use the software (including but not limited to damages
19 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
20 * all other commercial damages or losses), even if such Contributor has been advised
21 * of the possibility of such damages.
22 */
23
24 #pragma once
25
28
29 #include "Shader.h"
30 #include "DataBlob.h"
31
32 namespace Diligent
33 {
34
35 // {1FDE020A-9C73-4A76-8AEF-C2C6C2CF0EA5}
36 static constexpr INTERFACE_ID IID_HLSL2GLSLConversionStream =
37 { 0x1fde020a, 0x9c73, 0x4a76, { 0x8a, 0xef, 0xc2, 0xc6, 0xc2, 0xcf, 0xe, 0xa5 } };
38
39 class IHLSL2GLSLConversionStream : public IObject
40 {
41 public:
42 virtual void Convert(const Char* EntryPoint, SHADER_TYPE ShaderType, bool IncludeDefintions, IDataBlob **ppGLSLSource) = 0;
43 };
44
45
46 // {44A21160-77E0-4DDC-A57E-B8B8B65B5342}
47 static constexpr INTERFACE_ID IID_HLSL2GLSLConverter =
48 { 0x44a21160, 0x77e0, 0x4ddc, { 0xa5, 0x7e, 0xb8, 0xb8, 0xb6, 0x5b, 0x53, 0x42 } };
49
51 class IHLSL2GLSLConverter : public IObject
52 {
53 public:
54 virtual void CreateStream(const Char* InputFileName,
55 IShaderSourceInputStreamFactory *pSourceStreamFactory,
56 const Char* HLSLSource,
57 size_t NumSymbols,
58 IHLSL2GLSLConversionStream **ppStream)const = 0;
59 };
60
61 }
Diligent::IShaderSourceInputStreamFactory
Shader source stream factory interface.
Definition: Shader.h:190
Diligent::IHLSL2GLSLConverter
Interface to the buffer object implemented in OpenGL.
Definition: HLSL2GLSLConverter.h:51
Diligent::SHADER_TYPE
SHADER_TYPE
Describes the shader type.
Definition: Shader.h:46
Diligent
Namespace for the OpenGL implementation of the graphics engine.
Definition: BufferD3D11Impl.h:34