forked from joejulian/gio
gpu: make Buffers immutable
The GPU implementation only uses immutable buffers so far, so let's make it easy and performant for the backends. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -380,14 +380,14 @@ func newBlitter(ctx Backend) *blitter {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
quadVerts := ctx.NewBuffer(BufferTypeData)
|
||||
quadVerts.Upload(BufferUsageStaticDraw,
|
||||
quadVerts := ctx.NewBuffer(BufferTypeData,
|
||||
gunsafe.BytesView([]float32{
|
||||
-1, +1, 0, 0,
|
||||
+1, +1, 1, 0,
|
||||
-1, -1, 0, 1,
|
||||
+1, -1, 1, 1,
|
||||
}))
|
||||
}),
|
||||
)
|
||||
b := &blitter{
|
||||
ctx: ctx,
|
||||
prog: prog,
|
||||
|
||||
Reference in New Issue
Block a user