Files
jak-project/game/graphics/opengl_renderer/ProgressRenderer.h
T
water111 2c12a4e00b [jak2] WIP minimap (#2280)
Work in progress minimap. Known issues:
- "path finding" doesn't appear to work - it gets stuck forever in many
cases
- some nasty patches around timer-based code
- jak arrow blending issues
- would be nice to make it higher resolution

if the search is forced to terminate due to iteration/time limits, the
icon is not in the right place

![image](https://user-images.githubusercontent.com/48171810/221432792-678d6124-a6a6-4875-a91f-7eceedbfec98.png)
2023-02-27 19:51:14 -05:00

28 lines
1010 B
C++

#pragma once
#include "game/graphics/opengl_renderer/BucketRenderer.h"
#include "game/graphics/opengl_renderer/DirectRenderer.h"
#include "game/graphics/opengl_renderer/opengl_utils.h"
/*!
* Renderer for the "Progress Bucket" of Jak 2.
*/
class ProgressRenderer : public DirectRenderer {
public:
static constexpr int kMinimapVramAddr = 4032;
static constexpr int kMinimapWidth = 128;
static constexpr int kMinimapHeight = 128;
static constexpr int kScreenFbp = 408;
static constexpr int kMinimapFbp = 126;
ProgressRenderer(const std::string& name, int my_id, int batch_size);
void init_textures(TexturePool& texture_pool, GameVersion) override;
void handle_frame(u64 val, SharedRenderState* render_state, ScopedProfilerNode& prof) override;
void pre_render() override;
void post_render() override;
private:
GpuTexture* m_minimap_gpu_tex = nullptr;
FramebufferTexturePair m_minimap_fb;
std::optional<FramebufferTexturePairContext> m_fb_ctxt;
u32 m_current_fbp = kScreenFbp;
};