This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Sign in to follow this  
Followers 0
OcularCash

LWJGL 3 Custom Text Rendering

1 post in this topic

So I'm going to post a text rendering method I'm using for LWJGL 3. Seems there really isn't any libraries supporting version 3, only version 2. So here is a rather robust but effective and quick implementation (rendering thousands of characters 'hundreds of full length strings' at over 50 fps on a old home computer).

 

GUI.java

Please login or register to see this code.

 

Font.java

Please login or register to see this code.

 

This ofcourse is not going to work straight out of the box because I've also got a quad class that creates the quad and stores it in a vbo and ofcourse using uniforms in the shader, etc.. etc.. But for the actual creation of the font, offsetting and label calls, it's all there.

 

Methods are modification from Please login or register to see this link. by TheBoneJarmer but 6000% the speed. The script found there is in a single script so it's easier to read and is standalone (out of the box), but is very very slow

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0