How to get as many information as possible about an OpenGL context

萝らか妹 提交于 2019-12-01 18:57:09

thanks for your suggestions, the "ApiTrace" idea was amazing, not only did I discovered a great tool, but it helped me to get some clues about my problem. Using ApiTrace:

  1. I checked that both versions (a) and (b) of my program were using exactly the same OpenGL contexts ... with great details and ease I must add ... and therefore that the error was not coming from the context initialization.
  2. I found out that in version (b) the rendering was done 5 times for more often than in version (a) ... meaning 5 times for the same frame !

The only logical conclusion I am aiming at is the difference in GTK+ signals between version 2 and 3, in version (a) of my program I use an expose-event while in version (b) I use a draw event (new signal for the GtkDrawingArea) ... obviously there are some differences in the behavior of the GTK+ library between version 2 and 3 at this point ... I am working on finding a way around it ... I will edit this answer to provide further information.

[EDIT]Hello world, answering my own question, hopefully to help someone to avoid the same mistake I did. To re-draw my OpenGL window I was using:

void update (GtkWidget * plot)
{
  gtk_widget_hide (plot);
  gtw_widget_show (plot);
}

Instead I should have been using:

gtk_widget_queue_draw (plot);

All problems solved ![/EDIT]

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!