OgreD3D11GpuProgram.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __D3D11GpuProgram_H_
29 #define __D3D11GpuProgram_H_
30 
31 // Precompiler options
32 #include "OgreD3D11Prerequisites.h"
33 #include "OgreGpuProgram.h"
34 
35 namespace Ogre {
36 
38  class D3D11GpuProgram : public GpuProgram
39  {
40  protected:
42  public:
43  D3D11GpuProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
44  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
45 
46  protected:
48  void loadImpl(void);
50  void loadFromSource(void);
52  virtual void loadFromMicrocode(ID3D10Blob * microcode) = 0;
53 
54 
55  };
56 
59  {
60  protected:
61  ID3D11VertexShader * mVertexShader;
62  public:
63  D3D11GpuVertexProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
64  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
67  ID3D11VertexShader * getVertexShader(void) const;
68  protected:
70  void unloadImpl(void);
71  void loadFromMicrocode(ID3D10Blob * microcode);
72  };
73 
76  {
77  protected:
78  ID3D11PixelShader * mPixelShader;
79  public:
80  D3D11GpuFragmentProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
81  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
84  ID3D11PixelShader * getPixelShader(void) const;
85  protected:
87  void unloadImpl(void);
88  void loadFromMicrocode(ID3D10Blob * microcode);
89  };
90 
93  {
94  protected:
95  ID3D11DomainShader * mDomainShader;
96  public:
97  D3D11GpuDomainProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
98  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
101  ID3D11DomainShader * getDomainShader(void) const;
102  protected:
104  void unloadImpl(void);
105  void loadFromMicrocode(ID3D10Blob * microcode);
106  };
107 
110  {
111  protected:
112  ID3D11HullShader * mHullShader;
113  public:
114  D3D11GpuHullProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
115  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
118  ID3D11HullShader * getHullShader() const;
119  protected:
121  void unloadImpl(void);
122  void loadFromMicrocode(ID3D10Blob * microcode);
123  };
124 
125 
131  {
132  protected:
133  ID3D11GeometryShader * mGeometryShader;
134  public:
135  D3D11GpuGeometryProgram(ResourceManager* creator, const String& name, ResourceHandle handle,
136  const String& group, bool isManual, ManualResourceLoader* loader, D3D11Device & device);
139  ID3D11GeometryShader * getGeometryShader(void) const;
140  protected:
142  void unloadImpl(void);
143  void loadFromMicrocode(ID3D10Blob * microcode);
144  };
145 }
146 
147 
148 #endif
Ogre::D3D11GpuHullProgram::mHullShader
ID3D11HullShader * mHullShader
Definition: OgreD3D11GpuProgram.h:112
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::D3D11GpuProgram::D3D11GpuProgram
D3D11GpuProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11GpuHullProgram::D3D11GpuHullProgram
D3D11GpuHullProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11GpuHullProgram::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::D3D11GpuHullProgram
Direct3D implementation of low-level vertex programs.
Definition: OgreD3D11GpuProgram.h:109
Ogre::GpuProgram
Defines a program which runs on the GPU such as a vertex or fragment program.
Definition: OgreGpuProgram.h:69
Ogre::D3D11GpuFragmentProgram::D3D11GpuFragmentProgram
D3D11GpuFragmentProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11GpuHullProgram::getHullShader
ID3D11HullShader * getHullShader() const
Gets the vertex shader.
Ogre::D3D11GpuDomainProgram::~D3D11GpuDomainProgram
~D3D11GpuDomainProgram()
Ogre::D3D11GpuDomainProgram::D3D11GpuDomainProgram
D3D11GpuDomainProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::D3D11GpuVertexProgram::loadFromMicrocode
void loadFromMicrocode(ID3D10Blob *microcode)
Internal method to load from microcode, must be overridden by subclasses.
Ogre::D3D11GpuProgram::loadImpl
void loadImpl(void)
Internal implementation of the meat of the 'load' action, only called if this resource is not being l...
Ogre::D3D11GpuFragmentProgram::mPixelShader
ID3D11PixelShader * mPixelShader
Definition: OgreD3D11GpuProgram.h:78
Ogre::D3D11GpuHullProgram::~D3D11GpuHullProgram
~D3D11GpuHullProgram()
Ogre::D3D11GpuVertexProgram
Direct3D implementation of low-level vertex programs.
Definition: OgreD3D11GpuProgram.h:58
Ogre::D3D11GpuGeometryProgram::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::D3D11GpuProgram::loadFromSource
void loadFromSource(void)
Overridden from GpuProgram.
Ogre::D3D11Device
Definition: OgreD3D11Device.h:36
Ogre::D3D11GpuVertexProgram::D3D11GpuVertexProgram
D3D11GpuVertexProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11GpuFragmentProgram::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::D3D11GpuVertexProgram::~D3D11GpuVertexProgram
~D3D11GpuVertexProgram()
OgreD3D11Prerequisites.h
Ogre::D3D11GpuDomainProgram::loadFromMicrocode
void loadFromMicrocode(ID3D10Blob *microcode)
Internal method to load from microcode, must be overridden by subclasses.
Ogre::D3D11GpuGeometryProgram::D3D11GpuGeometryProgram
D3D11GpuGeometryProgram(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual, ManualResourceLoader *loader, D3D11Device &device)
Ogre::D3D11GpuVertexProgram::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::D3D11GpuGeometryProgram
Direct3D implementation of low-level geometry programs.
Definition: OgreD3D11GpuProgram.h:130
Ogre::ResourceManager
Defines a generic resource handler.
Definition: OgreResourceManager.h:122
Ogre::D3D11GpuDomainProgram::mDomainShader
ID3D11DomainShader * mDomainShader
Definition: OgreD3D11GpuProgram.h:95
Ogre::D3D11GpuVertexProgram::mVertexShader
ID3D11VertexShader * mVertexShader
Definition: OgreD3D11GpuProgram.h:61
Ogre::D3D11GpuGeometryProgram::getGeometryShader
ID3D11GeometryShader * getGeometryShader(void) const
Gets the geometry shader.
Ogre::D3D11GpuFragmentProgram::getPixelShader
ID3D11PixelShader * getPixelShader(void) const
Gets the pixel shader.
Ogre::D3D11GpuGeometryProgram::loadFromMicrocode
void loadFromMicrocode(ID3D10Blob *microcode)
Internal method to load from microcode, must be overridden by subclasses.
OgreGpuProgram.h
Ogre::D3D11GpuDomainProgram::getDomainShader
ID3D11DomainShader * getDomainShader(void) const
Gets the vertex shader.
Ogre::D3D11GpuDomainProgram::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::D3D11GpuProgram
Direct3D implementation of a few things common to low-level vertex & fragment programs.
Definition: OgreD3D11GpuProgram.h:38
Ogre::D3D11GpuFragmentProgram::~D3D11GpuFragmentProgram
~D3D11GpuFragmentProgram()
Ogre::D3D11GpuProgram::mDevice
D3D11Device & mDevice
Definition: OgreD3D11GpuProgram.h:41
Ogre::D3D11GpuHullProgram::loadFromMicrocode
void loadFromMicrocode(ID3D10Blob *microcode)
Internal method to load from microcode, must be overridden by subclasses.
Ogre::D3D11GpuVertexProgram::getVertexShader
ID3D11VertexShader * getVertexShader(void) const
Gets the vertex shader.
Ogre::D3D11GpuProgram::loadFromMicrocode
virtual void loadFromMicrocode(ID3D10Blob *microcode)=0
Internal method to load from microcode, must be overridden by subclasses.
Ogre::ManualResourceLoader
Interface describing a manual resource loader.
Definition: OgreResource.h:514
Ogre::D3D11GpuGeometryProgram::mGeometryShader
ID3D11GeometryShader * mGeometryShader
Definition: OgreD3D11GpuProgram.h:133
Ogre::D3D11GpuDomainProgram
Direct3D implementation of low-level vertex programs.
Definition: OgreD3D11GpuProgram.h:92
Ogre::D3D11GpuGeometryProgram::~D3D11GpuGeometryProgram
~D3D11GpuGeometryProgram()
Ogre::D3D11GpuFragmentProgram::loadFromMicrocode
void loadFromMicrocode(ID3D10Blob *microcode)
Internal method to load from microcode, must be overridden by subclasses.
Ogre::D3D11GpuFragmentProgram
Direct3D implementation of low-level fragment programs.
Definition: OgreD3D11GpuProgram.h:75

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15