mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
shaderir/glsl: Fix the panic messages
This commit is contained in:
parent
c22ec580bc
commit
ffee5eb6b8
@ -75,7 +75,7 @@ type compileContext struct {
|
|||||||
|
|
||||||
func (c *compileContext) structName(p *shaderir.Program, t *shaderir.Type) string {
|
func (c *compileContext) structName(p *shaderir.Program, t *shaderir.Type) string {
|
||||||
if t.Main != shaderir.Struct {
|
if t.Main != shaderir.Struct {
|
||||||
panic("shaderir: the given type at structName must be a struct")
|
panic("glsl: the given type at structName must be a struct")
|
||||||
}
|
}
|
||||||
s := t.String()
|
s := t.String()
|
||||||
if n, ok := c.structNames[s]; ok {
|
if n, ok := c.structNames[s]; ok {
|
||||||
|
@ -26,7 +26,7 @@ func typeString(t *shaderir.Type) (string, string) {
|
|||||||
t0, t1 := typeString(&t.Sub[0])
|
t0, t1 := typeString(&t.Sub[0])
|
||||||
return t0 + t1, fmt.Sprintf("[%d]", t.Length)
|
return t0 + t1, fmt.Sprintf("[%d]", t.Length)
|
||||||
case shaderir.Struct:
|
case shaderir.Struct:
|
||||||
panic("shaderir: a struct is not implemented")
|
panic("glsl: a struct is not implemented")
|
||||||
default:
|
default:
|
||||||
return basicTypeString(t.Main), ""
|
return basicTypeString(t.Main), ""
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user