| 1 | // This file can be included several times. |
| 2 | #if (!defined(BACKEND_AS_OPENGL_ES) && !defined(ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H)) || \ |
| 3 | (defined(BACKEND_AS_OPENGL_ES) && !defined(ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H_AS_ES)) |
| 4 | |
| 5 | #if !defined(BACKEND_AS_OPENGL_ES) && !defined(ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H) |
| 6 | #define ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H |
| 7 | #endif |
| 8 | |
| 9 | #if defined(BACKEND_AS_OPENGL_ES) && !defined(ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H_AS_ES) |
| 10 | #define ENGINE_CLIENT_BACKEND_OPENGL_OPENGL_SL_H_AS_ES |
| 11 | #endif |
| 12 | |
| 13 | #include <engine/client/graphics_defines.h> |
| 14 | |
| 15 | class CGLSLCompiler; |
| 16 | |
| 17 | class CGLSL |
| 18 | { |
| 19 | public: |
| 20 | bool LoadShader(CGLSLCompiler *pCompiler, class IStorage *pStorage, const char *pFile, int Type); |
| 21 | void DeleteShader(); |
| 22 | |
| 23 | bool IsLoaded() const; |
| 24 | TWGLuint GetShaderId() const; |
| 25 | |
| 26 | CGLSL(); |
| 27 | virtual ~CGLSL(); |
| 28 | |
| 29 | private: |
| 30 | TWGLuint m_ShaderId; |
| 31 | int m_Type; |
| 32 | bool m_IsLoaded; |
| 33 | }; |
| 34 | |
| 35 | #endif |
| 36 | |