[SOLVED] LoginScreen exemple : nothing is displayed

Started by faneva, 20 August 2015, 16:12:14

faneva

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

texus

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.

faneva

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

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).

faneva

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

#5
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?

faneva

#6
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 :)




texus

#7
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.

faneva

QuoteI 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 )