Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
age_maker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marek Trtík
age_maker
Compare revisions
de491a65a2e9f1b2a0848bc244ced3de4cfc4896 to 079b3974dbe8ad319a9d1810245d6d9265adfb69
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
qtrtik/age_maker
Select target project
No results found
079b3974dbe8ad319a9d1810245d6d9265adfb69
Select Git revision
Branches
hanina
main
marek/lfs_tutorial
xbabic
xvincze
Swap
Target
qtrtik/age_maker
Select target project
qtrtik/age_maker
1 result
de491a65a2e9f1b2a0848bc244ced3de4cfc4896
Select Git revision
Branches
hanina
main
marek/lfs_tutorial
xbabic
xvincze
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
Using forward_unlit_vertex_color_shader for grid.
· 362eba14
Marek Trtik
authored
7 months ago
362eba14
Added lfs tutorial
· 079b3974
Marek Trtik
authored
7 months ago
079b3974
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/maker/presenter.hpp
+2
-0
2 additions, 0 deletions
include/maker/presenter.hpp
src/presenter.cpp
+20
-1
20 additions, 1 deletion
src/presenter.cpp
with
22 additions
and
1 deletion
include/maker/presenter.hpp
View file @
079b3974
...
...
@@ -19,6 +19,8 @@ struct Presenter : public com::Runner
protected
:
void
on_content_changed
(
File
*
sender
)
override
;
void
initialize
()
override
;
void
release
()
override
;
};
...
...
This diff is collapsed.
Click to expand it.
src/presenter.cpp
View file @
079b3974
...
...
@@ -3,6 +3,7 @@
#include
<gfx/index.hpp>
#include
<osi/index.hpp>
#include
<com/math_files.hpp>
#include
<lfs/index.hpp>
namespace
mak
{
...
...
@@ -20,7 +21,7 @@ void Presenter::initialize()
gfx
::
object_system
()
->
push_frame_back
(
gfx
::
object_system
()
->
insert_object
(
{
"grid"
},
gfx
::
material_system
()
->
insert_
default_
material
(
"grid_material"
,
{
"maker"
},
vec3
{
1.0
f
,
1.0
f
,
1.0
f
}
),
gfx
::
material_system
()
->
insert_material
(
"grid_material"
,
gfx
::
shader_system
()
->
forward_unlit_vertex_color_shader
(),
{
"maker"
}),
gfx
::
buffer_generators
()
->
insert_procedural_grid
()
),
grid_frame
()
...
...
@@ -59,6 +60,24 @@ void Presenter::initialize()
gfx
::
object_system
()
->
insert_light
(
test_box
,
dir_light
);
gfx
::
light_system
()
->
insert_shadow_caster
(
dir_light
,
test_box
);
// -----------------------------
auto
*
handle
{
lfs
::
loader
()
->
load
({
"age"
,
"texture"
,
"font"
,
"Consolas_16.txt"
})
};
if
(
handle
->
state
()
==
lfs
::
ResourceHandle
::
LOADED
)
Presenter
::
on_content_changed
(
handle
);
else
handle
->
register_on_content_changed
(
this
);
}
void
Presenter
::
on_content_changed
(
File
*
const
sender
)
{
if
(
lfs
::
ResourceHandle
*
const
handle
=
dynamic_cast
<
lfs
::
ResourceHandle
*>
(
sender
))
{
ASSUMPTION
(
handle
->
state
()
==
lfs
::
ResourceHandle
::
LOADED
);
std
::
string
const
my_loaded_data
{
handle
->
data
().
begin
(),
handle
->
data
().
end
()
};
handle
->
unregister_on_content_changed
(
this
);
}
}
void
Presenter
::
release
()
...
...
This diff is collapsed.
Click to expand it.