Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

RPTD

OpenGL opengl+gdk = evil...

This topic is 5242 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

wanna do a small editor which displays a small preview of the map i''m doing using opengl. to speed up deving i take gtk+. i already looked at the source of some other small app doing similar but my problem still persists. i''ve got a drawable area widget which hosts as the window for rendering the scene into (same as in the other app). whenever i render the scene under the "expose" event the scene is rendered but immediatly GTK overwrites my window with black (the window background color)... WTF?! somebody worked already with gtk+ and opengl without additional toolkits and got it to work?

Share this post


Link to post
Share on other sites
Advertisement
Have you tried to set the widget to "app paintable" (with gtk_widget_set_app_paintable and true, you can only do it after the widget is realized, which you can force with gtk_widget_realize). You''re not really suppose to draw on widgets except during a widget''s real expose handler (i.e., by making a custom widget), but that should enable it.

Try the gtk-app-devel mailing list if GameDev isn''t too helpful.

Share this post


Link to post
Share on other sites
thx for the tip but i found out what it was. i stumbled by luck over it. widgets are double buffered and the opengl drawing didn't end up in this double buffer.
gtk_widget_set_double_buffered(GTK_WIDGET(p_wnd), FALSE);
that did the job

EDIT: but that app-drawable sounds nice too. have to try it out perhaps sometimes else. i know there will once come the time i've to port my model editor over to GTK (*shruggs*)... anyways...

[edited by - RPTD on April 11, 2004 12:30:12 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!