zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CodeGen.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5 //
6 
10 
11 //
12 // This function must be provided to create the actual
13 // compile object used by higher level code. It returns
14 // a subclass of TCompiler.
15 //
18 {
19  switch (output)
20  {
21  case SH_GLSL_OUTPUT:
22  return new TranslatorGLSL(type, spec);
23  case SH_ESSL_OUTPUT:
24  return new TranslatorESSL(type, spec);
25  case SH_HLSL9_OUTPUT:
26  case SH_HLSL11_OUTPUT:
27  return new TranslatorHLSL(type, spec, output);
28  default:
29  return NULL;
30  }
31 }
32 
33 //
34 // Delete the compiler made by ConstructCompiler
35 //
36 void DeleteCompiler(TCompiler* compiler)
37 {
38  delete compiler;
39 }
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
#define NULL
Definition: ftobjs.h:61
TCompiler * ConstructCompiler(ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
Definition: CodeGen.cpp:16
void DeleteCompiler(TCompiler *compiler)
Definition: CodeGen.cpp:36
ShShaderType
Definition: ShaderLang.h:48
ShShaderOutput
Definition: ShaderLang.h:80
ShShaderSpec
Definition: ShaderLang.h:53