GLBasic forum

Main forum => GLBasic - en => Topic started by: CCJ on 2010-Mar-26

Title: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: CCJ on 2010-Mar-26
Hey all,
I'm just starting up with GLBasic and I'm having a bit of a problem... When I try out a simple
Code (glbasic) Select
PRINT "hello world" ,100,100
SHOWSCREEN
MOUSEWAIT
END

I get nothing but a black screen.  I tried running the sample programs showcasing various GLBasic features (the included hello world program on up to 2D and 3D graphics examples) and I got the same black screen.  I've read the various threads about black screen issues and their common causes, but nothing seems to fix my problem.  What uncommon things could cause a black screen?  Could it be related to directories (i.e. where I've installed GLBasic versus where exactly I'm saving files)?
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: MrTAToad on 2010-Mar-26
Create a font using the font utility, save it in the same place as the executable and call it smalfont.png
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: Wampus on 2010-Mar-26
I've found you don't need to include a separate font file. You can just add LOADFONT "smallfont.png", 1 in the beginning of your code and the default tiny font will work.

Try it.
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: CCJ on 2010-Mar-26
well that did it all right.  Maybe the font issue should have been mentioned on page one of the manual so that the very first 'hello world' example would work...oh well, thanks guys!
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: MrTAToad on 2010-Mar-26
It is a problem introduced in the previous update.
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: CCJ on 2010-Apr-04
Ok, still having some problems here-- I can't get anything but the default ridiculously tiny font.  I've tried creating multiple other fonts, saving them via file>save as .glfont files in setup and saving them as .png files in setup, and always pressing the 'ok, create' button, but no matter what name I specify in quotes in the LOADFONT statement I always get the original smallfont.  If I load up the font design utility and open the custom fonts they do exist as I left them, so this leads me to believe I am having a directory path issue.  When processing the LOADFONT command where exactly does the compiler look?  What file does it look for, the .png or the .glfont?  In what folder should my projects be saved to ensure they can find all the setup info they need at compile time?

Thanks
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: trucidare on 2010-Apr-04
the font file must be in same directory as the exe file. copy it into xxx.app folder
Title: Re: Okay, nothing but a black screen..[and I didn't forget SHOWSCREEN]
Post by: MrTAToad on 2010-Apr-04
Yes - dont forget to put all data in the .app directory - can cause problems if you forget :)