Module Sarek_vulkan.Shaderc

Library Loading

val shaderc_lib : Dl.library option Stdlib.Lazy.t
val is_available : unit -> bool
val get_lib : unit -> Dl.library
val foreign_lazy : string -> ('a -> 'b) Ctypes.fn -> ('a -> 'b) lazy_t

Types

type shaderc_compiler = unit Ctypes.ptr
val shaderc_compiler : shaderc_compiler Ctypes.typ
type shaderc_compile_options = unit Ctypes.ptr
val shaderc_compile_options : shaderc_compile_options Ctypes.typ
type shaderc_compilation_result = unit Ctypes.ptr
val shaderc_compilation_result : shaderc_compilation_result Ctypes.typ
val shaderc_glsl_vertex_shader : int
val shaderc_glsl_fragment_shader : int
val shaderc_glsl_compute_shader : int
val shaderc_glsl_geometry_shader : int
val shaderc_glsl_tess_control_shader : int
val shaderc_glsl_tess_evaluation_shader : int

Functions

val shaderc_compiler_initialize_lazy : (unit -> shaderc_compiler) lazy_t
val shaderc_compiler_initialize : unit -> shaderc_compiler
val shaderc_compiler_release_lazy : (shaderc_compiler -> unit) lazy_t
val shaderc_compiler_release : shaderc_compiler -> unit
val shaderc_compile_into_spv_lazy : (shaderc_compiler -> string -> Unsigned.size_t -> int -> string -> string -> shaderc_compile_options -> shaderc_compilation_result) lazy_t
val shaderc_compile_into_spv : shaderc_compiler -> string -> Unsigned.size_t -> int -> string -> string -> shaderc_compile_options -> shaderc_compilation_result
val shaderc_result_get_compilation_status_lazy : (shaderc_compilation_result -> int) lazy_t
val shaderc_result_get_compilation_status : shaderc_compilation_result -> int
val shaderc_result_get_bytes_lazy : (shaderc_compilation_result -> char Ctypes_static.ptr) lazy_t
val shaderc_result_get_bytes : shaderc_compilation_result -> char Ctypes_static.ptr
val shaderc_result_get_length_lazy : (shaderc_compilation_result -> Unsigned.size_t) lazy_t
val shaderc_result_get_length : shaderc_compilation_result -> Unsigned.size_t
val shaderc_result_get_error_message_lazy : (shaderc_compilation_result -> string) lazy_t
val shaderc_result_get_error_message : shaderc_compilation_result -> string
val shaderc_result_release_lazy : (shaderc_compilation_result -> unit) lazy_t
val shaderc_result_release : shaderc_compilation_result -> unit

High-Level API

val global_compiler : shaderc_compiler option Stdlib.ref
val get_compiler : unit -> shaderc_compiler
val compile_glsl_to_spirv : entry_point:string -> string -> string