OSDN Git Service

first
[psychlops/cpp.git] / psychlops / platform / win32gl / extension / psychlops_g_shader_Win32GL.cpp
1 /*
2  *  psychlops_g_shader_Win32GL.cpp
3  *  Psychlops Standard Library (Universal)
4  *
5  *  Last Modified 2009/12/14 by Kenchi HOSOKAWA
6  *  (C) 2009 Kenchi HOSOKAWA, Kazushi MARUYA and Takao SATO
7  */
8
9
10 #include "../../../core/ApplicationInterfaces/psychlops_code_exception.h"
11 #define PSYCHLOPS_SHADER_PLATFORM
12 #include "../../../platform/psychlops_platform_selector.h"
13
14 //#include "tokoi/glext.h"
15 //#include "tokoi/glsl.h"
16
17 #include "../../../platform/gl/extension/psychlops_g_shader_gl.h"
18
19 namespace Psychlops {
20
21         bool global_initialized = false;
22         ShaderAPI::ShaderAPI()
23         {\r
24                 initializeInstance();
25                 //if(!global_initialized) initialize();
26                 //global_initialized = true;
27         }
28         void ShaderAPI::initialize()
29         {
30                 if(!global_initialized)
31                 {
32                         if(glewInit()) throw new Exception("This system does not support shader although this program requires it.");
33 //                      if(glslInit()) throw new Exception("This system does not support shader although this program requires it.");
34                         global_initialized = true;
35                 }
36         }
37
38 }       /*      <- namespace Psycholops         */