#Trying to make an Text Renderer

9 messages · Page 1 of 1 (latest)

tawdry jolt
#

Hey everyone, Im currently trying to write an Text renderer in Rust for my Engine, I mostly tried to follow https://learnopengl.com/In-Practice/Text-Rendering and "convert" the opengl stuff into vulkan. Im loading the Fonts using the Freetype library.

So first i go over all the Characters i want to load and loading them as an Vulkan Image, Using this code:
https://pastebin.com/6s9gTDkT.
when when i want to render the text, I bind my pipeline and push my constants then i iterate over each char i want to draw and create an new vertex buffer is their isn't one for it already, You can find my rendering code here:
https://pastebin.com/z3BTBYxm.
Thats my shader code btw:
https://pastebin.com/DL1m4QR5

So i get no validation errors or something, The Problem is that i just do not see any text, I think that im maybe calculating something wrong in the pushconstants or the vertices. I new to 2D programming and until now always used Vulkan for 3D Programming. So I ask for help 😄

btw: You can find all the code in my ui crate in github:
https://github.com/ventengine/Vent-Engine/tree/master/crates/vent-ui/src

GitHub

A game engine written in Rust with the goal to be very fast & user-friendly - ventengine/Vent-Engine

noble swallow
#

The best tool for problems like this is RenderDoc. You can capture a frame of your application and view every draw call in detail to see exactly what might be going wrong.

tawdry jolt
#

I have been using renderdoc, Still not sure what im doing wrong

noble swallow
#

You said that you don't see any text, where is it meant to be?

tawdry jolt
#

yes

noble swallow
#

That..wasn't a yes/no question 😅

tawdry jolt
#

ah

#

it should be rendered at x=10 and y=10