mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/directx: refactoring
This commit is contained in:
parent
fda0b1cbcb
commit
8e1bd4eaba
@ -403,6 +403,9 @@ func newShader(vs, ps string) (vsh, psh *_ID3DBlob, ferr error) {
|
||||
v.AddRef()
|
||||
vsh = v
|
||||
} else {
|
||||
defer func() {
|
||||
vertexShaderCache[vs] = vsh
|
||||
}()
|
||||
wg.Go(func() error {
|
||||
v, err := _D3DCompile([]byte(vs), "shader", nil, nil, "VSMain", "vs_5_0", flag, 0)
|
||||
if err != nil {
|
||||
@ -425,8 +428,6 @@ func newShader(vs, ps string) (vsh, psh *_ID3DBlob, ferr error) {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
vertexShaderCache[vs] = vsh
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user