GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Sample C code for GTK and OpenGL contexts, using GtkGLExt.

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Example Code
Author Message
IIR
Familiar Face


Joined: 10 Feb 2009
Posts: 5
Location: London, England

PostPosted: Tue Feb 10, 2009 1:44 pm    Post subject: Sample C code for GTK and OpenGL contexts, using GtkGLExt. Reply with quote

Hi folks, to help out anyone who is looking into using OpenGL within GTK windows (using GtkGLExt) I have released fully documented sample code in C to be used freely as you wish.

It provides safe render-process locking and smooth timer-based rendering while being simple, efficient and easy to understand what is going on.

Edit July 2009: The demo has been updated to use GtkBuilder and is now hosted on Sourceforge: http://gtkglapp.sourceforge.net/

To import the project into Eclipse IDE:
Open the menu 'File->Import...'.
From the 'General' options folder, select 'Existing Projects into Workspace' and click on the 'Next >' button.
Choose the 'Select archive file:' option and next to it click on the 'Browse...' button to navigate to the project archive (ending in '.tgz') you downloaded.
The project name will appear below - click on 'Finish'.
The project will be imported and opened in your Eclipse workspace.

For command-line users:
Please note that to run the application successfully outside of the Eclipse IDE environment (e.g. from a 'make' within the "../Debug/" directory) the GUI file "gtk_gl_tester.gtk" must reside in the same directory as the compiled binary for it to run.


Last edited by IIR on Fri Jul 31, 2009 10:10 pm; edited 5 times in total
Back to top
caracal
GTK+ Guru


Joined: 21 Jun 2007
Posts: 207
Location: Wilkes Barre Pa

PostPosted: Thu Feb 12, 2009 3:29 am    Post subject: Reply with quote

Nice and clean good job and thanks :)
Back to top
IIR
Familiar Face


Joined: 10 Feb 2009
Posts: 5
Location: London, England

PostPosted: Fri Jul 31, 2009 9:36 pm    Post subject: Reply with quote

Updated to use GtkBuilder and new host on Sourceforge.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Example Code All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP