Hello Guest

Font renderer : Nothing appear to the screen !

  • 22 Replies
  • 12159 Views
*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Font renderer : Nothing appear to the screen !
« on: November 01, 2013, 16:48:26 »
I tried to make a font renderer, I arived to create one but nothing is appearing to the screen ! I have verified all the rendering code, LWJGL initialization, Crach Reporter, Display creator and BrickBroken Launcher, but the method is correctly called and display is ok and the rendering code too. I have seen the CrashReporter but no errors are detected. So i don't understand why nothing is appearing to the screen !

Here is the text rendering code (renderEngine is RenderEngine or the main game render engine class) :


Code: [Select]
--PRIVATE--

Thanks by advance,
Yuri6037
« Last Edit: November 14, 2013, 12:00:53 by Yuri6037 »

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #1 on: November 02, 2013, 16:40:28 »
Nobody knows why my code is giving me nothing ?

I realy need that code to work for finishing the new version of my game !

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #2 on: November 03, 2013, 09:21:23 »
Nobody...
So my game will never been finished...

I don't understand why nobody knows that !


Please let me know if nobody can help ! I have to know if I need to close or not this topic !

*

Offline abcdef

  • ****
  • 335
Re: Font renderer : Nothing appear to the screen !
« Reply #3 on: November 06, 2013, 14:37:25 »
Yuri6037

You don't really make it easy for people to comment.

1) We have no idea if you have a texture loaded correctly and that it contains text
2) Have you tried passing in a texture you know works to test whether it displays anything?
3) Have you tried putting your texture in a piece of code that you know works and can display textures
4) Have you got all your Open GL flags setup correctly?

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #4 on: November 06, 2013, 22:11:53 »
Thanks for answer,
Like I have said before, the render engine which contains mounting textures voids, is functioning. Otherwise the main class brick broken will not be able to load ! The font texture is 1024 by 1024 (it contains all chars in ASCII code), maybe it's gl constants at game init.
Like I said the whole game renders correctly only texts are not drew !
If you want I can post the lwjgl initialization void.


Wrote with my iPad,
Yuri6037

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Font renderer : Nothing appear to the screen !
« Reply #5 on: November 07, 2013, 17:00:41 »
That would be helpful.

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #6 on: November 07, 2013, 20:10:51 »
So, here's the LWJGL initialization :
Code: [Select]
--PRIVATE--

Thanks for answer,
Yuri6037
« Last Edit: November 14, 2013, 12:01:24 by Yuri6037 »

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #7 on: November 10, 2013, 09:54:05 »
Allways nobody !

I don't know how to fix that ! Please help !

Would you wan't some other code ask me for the code you wan't !

I can give you the RenderEngine code if you wan't ! But if I post the render engine here, please not to copy - paste it for your 2d games projects ! Ok ?

I have spend many time on creating this RenderEngine, so please not kill this project...

Here is the RenderEngine class :
Code: [Select]
--PRIVATE--

Now ColorRenderer class :
Code: [Select]
--PRIVATE--

And the FontRenderer class :
Code: [Select]
--PRIVATE--

And in if you wan't, here is the textures :
The missing texture file (32 by 32) :
--You do not have permission to access StoneLine servers--
Now the font texture file (1024 by 1024) :
--You do not have permission to access StoneLine servers--

Thanks by advance,
And another time please not copy these codes, I give you the permission for view and test these codes but you may not bring these for you. Otherwise you will kill the BrickBroken project !

Yuri6037
« Last Edit: November 14, 2013, 12:03:08 by Yuri6037 »

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Font renderer : Nothing appear to the screen !
« Reply #8 on: November 10, 2013, 13:44:06 »
Look: if no one sees any problems in your code and no one has any ideas, then we cannot help. I'm going to write a little, self contained exemplar for you. I will actually write this up in an IDE and compile and run it to ensure it works. Hopefully you'll be able to compare and contrast that with your own to see what the problem might be. I'll post it up when I'm done.

Your "font texture file" doesn't seem to contain anything. It would be easier for me to have one but I don't particularly want to bother making my own.
« Last Edit: November 10, 2013, 14:00:48 by quew8 »

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #9 on: November 10, 2013, 15:06:51 »
That's normal because letters are white it seams like your screen make the forum white !
You need right clicking + save image or simply go in this link :
--You do not have permission to access StoneLine servers-- --> Font texture
--You do not have permission to access StoneLine servers-- --> Missing texture
« Last Edit: November 14, 2013, 12:03:51 by Yuri6037 »

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Font renderer : Nothing appear to the screen !
« Reply #10 on: November 10, 2013, 15:28:12 »

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Font renderer : Nothing appear to the screen !
« Reply #11 on: November 10, 2013, 16:31:02 »
So here it is. http://pastebin.com/80NSu3pL. Use as much or as little as you like. If there is any particular thing you don't understand then I can explain it. If you find whatever it is in your code that is stopping your renderer working, then I can probably explain that too. But just to stress, this works. I've tested it. It's a little simplistic and I would never even think about releasing this as production code but it should suit your purposes. The idea of it is a self-contained and (more or less) minimalistic example.

In terms of debugging, I think I have given you about as much help as is possible. Certainly as much as I am willing.

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #12 on: November 11, 2013, 16:25:18 »
Thank you very much for taking your time to do this code for me...

But I'm so sorry to say you that : It's not working ! Nothing appear to the screen !

No errors ! I have simply replace my function by your function but nothing ! Nothing ! I think my graphic card simple does not handles text position with floats !

If you have another solution tell me. If you need some other codes, ask me. I'm realy lost ! I can not find any solution to resolve this problem. I have tried a solution that was working : drawing text without texture but with quads (and strangely with floats for coords and size) !

I don't know what I can do !

Here is the new code of FontRenderer class :
Code: [Select]
--PRIVATE--
« Last Edit: November 14, 2013, 12:04:24 by Yuri6037 »

*

Offline quew8

  • *****
  • 569
  • Because Square Eyes Look More Real
Re: Font renderer : Nothing appear to the screen !
« Reply #13 on: November 11, 2013, 16:49:44 »
The idea was to compare the two for anything that's different. Anything that is could be the cause of the problem. Try running the example on its own. See if it works then.

*

Offline Yuri6037

  • ***
  • 104
  • Check out our website : http://www.sldt-team.net !
    • SLDT
Re: Font renderer : Nothing appear to the screen !
« Reply #14 on: November 13, 2013, 17:04:39 »
Your example is working a lot of !
No lags !
I got about 1200 FPS !


And I have advanced a little !

When I was developping for Minecraft with Minecraft Forge, I needed to implement another Gui part.

When I have tried to draw some texts, I got nothing, like BrickBroken ! And after putting two unknown functions the text appeared : --PRIVATE-- and --PRIVATE--.

Do you understand now ?
The problem is that when putting these methods in BrickBroken, colored Quads are not rendered or rendered with transparency, so I don't know how I can implement these functions.

Yuri6037

EDIT : TESTED but nothing on the screen same problem ! I don't know. We have tested all we can but always nothing on the screen !

EDIT2 : YEEEEEEAAAAAAAAHHHHHH !!!! I have found the origin of the main problem ! Here :
There are two problematics lines of codes :
- one line of initialization who reduce the text two verry little not readable : --PRIVATE--;
- and this line kill the text : --PRIVATE-- (only change the x - y coords by 0,0)
Please help me !

EDIT3 : It seams that changing y coord may kill the text ! But questions are : WHY ? WTF ?!
« Last Edit: November 14, 2013, 12:05:25 by Yuri6037 »