Replies: 1 comment
-
I just figured out the problem. I was using view ID 0 for both the text and the geometry. It works fine if I use view ID 1 for the text. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having trouble getting static text to render along with 3D geometry using Direct3D 12 on Windows 10. I added a few blocks of code from example-10-font to example-01-cubes in attempt to get the text to overlay the rotating cubes. The code was copied and pasted verbatim with only the change of a couple of variable names to prevent compile ### errors.
The text renders exactly like in example-10-font but without the cubes if I used both blocks of code. If I comment out the second block of code added to ExampleCubes::update() then the cubes render exactly as expected but the text does not appear.
I suspect this is a transform/projection problem but I can't see a problem with those. Does anybody have any suggestions to get the text and the 3D geometry rendering at the same time?
Thanks in advance for any help!
========================================================
This is the block of code added to the very end of ExampleCubes::init()
{ // create static text
}
This is the block of code added just before bgfx::frame() near the end of ExampleCubes::update()
{ // render the static text
}
// Advance to next frame. Rendering thread will be kicked to
// process submitted rendering primitives.
bgfx::frame();
Beta Was this translation helpful? Give feedback.
All reactions