How to join this two things? How to create a widget (or any canvas) to draw in it from another thread?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can edit one of the examples in the OpenTk source download here to have a GTK# window and a OpenTK Gamewindow in the same application.
Download OpenTK source here:
http://sourceforge.net/projects/opentk/files/latest/download
First, make sure that the examples work by building and running the examples. Try the OpenTK multithreading one specifically, it should give you two windows with spinning cubes.
Now, edit the example to spawn a gtk# window instead of a second openTK gamewindow.
Open the file opentk/Source/Examples/OpenTK/Test/Multithreading.cs
You will need to make a function to create a gtk window, like so
Now edit the main loop to launch this window, like so:
You will now have a Gtk# window and OpenTK game windows in the same application.