mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
gpu: setup OpenGL ES texture uniforms automatically from shader metadata
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+6
-4
@@ -46,6 +46,12 @@ type ShaderSources struct {
|
||||
Uniforms []UniformLocation
|
||||
UniformSize int
|
||||
Inputs []InputLocation
|
||||
Textures []TextureBinding
|
||||
}
|
||||
|
||||
type TextureBinding struct {
|
||||
Name string
|
||||
Binding int
|
||||
}
|
||||
|
||||
type UniformLocation struct {
|
||||
@@ -109,12 +115,8 @@ type Program interface {
|
||||
Release()
|
||||
SetVertexUniforms(buf Buffer)
|
||||
SetFragmentUniforms(buf Buffer)
|
||||
UniformFor(uniform string) Uniform
|
||||
Uniform1i(u Uniform, v int)
|
||||
}
|
||||
|
||||
type Uniform interface{}
|
||||
|
||||
type Buffer interface {
|
||||
BindVertex(stride, offset int)
|
||||
BindIndex()
|
||||
|
||||
Reference in New Issue
Block a user