mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(world): make test routines to render CM2Scene in CWorldScene
This commit is contained in:
parent
b1694c2897
commit
0e4ef3aa29
3 changed files with 53 additions and 5 deletions
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include <bc/Memory.hpp>
|
||||
#include <tempest/Matrix.hpp>
|
||||
#include <common/Time.hpp>
|
||||
|
||||
|
||||
CGWorldFrame* CGWorldFrame::s_currentWorldFrame = nullptr;
|
||||
|
|
@ -166,7 +167,7 @@ void CGWorldFrame::OnWorldRender() {
|
|||
GxRsSet(GxRs_Multisample, 1);
|
||||
|
||||
if (true) {
|
||||
CImVector clearColor = { 0, 0, 0, 0xFF };
|
||||
CImVector clearColor = { 0x80, 0x80, 0x80, 0xFF };
|
||||
GxSceneClear(3, clearColor);
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +188,11 @@ void CGWorldFrame::OnWorldRender() {
|
|||
|
||||
CShaderEffect::UpdateProjMatrix();
|
||||
|
||||
CWorld::Render(C3Vector(), 0.0f);
|
||||
static auto s_time = 0;
|
||||
|
||||
float elapsed = static_cast<float>(OsGetAsyncTimeMs() - s_time) / 1000.0f;
|
||||
s_time = OsGetAsyncTimeMs();
|
||||
CWorld::Render(C3Vector(), elapsed);
|
||||
|
||||
if (CWorldScene::s_m2Scene) {
|
||||
CWorldScene::s_m2Scene->Draw(M2PASS_0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue