Commit Graph

29 Commits (c0af42d6eb7dbe7879f555aa9a415faee4c3d6d1)

Author SHA1 Message Date
Lioncash 2665457f4a renderer_base: Make Rasterizer() return the rasterizer by reference
All calling code assumes that the rasterizer will be in a valid state,
which is a totally fine assumption. The only way the rasterizer wouldn't
be is if initialization is done incorrectly or fails, which is checked
against in System::Init().
7 years ago
Lioncash 6030c5ce41 video_core: Eliminate the g_renderer global variable
We move the initialization of the renderer to the core class, while
keeping the creation of it and any other specifics in video_core. This
way we can ensure that the renderer is initialized and doesn't give
unfettered access to the renderer. This also makes dependencies on types
more explicit.

For example, the GPU class doesn't need to depend on the
existence of a renderer, it only needs to care about whether or not it
has a rasterizer, but since it was accessing the global variable, it was
also making the renderer a part of its dependency chain. By adjusting
the interface, we can get rid of this dependency.
7 years ago
Lioncash 0f2ac928f2 video_core: Make global EmuWindow instance part of the base renderer class
Makes the global a member of the RendererBase class. We also change this
to be a reference. Passing any form of null pointer to these functions
is incorrect entirely, especially given the code itself assumes that the
pointer would always be in a valid state.

This also makes it easier to follow the lifecycle of instances being
used, as we explicitly interact the renderer with the rasterizer, rather
than it just operating on a global pointer.
7 years ago
bunnei bfe45774f1 video_core: Move FramebufferInfo to FramebufferConfig in GPU. 7 years ago
bunnei 656de23d93 renderer: Create rasterizer and cleanup. 7 years ago
bunnei deadcb39c2 renderer_opengl: Support framebuffer flip vertical. 7 years ago
bunnei ebd613c2cc renderer: Render previous frame when no new one is available. 7 years ago
James Rowe 1d28b2e142 Remove references to PICA and rasterizers in video_core 7 years ago
bunnei ee4691297f renderer_opengl: Support rendering Switch framebuffer. 7 years ago
bunnei 236d463c52 render_base: Add a struct describing framebuffer metadata. 7 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner 396a8d91a4 Manually tweak source formatting and then re-run clang-format 9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
bunnei 4a2d1571bc Merge pull request #1474 from lioncash/renderer
renderer_base: Minor changes
9 years ago
Lioncash 4b5b32e721 renderer_base: In-class initialize variables 9 years ago
Lioncash be913040a8 render_base: Clarify/normalize getter functions 9 years ago
Lioncash bf76afc68d renderer_base: Don't directly expose the rasterizer unique_ptr
There's no reason to allow direct access to the unique_ptr instance. Only
its contained pointer.
9 years ago
LittleWhite 4be68dddfb Improve error report from Init() functions
Add error popup when citra initialization failed
9 years ago
Yuri Kunde Schlesner 195fedccf0 VideoCore: Unify interface to OpenGL and SW rasterizers
This removes explicit checks sprinkled all over the codebase to instead
just have the SW rasterizer expose an implementation with no-ops for
most operations.
10 years ago
Emmanuel Gil Peyrot 4964a359e1 Core: Cleanup hw includes. 10 years ago
Emmanuel Gil Peyrot 45c4781544 CitraQt: Cleanup includes. 10 years ago
tfarley 05dc633a8c OpenGL renderer 10 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 10 years ago
purpasmart96 ebfd831ccb License change 11 years ago
Emmanuel Gil Peyrot f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 11 years ago
Yuri Kunde Schlesner 787a1b047c Remove virtual inheritance from RendererOpenGL
Also make destructor virtual so that instances are properly destructed.
11 years ago
bunnei a48c6b947d removed DISALLOW_COPY_AND_ASSIGN in favor of NonCopyable class 11 years ago
bunnei de0a034a84 fixed project includes to use new directory structure 11 years ago
bunnei 63e46abdb8 got rid of 'src' folders in each sub-project 11 years ago