-
I have followed a brief tutorial on how to get BGFX setup from Sandeep's blog post and was able to get a basic quad rendered onto the screen with the shader he used as an example. What I am trying to do is to convert his example from a 3D projection into 2D. I am trying to pull some functionality from the fonts example as I see that it is using an Ortho projection, but I am unable to see anything getting rendered. I've done the following changes from his example: Changed the view setup from:
to
Changed projection setup from:
to
I've also tried to keep and remove the Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Your quad is most likely getting culled because you're looking at it from the opposite side ( // turn culling off
BGFX_STATE_DEFAULT & ~BGFX_STATE_CULL_MASK
// counter-clockwise
(BGFX_STATE_DEFAULT & ~BGFX_STATE_CULL_MASK) | BGFX_STATE_CULL_CCW |
Beta Was this translation helpful? Give feedback.
Your quad is most likely getting culled because you're looking at it from the opposite side (
eye.z
changed from 10 to -1).BGFX_STATE_DEFAULT
implies clockwise culling, you can either turn off all culling or flip it to counter-clockwise: