mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/graphicsdriver/opengl: assume custom attributes are vec4
Due to HLSL restrictions, all the attributes must have a semantics. Always assuming custom attributes are vec4 makes things simpler. Updates #2640
This commit is contained in:
parent
107189a00d
commit
ed45843c13
@ -114,17 +114,17 @@ func init() {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
n := theArrayBufferLayout.float32Count()
|
n := theArrayBufferLayout.float32Count()
|
||||||
if n > graphics.VertexFloatCount {
|
diff := graphics.VertexFloatCount - n
|
||||||
panic("opengl: the array buffer layout is too large")
|
if diff == 0 {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if n < graphics.VertexFloatCount {
|
if diff%4 != 0 {
|
||||||
d := graphics.VertexFloatCount - n
|
panic("opengl: unexpected attribute layout")
|
||||||
if d > 4 {
|
}
|
||||||
panic("opengl: the array buffer layout is too small")
|
for i := 0; i < diff/4; i++ {
|
||||||
}
|
|
||||||
theArrayBufferLayout.addPart(arrayBufferLayoutPart{
|
theArrayBufferLayout.addPart(arrayBufferLayoutPart{
|
||||||
name: "A3",
|
name: fmt.Sprintf("A%d", i+3),
|
||||||
num: d,
|
num: 4,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user