Text without AWT?

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?

Xerxes Rånby
adi wrote
Hi Ranby

No, my sources are not a closedsource codebase
Great!
Please post a link to your source code repository that host your free software, public domain or open source project so that I can take a look at it!

adi wrote
, but
to big and complex to describing i a single message.
I think in the moment i can't found somewhere who can
help me with that.
I think i will write code that can read in
'distance field fonts' an than can display the text with
shaders without using old fixed pipeline code.
Don't worry I can gasp large codebases and will take a look at this specific issue in your large free software, public domain or open source codebase.
All you have to do is provide a link to your source code.
adi
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

adi
In reply to this post by adi
Hello

After some tests i  have found
the problem, it was the fontsize in
textRegionUtil.drawString3D(gl, regionRenderer,/* Font */  font, fontSize, "Hello", null, sampleCount);
The font can't be set to a normal fontsize e.g. 32.0f, ist gigantic:-)
Better setting is from 0.2f and lower.
The other problem was the coordinates for the screen [-1,1][-1,1].
(A bit text for that over the class .........)
Its good for drawing about a scene but not for drawing in a scene as an 3D object.
For that, i must use shaders.  
 
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

Xerxes Rånby
Good to hear that you managed to get the text to render inside your application after fixing where it got rendered
Please post a picture and a link when we can test your engine
adi
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

adi
Yes, but it can take a bit time.
I have written a server that can host's Servlets, Restful and Soap Services and
Websockets with different protocols. The jogl client that i now write connects
to this server.For that i need good looking fonts:-)


     
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

gouessej
Administrator
Good job. I use some RESTful APIs too with several J2EE servers (Jetty, Wildfly, JBoss) :)
Julien Gouesse | Personal blog | Website
adi
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

adi
This post was updated on .
Sounds good.
I use also Widlfly and Jboss.
I have the server written for Java SE, for JEE there already JBoss and other.
For that i use, Tyrus, Grizzly,Jersey and Apache-Deltaspike und Jboss WELD for CDI integration.  
In the moment i struggle with the design for a perfomant distance field font displayer for 3D
for integration in my jogl project.
What can be a better approach?
Copy at program start all single char maps (mostly used 97) to GPU and reference it (texture binding),
or create the char info dynamically at runtime and send it to the GPU with GL4.GL_STREAM_DRAW to the GPU?
For 2D the second approach it's better for flexible manage scaling i think, but in 3D there
is no need for such scaling.        
   
adi
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?Solved!

adi
Now i have found a solution for me with bitmaps:



Next i will make a solution with a distance field fonts shader.

But what i want at first was a font (svg?) that is not
direct related to a screen, how bitmaps, tty or freetype fonts,
where each character is a 3d object.
Does somewhere know a tool or simple format for that?    
 
Reply | Threaded
Open this post in threaded view
|

Re: Text without AWT?

LordSmoke
In reply to this post by adi
Just wanted to say Thank You to the contributors to this thread. I am starting to look at fonts in my jogl project, and this has been a big help.

Again, Thanks!
12