AndyAndroid
Active member
- Joined
- Jun 28, 2017
- Messages
- 120
@Ferdi - I think if you have implemented bgfx::setScissor you should not need to change the view mode to sequential as it will apply to the next draw primitive with the default indexing. However, having the ability to use sequential indexing is still useful and is probably a better choice for 2D drawing. Maybe you could test with the view mode set to default just to make sure.
For the clear screen it looks like as long as you set your view rectangle to the full screen, the clear should work, but of course you have two views to clear so double check that.
bgfx::setViewRect(0, xOffset, yOffset, width, height);
bgfx::setViewClear(0, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, color.asInteger(), 1.0f, 0);
bgfx::setViewRect(1, xOffset, yOffset, width, height);
bgfx::setViewClear(1, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, color.asInteger(), 1.0f, 0);
Not sure if it really matters, if DrawRect does the job, but I guess the setViewClear is more thorough. Also not sure if you are using frames because that could affect things too as you can't clear bgfx view multiple times per frame. Finally, maybe you would need to do a bgfx::submit(0) then one for view 1 directly after the call to each setViewClear?
For the clear screen it looks like as long as you set your view rectangle to the full screen, the clear should work, but of course you have two views to clear so double check that.
bgfx::setViewRect(0, xOffset, yOffset, width, height);
bgfx::setViewClear(0, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, color.asInteger(), 1.0f, 0);
bgfx::setViewRect(1, xOffset, yOffset, width, height);
bgfx::setViewClear(1, BGFX_CLEAR_COLOR | BGFX_CLEAR_DEPTH, color.asInteger(), 1.0f, 0);
Not sure if it really matters, if DrawRect does the job, but I guess the setViewClear is more thorough. Also not sure if you are using frames because that could affect things too as you can't clear bgfx view multiple times per frame. Finally, maybe you would need to do a bgfx::submit(0) then one for view 1 directly after the call to each setViewClear?