OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreGLSLShaderManager.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-2014 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 
29 #ifndef __GLSLShaderManager_H__
30 #define __GLSLShaderManager_H__
31 
32 #include "OgreGpuProgramManager.h"
34 
35 namespace Ogre {
36 
37  //TODO A brief description of what purpose this class serves in GL3+.
38  // Seems to primarily serve the purpose of creating GpuProgram's based
39  // on material script programs. Also handles cache creation.
41  {
42  public:
43  typedef GpuProgram* (*CreateGpuProgramCallback)(ResourceManager* creator,
44  const String& name, ResourceHandle handle,
45  const String& group, bool isManual, ManualResourceLoader* loader,
46  GpuProgramType gptype, const String& syntaxCode);
47 
48  private:
51 
52  protected:
54  Resource* createImpl(const String& name, ResourceHandle handle,
55  const String& group, bool isManual, ManualResourceLoader* loader,
56  const NameValuePairList* params);
58  Resource* createImpl(const String& name, ResourceHandle handle,
59  const String& group, bool isManual, ManualResourceLoader* loader,
60  GpuProgramType gptype, const String& syntaxCode);
61 
62  public:
64  virtual ~GLSLShaderManager();
65  bool registerShaderFactory(const String& syntaxCode, CreateGpuProgramCallback createFn);
66  bool unregisterShaderFactory(const String& syntaxCode);
67  };
68 
69 }
70 
71 #endif
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:580
GpuProgramType
Enumerates the types of programs which can run on the GPU.
Defines a program which runs on the GPU such as a vertex or fragment program.
Interface describing a manual resource loader.
Definition: OgreResource.h:498
map< String, CreateGpuProgramCallback >::type ShaderMap
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:77
#define _OgreGL3PlusExport
unsigned long long int ResourceHandle
Definition: OgreResource.h:39
Defines a generic resource handler.
_StringBase String
Definition: OgreCommon.h:53