Compare commits

..

2 Commits

Author SHA1 Message Date
Joe Julian fb19cd6043 app: avoid relocking contexts every frame
Signed-off-by: Joe Julian <me@joejulian.name>
2026-04-20 16:52:33 -07:00
Joe Julian b9aa9e59f7 app: lock explicitly before refreshing contexts
Signed-off-by: Joe Julian <me@joejulian.name>
2026-04-20 16:51:31 -07:00
2 changed files with 1 additions and 3 deletions
-3
View File
@@ -115,9 +115,6 @@ func (c *context) Unlock() {
}
func (c *context) Refresh() error {
if C.gio_makeCurrent(c.ctx) == 0 {
return errors.New("[EAGLContext setCurrentContext] failed")
}
if !c.init {
c.init = true
c.frameBuffer = c.c.CreateFramebuffer()
+1
View File
@@ -169,6 +169,7 @@ type context interface {
API() gpu.API
RenderTarget() (gpu.RenderTarget, error)
Present() error
// Refresh assumes the context is already locked and current.
Refresh() error
Release()
Lock() error