Display problem subwindow

Hi,

I’ve a project to complete - I’ve a program working under “MVS v6” using “glui v2.2” and I’ve to make it work under MVS2008. I’ve been able to solve all the compilation errors but I have a display problem now. My program’s creating a subwindow, but this subwindow doesn’t display it’s just black. I know the subwindow is there anyway because when I click at the right place - it modify my display correctly.

I’ve the same problem when I execute the “example5.cpp” given in the folder “glui_v2_2.zip”. The OpenGL interface displays correctly but the subwindow is just black.

I’ve no problem running the example5.cpp of “glui-2.36.zip” but this version of glui is not compatible with my code who’s written for glui2.2.

Someone have an idea?

Maybe it’s because I use Vista, is it possible?

Does someone has been able to run example5 of glui2.2 on Vista?

If you have Vista and glut installed, it takes only 5 minutes to try it…

Can someone help me please?

Are you getting any errors?

This will help you drill down to the root of the GL problem, if there’s an error on your part. Else it’s maybe a tool thing and I’m not going there.

Hi, thanks for answering. I’ve downloaded GLIntercept0.5 and I found some errors:

Here is the content of gliLog.txt

GL Intercept Log. Version : 0.5 Compile Date: Dec 3 2005 Run on: Wed Mar 04 17:15:39 2009

===================================================
The GLSL logger needs OpenGL 2.0 or better to run
The GLSL logger needs OpenGL 2.0 or better to run
The GLSL logger needs OpenGL 2.0 or better to run
GL ERROR - Function glColorMaterial(GL_AMBIENT_AND_DIFFUSE,GL_FRONT_AND_BACK) generated error GL_INVALID_ENUM
GL ERROR - Function glColorMaterial(GL_AMBIENT_AND_DIFFUSE,GL_FRONT_AND_BACK) generated error GL_INVALID_ENUM
// 4 more times the same error…
GL ERROR - Function glColorMaterial(GL_AMBIENT_AND_DIFFUSE,GL_FRONT_AND_BACK) generated error GL_INVALID_ENUM
GL ERROR - Function glColorMaterial(GL_AMBIENT_AND_DIFFUSE,GL_FRONT_AND_BACK) generated error GL_INVALID_ENUM
glEnd called whithout a glBegin
glEnd called whithout a glBegin
glEnd called whithout a glBegin
// 800 more times the same line…
glEnd called whithout a glBegin
glEnd called whithout a glBegin

I’ll try to solve those. If you have a suggestion It would be great

thx

I’ve been able to solve the GL ERROR. I’ve replace a line in the file glui_rotation.cpp.

I’ve replace glColorMaterial(GL_AMBIENT_AND_DIFFUSE, GL_FRONT_AND_BACK );
by glColorMaterial(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE );

Here is the content of gliLog.txt now

GL Intercept Log. Version : 0.5 Compile Date: Dec 3 2005 Run on: Thu Mar 05 14:02:32 2009

===================================================
The GLSL logger needs OpenGL 2.0 or better to run
The GLSL logger needs OpenGL 2.0 or better to run
glEnd called whithout a glBegin
glEnd called whithout a glBegin
… 800 more times…
glEnd called whithout a glBegin
glEnd called whithout a glBegin
glEnd called whithout a glBegin

Log End.

Using GLIntercept on example4 or example5 - the file gliLog.txt contents the same thing. But example4 displays correctly and example5 doesn’t.

I guest “glEnd called whithout a glBegin” is not a good thing. Can it be the reason why my subwindow does’nt display? Is there an easy way to find where this problem come from?

thank you
Max

IMO, you problem will be fixed faster updating your code to glui 2.36 instead of hacking around the 2.2 source code. It might be not a curious coincidence if glui 2.36 has been released.

Sure that’s a good idea - I’m able to compile example #5 with glui 2.36 - so it should work.

The problem is that I’m running a fat old program. It was build to work with glui 2.2 and I get compilation error when I try to built it with the library glui v.2.36.

Maybe it’s not that hard to correct but I don’t know how to do that.

Here is a part of my building output when I try to build - I’ve 18 times the error LNK2019

1>Principale.obj : error LNK2019: unresolved external symbol “public: class GLUI_Translation * __thiscall GLUI::add_translation(char *,int,float ,int,void (__cdecl)(int))” (?add_translation@GLUI@@QAEPAVGLUI_Translation@@PADHPAMHP6AXH@Z@Z) referenced in function “public: void __thiscall CFenetrePrincipale::FenetreCommande1(void)” (?FenetreCommande1@CFenetrePrincipale@@QAEXXZ)

1>Principale.obj : error LNK2019: unresolved external symbol “public: class GLUI_Rotation * __thiscall GLUI::add_rotation(char *,float ,int,void (__cdecl)(int))” (?add_rotation@GLUI@@QAEPAVGLUI_Rotation@@PADPAMHP6AXH@Z@Z) referenced in function “public: void __thiscall CFenetrePrincipale::FenetreCommande1(void)” (?FenetreCommande1@CFenetrePrincipale@@QAEXXZ)

1>Principale.obj : error LNK2019: unresolved external symbol “public: class GLUI_EditText * __thiscall GLUI::add_edittext(char *,int,void ,int,void (__cdecl)(int))” (?add_edittext@GLUI@@QAEPAVGLUI_EditText@@PADHPAXHP6AXH@Z@Z) referenced in function “public: void __thiscall CFenetrePrincipale::FenetreCommande1(void)” (?FenetreCommande1@CFenetrePrincipale@@QAEXXZ)

Any suggestion would be great
thanks for the help

Max

It looks like, your header is fine but your are linking with the bad library… check your project configuration and path to see if your program actually uses headers and libraries from the 2.36 release.

You are a king ! I had the old file glui.h in my project - I removed it and it works fine now.

Thank you very much - Merci beaucoup !

So if someone have a display problem like I had - the solution I found is to use glui-2.36