Skip to content

Example with Tcl/Tk #2

@nico-robert

Description

@nico-robert

Hello ,
I would like to use your lib in Tcl / Tk, but my knowledge of python is poor.
Could you show me an example in Tcl, so far here's what I've done :

package req Tkgl
update idletasks
tkgl .gl -profile "3_2"
.gl makecurrent
# my lib openGl 
gl::glClearColor 0.0 1.0 1.0 0.0
gl::glClear      {GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT}
.gl swapbuffers
pack .gl

My window appears but disappears after a few seconds.
Can you tell me if the above example is correct?
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