mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
gpu/internal/opengl: restore BeginFrame state in EndFrame
To ease the integration with foreign OpenGL contexts, carefully save the context state before rendering a frame and restore it afterwards. Gio rendering can then be mixed with OpenGL code that expects exclusive control over context state. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -365,6 +365,8 @@ func New(api API) (GPU, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
d.BeginFrame(false, image.Point{})
|
||||
defer d.EndFrame()
|
||||
forceCompute := os.Getenv("GIORENDERER") == "forcecompute"
|
||||
feats := d.Caps().Features
|
||||
switch {
|
||||
|
||||
Reference in New Issue
Block a user