Skip to content

Commit

Permalink
profile_function
Browse files Browse the repository at this point in the history
  • Loading branch information
vojd committed Dec 5, 2023
1 parent 3f16044 commit 4e10c52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/render/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Renderer {
}

pub fn draw(&self, state: &mut AppState, shader_service: &ShaderService) {
puffin::profile_function!();
puffin::profile_function!("draw");
let gl = self.gl.clone();
unsafe {
gl.bind_vertex_array(Some(self.vertex_array));
Expand Down
2 changes: 1 addition & 1 deletion src/shader/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl ShaderService {

/// Reloading re-constructs all shaders.
pub fn reload(&mut self, config: PreProcessorConfig) {
puffin::profile_function!();
self.pre_processor.config = config;
for shader in self.shaders.iter_mut() {
let reloaded_shader = self.pre_processor.load_file(shader.get_main_shader_path());
Expand Down Expand Up @@ -132,7 +133,6 @@ impl ShaderService {

if let Some(path) = base_shader.content.main_shader_path.parent() {
let snapshot_dir = path.join("snapshots");
dbg!(&snapshot_dir);

// Create directory if it doesn't exist
if !snapshot_dir.is_dir() {
Expand Down

0 comments on commit 4e10c52

Please sign in to comment.