Skip to content

Commit

Permalink
Tutorial 19: disable canvas antialiasing on the Web
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Aug 26, 2024
1 parent 0d033d6 commit 788faa0
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,15 @@ void Tutorial19_RenderPasses::ModifyEngineInitInfo(const ModifyEngineInitInfoAtt

// We do not need the depth buffer from the swap chain in this sample
Attribs.SCDesc.DepthBufferFormat = TEX_FORMAT_UNKNOWN;

#if PLATFORM_EMSCRIPTEN
if (Attribs.DeviceType == RENDER_DEVICE_TYPE_GLES)
{
EngineGLCreateInfo& EngineGlCI = static_cast<EngineGLCreateInfo&>(Attribs.EngineCI);
// Disable canvas antialiasing
EngineGlCI.WebGLAttribs.Antialias = false;
}
#endif
}


Expand Down

0 comments on commit 788faa0

Please sign in to comment.