Skip to content

Opengl surface not properly updated when resizing the canvas #5

@koneklaudio

Description

@koneklaudio

When resizing the canvas (resizing the app window with the mouse), the opengl surface is not consistently being updated. The drawing gets shifted from the canvas frame.

Do I need to call any method in order to synchronize the opengl surface with the canvas size?

P.S.: To confirm this issue, I took the gradient.py example and changed the vertex array to match the canvas diagonal:

GL.glBufferData(GL.GL_ARRAY_BUFFER,
                            struct.pack('=ffffff',
                                        -1.0, -1.0,
                                        1.0, 1.0,
                                        -1.0, 1.0),
                            GL.GL_STATIC_DRAW)

When resizing the window, the triangle gets shifted from the canvas.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions