Jump to content
IGNORED

Font / Text Retention


OVERRiDE

Recommended Posts

Hi guys,

 

It seems that after any call to rapPrint in one vsync, the text is retained through all subsequent vsync cycles and displayed on all frames thereafter.  I need to know how to truncate the internal text buffer used by the API.

I'm not seeing any documentation on how to clear this text buffer, but this is producing some odd artifacts in my project:

  • If I am printing different text on the same line across different frames, I have to add whitespaces in the text to clear extra characters from the previous frame.  Example; in one frame I print "Hello, world!" on a line, if on the next frame I print "123" on the same line, "123lo, world!" is actually displayed.  To mitigate this, I am having to add whitespaces as "123         " to get my expected result.
  • If I want to remove an entire line of text that was rendered in a previous frame, I have to print an entire line of text that is all whitespaces to get this cleared from the screen.  This is far from optimal.
  • This happens even if I am pointing js_r_textbuffer to different character arrays(strings) in RAM - so there must be some internal caching in the API that needs to be cleared. 

 

I can post examples if needed, but I think this explains it pretty well.

 

As always, any help appreciated!

Link to comment
Share on other sites

Hi,

 

It's not cached, the print commands "draw" the text directly to the particle layer. So they will persist once you have printed.

 

There is a CLS() command to clear the whole buffer, or as you've already been doing, you can print "whitespace" over old text, which is actually quicker than clearing the whole particle layer with CLS, if it's only a few areas.

 

Edit: As Fadest said, you're better off printing once and just print over values that change as and when. If you CLS and print everything every frame, you will notice slowdown (just printing every frame is ok though).

 

Edited by Sporadic
Link to comment
Share on other sites

9 hours ago, OVERRiDE said:

I'm not seeing any documentation on how to clear this text buffer, but this is producing some odd artifacts in my project:

  • If I am printing different text on the same line across different frames, I have to add whitespaces in the text to clear extra characters from the previous frame.  Example; in one frame I print "Hello, world!" on a line, if on the next frame I print "123" on the same line, "123lo, world!" is actually displayed.  To mitigate this, I am having to add whitespaces as "123         " to get my expected result.
  • If I want to remove an entire line of text that was rendered in a previous frame, I have to print an entire line of text that is all whitespaces to get this cleared from the screen.  This is far from optimal.
  • This happens even if I am pointing js_r_textbuffer to different character arrays(strings) in RAM - so there must be some internal caching in the API that needs to be cleared. 

 

 

This is working as intended, as others above have responded.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...