-2

Currently working on a project using WxWidgets I want to use a wxGLCanvas unfortunately nothing is showing up.

I've installed a lot of packages on my Fedora (21) without any improvement, I've already installed the "standard" opengl package since I've another project using only opengl and it's working.

Does anyone have an idea of which package I need to use ?

Here is a list of all packages I've installed : http://pastebin.com/CNCs47X2

P.S. : It's working on a server under Ubuntu 10.04 . So I don't think it's a code problem. The code : http://pastebin.com/SU5R5HT9

Jérôme B
  • 311
  • 5
  • 18
  • Maybe check which package are installed on your ubuntu that aren't on your fedora (I know the packages sometimes don't have the same name and its deb vs rpm but it could help). Also : does your code compile ? – Félix Cantournet Feb 27 '15 at 14:04
  • So my code is compiling, that's the problem I don't really know where the problem comes from. I've checked the packages but I can't see something different : http://pastebin.com/neXfDZw0 – Jérôme B Feb 27 '15 at 14:17

2 Answers2

1

Check whether the wxWidgets OpenGL samples, e.g. samples/opengl/cube work for you. If they don't, you would at least know that the problem is due to something in this machine configuration. If they do, you would know that it's due to a bug in your code.

Without knowing which of the two it is, it's very difficult to help you.

VZ.
  • 21,740
  • 3
  • 39
  • 42
  • I used this example : https://wiki.wxwidgets.org/WxGLCanvas and it works (I think : http://i.imgur.com/DNpEAZH.png) so like you said it is probably caused by something in my code ... but I just don't get it, where could it be ? > – Jérôme B Feb 27 '15 at 16:16
  • A little update : I was working on another function and it showed the canvas just before crashing so it's in fact a bug in my code. Code : http://pastebin.com/sHNAj1yD – Jérôme B Feb 27 '15 at 18:08
  • Try to find the places where your code differs from the sample, then bisect the differences, i.e. either start changing the sample to look more like your code or start changing your code to look more like the sample. When you will manage to make the sample crash or your code work you will have found it. Good luck! – VZ. Feb 27 '15 at 20:59
0

I just added

glFlush();

before

SwapBuffers();

and it worked ...

Jérôme B
  • 311
  • 5
  • 18