Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/new_class_id/src/lib/graphics/resource_shader.h @ 9847

Last change on this file since 9847 was 9847, checked in by bensch, 18 years ago

renamed NewResource to Resource

File size: 993 bytes
Line 
1/*!
2 * @file resource_shader.h
3 * @brief Contains the ResourceShader class, that handles the Resource-specific loading part of the Shader.
4 *
5 */
6
7#ifndef _RESOURCE_SHADER_H
8#define _RESOURCE_SHADER_H
9
10#include "util/loading/resource.h"
11#include "shader.h"
12
13
14class ResourceShader : public Shader, public Resources::Resource
15{
16public:
17  ResourceShader(const std::string& vertexShaderName, const std::string& fragmentShaderName);
18  static ResourceShader createFromString(const std::string& loadString);
19
20private:
21class ShaderResourcePointer : public Resources::StorePointer
22  {
23  public:
24    ShaderResourcePointer(const std::string& loadString, const Resources::KeepLevel& keepLevel, const ShaderData::Pointer& data);
25    inline const ShaderData::Pointer& ptr() const { return pointer; }
26    virtual bool last() const { return pointer.count() == 1; }
27  private:
28    ShaderData::Pointer pointer;
29  };
30
31private:
32  static Resources::tType<ResourceShader> type;
33};
34
35
36#endif /* _RESOURCE_SHADER_H */
Note: See TracBrowser for help on using the repository browser.