interface GlslangCompiler { getVersion(): string; glsl300es_preprocess(glslSource: string,
stage: "compute" | "vertex" | "fragment"): { info_log: string; preprocessed_code: string; success: boolean; }; glsl450_combine_to_spirv(glslSource: string,
stage: "compute" | "vertex" | "fragment",
splitSampler: boolean): { info_log: string; spirv: Uint32Array; success: boolean; }; glsl450_to_spirv(glslSource: string,
stage: "compute" | "vertex" | "fragment"): { info_log: string; spirv: Uint32Array; success: boolean; }; preprocess_compute(glslSource: string,
stage: "compute"): { info_log: string; preprocessed_code: string; samplers: Map<string, { type: string; }>; ssbos: Map<string, "readonly" | "writeonly" | "readwrite">; success: boolean; ubos: Map<string, string>; uniforms: Map<string, { access?: "readonly" | "writeonly" | "readwrite"; format?: string; type: string; }>; }; } 方法
getVersion
- getVersion(): string
返回 string
glsl300es_preprocess
- glsl300es_preprocess(glslSource, stage): {
info_log: string;
preprocessed_code: string;
success: boolean;
} 参数
- glslSource: string
- stage: "compute" | "vertex" | "fragment"
返回 {
info_log: string;
preprocessed_code: string;
success: boolean;
}
info_log: string
preprocessed_code: string
success: boolean
glsl450_combine_to_spirv
- glsl450_combine_to_spirv(glslSource, stage, splitSampler): {
info_log: string;
spirv: Uint32Array;
success: boolean;
} 参数
- glslSource: string
- stage: "compute" | "vertex" | "fragment"
- splitSampler: boolean
返回 {
info_log: string;
spirv: Uint32Array;
success: boolean;
}
info_log: string
spirv: Uint32Array
success: boolean
glsl450_to_spirv
- glsl450_to_spirv(glslSource, stage): {
info_log: string;
spirv: Uint32Array;
success: boolean;
} 参数
- glslSource: string
- stage: "compute" | "vertex" | "fragment"
返回 {
info_log: string;
spirv: Uint32Array;
success: boolean;
}
info_log: string
spirv: Uint32Array
success: boolean
preprocess_compute
- preprocess_compute(glslSource, stage): {
info_log: string;
preprocessed_code: string;
samplers: Map<string, {
type: string;
}>;
ssbos: Map<string, "readonly" | "writeonly" | "readwrite">;
success: boolean;
ubos: Map<string, string>;
uniforms: Map<string, {
access?: "readonly" | "writeonly" | "readwrite";
format?: string;
type: string;
}>;
} 参数
- glslSource: string
- stage: "compute"
返回 {
info_log: string;
preprocessed_code: string;
samplers: Map<string, {
type: string;
}>;
ssbos: Map<string, "readonly" | "writeonly" | "readwrite">;
success: boolean;
ubos: Map<string, string>;
uniforms: Map<string, {
access?: "readonly" | "writeonly" | "readwrite";
format?: string;
type: string;
}>;
}
info_log: string
preprocessed_code: string
samplers: Map<string, {
type: string;
}>
ssbos: Map<string, "readonly" | "writeonly" | "readwrite">
success: boolean
ubos: Map<string, string>
uniforms: Map<string, {
access?: "readonly" | "writeonly" | "readwrite";
format?: string;
type: string;
}>