Exemplo n.º 1
0
 // Compiles the given source GLSL and returns a SPIR-V binary module
 // compilation result.
 // Like the first CompileGlslToSpv method but the source is provided as
 // a std::string.
 SpvCompilationResult CompileGlslToSpv(const std::string& source_text,
                                       shaderc_shader_kind shader_kind,
                                       const char* input_file_name,
                                       const CompileOptions& options) const {
     return CompileGlslToSpv(source_text.data(), source_text.size(), shader_kind,
                             input_file_name, options);
 }
Exemplo n.º 2
0
 // Compiles the given source shader and returns a SPIR-V binary module
 // compilation result.
 // Like the first CompileGlslToSpv method but assumes the entry point name
 // is "main".
 SpvCompilationResult CompileGlslToSpv(const char* source_text,
                                       size_t source_text_size,
                                       shaderc_shader_kind shader_kind,
                                       const char* input_file_name,
                                       const CompileOptions& options) const {
   return CompileGlslToSpv(source_text, source_text_size, shader_kind,
                           input_file_name, "main", options);
 }