Author Topic: techniques for displaying text  (Read 3270 times)

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
techniques for displaying text
« 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: techniques for displaying text
« Reply #1 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.

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
Re: techniques for displaying text
« Reply #2 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?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: techniques for displaying text
« Reply #3 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.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: techniques for displaying text
« Reply #4 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

Offline MichaelJPCT

  • float
  • ****
  • Posts: 264
    • View Profile
Re: techniques for displaying text
« Reply #5 on: December 29, 2015, 11:10:27 am »
many thanks, i'll look into it.