mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 11:36:26 -04:00
f0ceea8b2e
* wip, taking a break to work on asm stuff first * the goal code for sparticle * mips2c the first sparticle asm function * temp * particle processing no longer crashing * temp * working texture cache for vi1 and hud textures * sprites * cleanup 1 * temp * temp * add zstd library * temp * working * tests * include fix * uncomment * better decomp of sparticle stuff, part 1 * update references
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
|
|
#include "game/graphics/dma/dma_chain_read.h"
|
|
#include "game/graphics/opengl_renderer/Shader.h"
|
|
#include "game/graphics/opengl_renderer/BucketRenderer.h"
|
|
|
|
class OpenGLRenderer {
|
|
public:
|
|
OpenGLRenderer(std::shared_ptr<TexturePool> texture_pool);
|
|
void render(DmaFollower dma,
|
|
int window_width_px,
|
|
int window_height_px,
|
|
bool draw_debug_window,
|
|
bool dump_playback);
|
|
void serialize(Serializer& ser);
|
|
|
|
private:
|
|
void setup_frame(int window_width_px, int window_height_px);
|
|
void draw_test_triangle();
|
|
void dispatch_buckets(DmaFollower dma);
|
|
void init_bucket_renderers();
|
|
void draw_renderer_selection_window();
|
|
|
|
template <typename T, class... Args>
|
|
void init_bucket_renderer(const std::string& name, BucketId id, Args&&... args) {
|
|
m_bucket_renderers.at((int)id) = std::make_unique<T>(name, id, std::forward<Args>(args)...);
|
|
}
|
|
|
|
SharedRenderState m_render_state;
|
|
|
|
std::array<std::unique_ptr<BucketRenderer>, (int)BucketId::MAX_BUCKETS> m_bucket_renderers;
|
|
};
|