mirror of
https://github.com/citra-emu/citra.git
synced 2024-12-27 14:40:07 +00:00
f14e973a27
* video_core/renderer_opengl: Move SurfaceParams into its own file Some of its enums are needed outside of the rasterizer cache and trying to use it caused circular dependencies. * video_core/renderer_opengl: Overhaul the texture filter framework This should make it less intrusive. Now texture filtering doesn't have any mutable global state. The texture filters now always upscale to the internal rendering resolution. This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function. This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size. * video_core/renderer_opengl: Use generated mipmaps for filtered textures The filtered guest mipmaps often looked terrible. * core/settings: Remove texture filter factor * sdl/config: Remove texture filter factor * qt/config: Remove texture filter factor
66 lines
1.9 KiB
C++
66 lines
1.9 KiB
C++
// Copyright 2014 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <memory>
|
|
#include "core/frontend/emu_window.h"
|
|
|
|
namespace Frontend {
|
|
class EmuWindow;
|
|
}
|
|
|
|
class RendererBase;
|
|
|
|
namespace Memory {
|
|
class MemorySystem;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Video Core namespace
|
|
|
|
namespace VideoCore {
|
|
|
|
extern std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
|
|
|
|
// TODO: Wrap these in a user settings struct along with any other graphics settings (often set from
|
|
// qt ui)
|
|
extern std::atomic<bool> g_hw_renderer_enabled;
|
|
extern std::atomic<bool> g_shader_jit_enabled;
|
|
extern std::atomic<bool> g_hw_shader_enabled;
|
|
extern std::atomic<bool> g_hw_shader_accurate_mul;
|
|
extern std::atomic<bool> g_use_disk_shader_cache;
|
|
extern std::atomic<bool> g_renderer_bg_color_update_requested;
|
|
extern std::atomic<bool> g_renderer_sampler_update_requested;
|
|
extern std::atomic<bool> g_renderer_shader_update_requested;
|
|
extern std::atomic<bool> g_texture_filter_update_requested;
|
|
// Screenshot
|
|
extern std::atomic<bool> g_renderer_screenshot_requested;
|
|
extern void* g_screenshot_bits;
|
|
extern std::function<void()> g_screenshot_complete_callback;
|
|
extern Layout::FramebufferLayout g_screenshot_framebuffer_layout;
|
|
|
|
extern Memory::MemorySystem* g_memory;
|
|
|
|
enum class ResultStatus {
|
|
Success,
|
|
ErrorGenericDrivers,
|
|
ErrorBelowGL33,
|
|
};
|
|
|
|
/// Initialize the video core
|
|
ResultStatus Init(Frontend::EmuWindow& emu_window, Memory::MemorySystem& memory);
|
|
|
|
/// Shutdown the video core
|
|
void Shutdown();
|
|
|
|
/// Request a screenshot of the next frame
|
|
void RequestScreenshot(void* data, std::function<void()> callback,
|
|
const Layout::FramebufferLayout& layout);
|
|
|
|
u16 GetResolutionScaleFactor();
|
|
|
|
} // namespace VideoCore
|