Compare commits

...

3 Commits

Author SHA1 Message Date
Brett 478cba5e15 sampling 2024-04-16 02:43:42 -04:00
Brett 29ceade54c window context 2024-04-16 02:38:16 -04:00
Brett 301470331b multisampling 2024-04-16 02:28:11 -04:00
4 changed files with 11 additions and 4 deletions

View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Brett C++ Config" />
</state>
</component>

View File

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.25)
project(graphs VERSION 0.0.6)
project(graphs VERSION 0.0.9)
option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF)
option(ENABLE_UBSAN "Enable the ub sanitizer" OFF)

@ -1 +1 @@
Subproject commit 894355810995472652b83b9f18345d0c8c9fc3d2
Subproject commit cd7c34cb1616b8496acbf69042f0ab92cfbfca83

View File

@ -26,7 +26,7 @@ blt::gfx::resource_manager resources;
blt::gfx::batch_renderer_2d renderer_2d(resources);
blt::gfx::first_person_camera camera;
void init()
void init(blt::gfx::window_context& context)
{
using namespace blt::gfx;
@ -39,7 +39,7 @@ float x = 50, y = 50;
float sx = 0.5, sy = 0.5;
float ax = 0.05, ay = 0.05;
void update(std::int32_t width, std::int32_t height)
void update(blt::gfx::window_context& context, std::int32_t width, std::int32_t height)
{
global_matrices.update_perspectives(width, height, 90, 0.1, 2000);
@ -57,6 +57,8 @@ void update(std::int32_t width, std::int32_t height)
renderer_2d.drawLine(blt::vec4{1, 0, 1, 1}, 0.0f, blt::vec2{x,y}, blt::vec2{500, 500}, 5.0f);
renderer_2d.drawLine(blt::vec4{1, 0, 0, 1}, 0.0f, blt::vec2{0,150}, blt::vec2{240, 0}, 12.0f);
renderer_2d.drawPoint(blt::vec4{0, 1, 0, 1}, 1.0f, blt::vec2{500, 500}, 50.0f);
renderer_2d.drawPoint(blt::vec4{0, 1, 1, 1}, 1.0f, blt::vec2{800, 500}, 256.0f);
//renderer_2d.drawRectangle(blt::vec4{1,1,1,1}, -1.0f, blt::vec2{width / 2.0, height / 2.0}, blt::vec2{width, height});
camera.update();
camera.update_view(global_matrices);