~10 FPS from moving some oct stuff to const, ~0.5 fps from adding a few more consts to initializers in the kernel
This commit is contained in:
27
include/FrameWatcher.h
Normal file
27
include/FrameWatcher.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "Pub_Sub.h"
|
||||
|
||||
class FrameWatcher : public VrEventPublisher{
|
||||
|
||||
|
||||
|
||||
|
||||
public:
|
||||
FrameWatcher();
|
||||
~FrameWatcher();
|
||||
|
||||
void do_tick();
|
||||
|
||||
private:
|
||||
|
||||
float get_elapsed_time();
|
||||
|
||||
float step_size = 0.0166f;
|
||||
double frame_time = 0.0;
|
||||
double elapsed_time = 0.0;
|
||||
double delta_time = 0.0;
|
||||
double accumulator_time = 0.0;
|
||||
double current_time = 0.0;
|
||||
|
||||
|
||||
};
|
||||
@@ -4,8 +4,6 @@
|
||||
#include "util.hpp"
|
||||
#include <tuple>
|
||||
|
||||
#define OCT_DIM 128
|
||||
|
||||
struct OctState {
|
||||
|
||||
int parent_stack_position = 0;
|
||||
@@ -69,8 +67,11 @@ public:
|
||||
|
||||
bool Validate(char* data, sf::Vector3i dimensions);
|
||||
|
||||
unsigned int getDimensions();
|
||||
private:
|
||||
|
||||
unsigned int oct_dimensions = 1;
|
||||
|
||||
std::tuple<uint64_t, uint64_t> GenerationRecursion(
|
||||
char* data, // raw octree data
|
||||
sf::Vector3i dimensions, // dimensions of the raw data
|
||||
|
||||
Reference in New Issue
Block a user