disable outlining because it is janky af
parent
672e6b8b60
commit
8b5b0b2c05
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
set(BLT_GRAPHICS_VERSION 0.13.23)
|
||||
set(BLT_GRAPHICS_VERSION 0.13.24)
|
||||
set(BLT_GRAPHICS_TEST_VERSION 0.0.1)
|
||||
|
||||
project(BLT_WITH_GRAPHICS VERSION ${BLT_GRAPHICS_VERSION})
|
||||
|
|
|
@ -182,42 +182,53 @@ namespace blt::gfx
|
|||
render_reset();
|
||||
}
|
||||
|
||||
// void batch_renderer_2d::draw_objects()
|
||||
// {
|
||||
// pre_reset();
|
||||
// const f32 denominator = 1.0f / (draw.z_max - draw.z_min);
|
||||
//
|
||||
// glEnable(GL_STENCIL_TEST);
|
||||
// glClear(GL_STENCIL_BUFFER_BIT);
|
||||
// glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
// glStencilMask(0xFF);
|
||||
//
|
||||
// glStencilFunc(GL_ALWAYS, 1, 0xFF);
|
||||
// draw_points(true, false, denominator);
|
||||
//
|
||||
// glDisable(GL_DEPTH_TEST);
|
||||
// glStencilFunc(GL_EQUAL, 1, 0xFF);
|
||||
// draw_points(false, true, denominator);
|
||||
// glEnable(GL_DEPTH_TEST);
|
||||
//
|
||||
// glStencilFunc(GL_ALWAYS, 2, 0xFF);
|
||||
// draw_rectangles(true, false, denominator);
|
||||
//
|
||||
// glDisable(GL_DEPTH_TEST);
|
||||
// glStencilFunc(GL_EQUAL, 2, 0xFF);
|
||||
// draw_rectangles(false, true, denominator);
|
||||
// glEnable(GL_DEPTH_TEST);
|
||||
//
|
||||
// glStencilFunc(GL_ALWAYS, 4, 0xFF);
|
||||
// draw_lines(true, false, denominator);
|
||||
//
|
||||
// glDisable(GL_DEPTH_TEST);
|
||||
// glStencilFunc(GL_EQUAL, 4, 0xFF);
|
||||
// draw_lines(false, true, denominator);
|
||||
// glEnable(GL_DEPTH_TEST);
|
||||
//
|
||||
// glStencilMask(0x00);
|
||||
// glDisable(GL_STENCIL_TEST);
|
||||
// post_reset();
|
||||
// }
|
||||
void batch_renderer_2d::draw_objects()
|
||||
{
|
||||
pre_reset();
|
||||
const f32 denominator = 1.0f / (draw.z_max - draw.z_min);
|
||||
|
||||
glEnable(GL_STENCIL_TEST);
|
||||
glClear(GL_STENCIL_BUFFER_BIT);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
glStencilMask(0xFF);
|
||||
|
||||
glStencilFunc(GL_ALWAYS, 1, 0xFF);
|
||||
draw_points(true, false, denominator);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glStencilFunc(GL_EQUAL, 1, 0xFF);
|
||||
draw_points(false, true, denominator);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
glStencilFunc(GL_ALWAYS, 2, 0xFF);
|
||||
draw_rectangles(true, false, denominator);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glStencilFunc(GL_EQUAL, 2, 0xFF);
|
||||
draw_rectangles(false, true, denominator);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
glStencilFunc(GL_ALWAYS, 4, 0xFF);
|
||||
draw_lines(true, false, denominator);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glStencilFunc(GL_EQUAL, 4, 0xFF);
|
||||
draw_lines(false, true, denominator);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
glStencilMask(0x00);
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
draw_points(false, false, denominator);
|
||||
draw_rectangles(false, false, denominator);
|
||||
draw_lines(false, false, denominator);
|
||||
post_reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue