Skip to content

Commit

Permalink
Code Format
Browse files Browse the repository at this point in the history
  • Loading branch information
vinsentli committed Dec 4, 2024
1 parent 905fb39 commit d41f494
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions shell/renderSessions/NanovgSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ int NanovgSession::loadDemoData(NVGcontext* vg, DemoData* data) {
IGL_DEBUG_ASSERT(false, "Could not add font icons.\n");
return -1;
}
data->fontNormal =
nvgCreateFont(vg, "sans", getImageFullPath("Roboto-Regular.ttf").c_str());
data->fontNormal = nvgCreateFont(vg, "sans", getImageFullPath("Roboto-Regular.ttf").c_str());
if (data->fontNormal == -1) {
IGL_DEBUG_ASSERT(false, "Could not add font italic.\n");
return -1;
}
data->fontBold =
nvgCreateFont(vg, "sans-bold", getImageFullPath("Roboto-Bold.ttf").c_str());
data->fontBold = nvgCreateFont(vg, "sans-bold", getImageFullPath("Roboto-Bold.ttf").c_str());
if (data->fontBold == -1) {
IGL_DEBUG_ASSERT(false, "Could not add font bold.\n");
return -1;
}
data->fontEmoji =
nvgCreateFont(vg, "emoji", getImageFullPath("NotoEmoji-Regular.ttf").c_str());
data->fontEmoji = nvgCreateFont(vg, "emoji", getImageFullPath("NotoEmoji-Regular.ttf").c_str());
if (data->fontEmoji == -1) {
IGL_DEBUG_ASSERT(false, "Could not add font emoji.\n");
return -1;
Expand Down Expand Up @@ -113,7 +110,8 @@ void NanovgSession::initialize() noexcept {
touchListener_ = std::make_shared<TouchListener>();
getPlatform().getInputDispatcher().addTouchListener(touchListener_);

nvgContext_ = iglu::nanovg::CreateContext(&getPlatform().getDevice(), iglu::nanovg::NVG_ANTIALIAS | iglu::nanovg::NVG_STENCIL_STROKES);
nvgContext_ = iglu::nanovg::CreateContext(
&getPlatform().getDevice(), iglu::nanovg::NVG_ANTIALIAS | iglu::nanovg::NVG_STENCIL_STROKES);

if (this->loadDemoData(nvgContext_, &nvgDemoData_) != 0) {
IGL_DEBUG_ASSERT(false);
Expand Down
2 changes: 1 addition & 1 deletion shell/renderSessions/NanovgSession.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TouchListener : public ITouchListener {
class NanovgSession : public RenderSession {
public:
explicit NanovgSession(std::shared_ptr<Platform> platform) : RenderSession(std::move(platform)) {
depthTextureFormat_ = igl::TextureFormat::S8_UInt_Z24_UNorm;
depthTextureFormat_ = igl::TextureFormat::S8_UInt_Z24_UNorm;
}
void initialize() noexcept override;
void update(igl::SurfaceTextures surfaceTextures) noexcept override;
Expand Down

0 comments on commit d41f494

Please sign in to comment.