mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
graphics: Compile error of shaders should panic
This commit is contained in:
parent
c291e2abad
commit
9c2857c15d
@ -15,6 +15,8 @@
|
||||
package graphics
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/hajimehoshi/ebiten/internal/graphics/opengl"
|
||||
)
|
||||
|
||||
@ -37,13 +39,13 @@ const float32Size = 4
|
||||
func initialize(c *opengl.Context) error {
|
||||
shaderVertexModelviewNative, err := c.NewShader(c.VertexShader, shader(c, shaderVertexModelview))
|
||||
if err != nil {
|
||||
return err
|
||||
panic(fmt.Sprintf("graphics: shader compiling error:\n%s", err))
|
||||
}
|
||||
defer c.DeleteShader(shaderVertexModelviewNative)
|
||||
|
||||
shaderFragmentTextureNative, err := c.NewShader(c.FragmentShader, shader(c, shaderFragmentTexture))
|
||||
if err != nil {
|
||||
return err
|
||||
panic(fmt.Sprintf("graphics: shader compiling error:\n%s", err))
|
||||
}
|
||||
defer c.DeleteShader(shaderFragmentTextureNative)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user