[SOLVED] LoginScreen exemple : nothing is displayed
« on: 20 August 2015, 16:12:14 »
Hi everyone,
 
I tried to run out the LoginScreen exemple from tgui but i got nothing on my window, just black screen
On the console, i got this error message:

An internal OpenGL call failed in Texture.c++(526) : GL_INVALID_VALUE, a numeric argument is out of range

Anyone can help me?

Regards,

PS:
I want to implement this lib for my little game SFML/BOX2D

I use the version 0.6.9 of tgui, compiled with cmake, codeblock (by following the tutorial guide), SFML 2.2, windows 7
« Last Edit: 31 August 2015, 15:54:42 by faneva »

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: LoginScreen exemple : nothing is displayed
« Reply #1 on: 20 August 2015, 16:43:47 »
Do you get that error once or multiple times?
Can you use sf::Texture, sf::Sprite and sf::Text in a normal SFML program without TGUI?

I suspect that this will be due to your graphics drivers, so you should try updating them.

Re: LoginScreen exemple : nothing is displayed
« Reply #2 on: 21 August 2015, 08:11:05 »
Thanks for your reply,  ;)

1- No, I got the error just at the start

2- Yes, I do use sf::Texture, sf::Sprite and sf::Text without any problem in a normal SFML. I got this only when using TGUI


*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: LoginScreen exemple : nothing is displayed
« Reply #3 on: 21 August 2015, 12:45:03 »
I can only guess with issues like these. The line where it fails doesn't make much sense either.

Can you still use sf::Sprite and such without problems inside a program that uses TGUI?
Are you sure you are not mixing debug and release or static and dynamic linking?
What compiler version do you have exactly?

If you have multiple SFML versions on your pc, open cmake, set the build directory where tgui was build, check the "Advanced" checkbox and look at the SFML_INCLUDE_DIR and the SFML_[COMPONENT]_LIBRARY_[DYNAMIC/STATIC]_[DEBUG/RELEASE] options. Make sure that they contain the correct SFML directories (or are set to the NOTFOUND value when they are not available).

Re: LoginScreen exemple : nothing is displayed
« Reply #4 on: 24 August 2015, 06:53:44 »
Hi, sorry for the late reply

1- Yes, I can use sf::Sprite without any problem inside a TGUI program
2- For the moment I use only debug and dynamic linking
3- I used cmake 3.3.0 rc3 , codeblocks 13.12 (cygwin included)

I use only SFML 2.2 so I don't think I mixed up with some other version.
The only thing I didn't understand is TGUI_BUILD_FORM_BUILDER and TGUI_SHARED_LIBS so I checked them in CMake

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: LoginScreen exemple : nothing is displayed
« Reply #5 on: 24 August 2015, 12:31:55 »
Checking TGUI_SHARED_LIBS means that it builds libraries for dynamic linking, so that seems to be ok.

I'm starting to run out of ideas on where the issue could be.
Could you find out which line is causing the opengl error (by debugging or by putting couts in the program)?
What is the exact download link for your compiler? CodeBlocks is just the IDE and by mentioning cygwin I don't think you have the compiler that ships with codeblocks (even if you do then there are two different versions).
Could you send me the .cbp file of your project?

Unless the location of the opengl error tells me something more I will have to try and reproduce the problem here, I guess I should start installing another windows in virtualbox.

Edit: Just to be 100% certain that there isn't a line missing, could you also post the exact code that you are compiling here?
« Last Edit: 24 August 2015, 12:43:44 by texus »

Re: LoginScreen exemple : nothing is displayed
« Reply #6 on: 31 August 2015, 06:56:18 »
Hi Texus,

So sorry for the very late reply, I was really busy,
I think I found the origin of this problem,
With cmake , I tried to build a Debug (by changing CMAKE_BUILD_TYPE option to "Debug") version after I build a Release one.
So when I switched to a release version, it work like a charm.

My mistake, I forgot the -d option for debug.

Anyway, this issue is solved (but I can't find the "solved" button).

Thanks a lot for your return and sorry for my stupidity :)



« Last Edit: 31 August 2015, 07:02:47 by faneva »

*

texus

  • *****
  • 1143
    • View Profile
    • Texus's Blog
Re: LoginScreen exemple : nothing is displayed
« Reply #7 on: 31 August 2015, 12:42:55 »
I though mixing debug and release libraries would lead to a crash, I guess it just leads to undefined behavior.
At least next time someone reports that nothing is being displayed I know what he should check first.

There is no way to mark a topic as solved in this forum, although you could edit the subject of the first post and add "[Solved]" to it. But marking it as solved isn't really needed.
I have added a "Topic Solved" button and marked this topic as solved. I guess it can be useful in the future to keep track of which topics are still active.
« Last Edit: 31 August 2015, 12:54:06 by texus »

Re: [SOLVED] LoginScreen exemple : nothing is displayed
« Reply #8 on: 31 August 2015, 16:00:36 »
Quote
I though mixing debug and release libraries would lead to a crash

I though that way too, that's why I was stuck on this like an idiot  ;D

Anyway, thanks again (y)!!!

( This lib is pretty AWESOME btw  :D )