www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: MichaelJPCT on December 28, 2015, 03:38:19 pm

Title: techniques for displaying text
Post by: MichaelJPCT on December 28, 2015, 03:38:19 pm
right now i am looking into text rendering. after some research i found several ways to put text onto screen:
1) texture blitting as the way jpct examples do
2) billboard object3D placed in front of camera
3) using overlay class of jpct
4) make rectangles to hold texture of each character and render these rectangles with ortho projection and depth-test off

i would like to know whether blitting is the fastest method (runtime performance) and whether the 4th method can be done in jpct - i need to manipulate opengl states manually such as calling glDisable, glMatrixMode at a specific time in the rendering process.
Title: Re: techniques for displaying text
Post by: EgonOlsen on December 28, 2015, 05:41:48 pm
You can't fiddle around with direct GL calls. Blitting should actually be OK, have a look at raft's classes for text rendering. They are very helpful.
Title: Re: techniques for displaying text
Post by: MichaelJPCT on December 29, 2015, 07:30:30 am
can i achieve multipass rendering of the same world (with different camera settings) or sequential rendering of multiple worlds in a specified order?
Title: Re: techniques for displaying text
Post by: EgonOlsen on December 29, 2015, 09:38:47 am
Yes and yes, just do it. But you can't render the same Object3D instance in different world instances unless you constantly remove and add it.
Title: Re: techniques for displaying text
Post by: EgonOlsen on December 29, 2015, 09:39:28 am
BTW: raft's classes for text rendering: http://www.jpct.net/forum2/index.php/topic,1074.0.html (http://www.jpct.net/forum2/index.php/topic,1074.0.html)
Title: Re: techniques for displaying text
Post by: MichaelJPCT on December 29, 2015, 11:10:27 am
many thanks, i'll look into it.