Documentation
¶
Rendered for windows/amd64
Overview ¶
Package d3dcompile provides Pure Go bindings to d3dcompiler_47.dll.
D3DCompile compiles HLSL source code to DXBC bytecode using the D3DCompile function from d3dcompiler_47.dll. This DLL ships with Windows 10+ and requires no additional installation.
Zero CGO — uses syscall.NewLazyDLL for dynamic loading.
Index ¶
Constants ¶
View Source
const ( TargetVS51 = "vs_5_1" // Vertex shader, Shader Model 5.1 TargetPS51 = "ps_5_1" // Pixel (fragment) shader, Shader Model 5.1 TargetCS51 = "cs_5_1" // Compute shader, Shader Model 5.1 )
Shader model target profiles for D3DCompile.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lib ¶
type Lib struct {
// contains filtered or unexported fields
}
Lib provides access to d3dcompiler_47.dll functions.
func (*Lib) Compile ¶
Compile compiles HLSL source code to DXBC bytecode.
Parameters:
- source: HLSL source code
- entryPoint: entry point function name (e.g. "vs_main")
- target: shader model target (e.g. TargetVS51, TargetPS51, TargetCS51)
Returns compiled DXBC bytecode or an error with the compiler error message.
Click to show internal directories.
Click to hide internal directories.