ref: 076a477239bf2742361420645ca129ae07657205
parent: 7ab6866d6bcf553309afc22dfbd8ffa6218dd2ce
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Oct 3 12:09:22 EDT 2020
Remove useless variable
--- a/src/Backends/Rendering/WiiU.cpp
+++ b/src/Backends/Rendering/WiiU.cpp
@@ -72,7 +72,6 @@
static GX2ContextState *gx2_context;
static RenderBackend_GlyphAtlas *glyph_atlas;
-static RenderBackend_Surface *glyph_destination_surface;
static VertexBufferSlot *local_vertex_buffer;
static size_t local_vertex_buffer_size;
@@ -747,7 +746,6 @@
static unsigned char last_blue;
glyph_atlas = atlas;
- glyph_destination_surface = destination_surface;
// Flush vertex data if a context-change is needed
if (last_render_mode != MODE_DRAW_GLYPH || last_destination_texture != &destination_surface->texture || last_source_texture != &atlas->texture || last_red != red || last_green != green || last_blue != blue)
@@ -755,7 +753,7 @@
FlushVertexBuffer();
last_render_mode = MODE_DRAW_GLYPH;
- last_destination_texture = &glyph_destination_surface->texture;
+ last_destination_texture = &destination_surface->texture;
last_source_texture = &atlas->texture;
last_red = red;
last_green = green;
@@ -762,9 +760,9 @@
last_blue = blue;
// Draw to the selected texture, instead of the screen
- GX2SetColorBuffer(&glyph_destination_surface->colour_buffer, GX2_RENDER_TARGET_0);
- GX2SetViewport(0.0f, 0.0f, (float)glyph_destination_surface->colour_buffer.surface.width, (float)glyph_destination_surface->colour_buffer.surface.height, 0.0f, 1.0f);
- GX2SetScissor(0, 0, glyph_destination_surface->colour_buffer.surface.width, glyph_destination_surface->colour_buffer.surface.height);
+ GX2SetColorBuffer(&destination_surface->colour_buffer, GX2_RENDER_TARGET_0);
+ GX2SetViewport(0.0f, 0.0f, (float)destination_surface->colour_buffer.surface.width, (float)destination_surface->colour_buffer.surface.height, 0.0f, 1.0f);
+ GX2SetScissor(0, 0, destination_surface->colour_buffer.surface.width, destination_surface->colour_buffer.surface.height);
// Select glyph shader
GX2SetFetchShader(&shader_group_glyph.fetchShader);
@@ -772,7 +770,7 @@
GX2SetPixelShader(shader_group_glyph.pixelShader);
// Set shader uniforms
- const float vertex_coordinate_transform[4] = {2.0f / glyph_destination_surface->texture.surface.width, -2.0f / glyph_destination_surface->texture.surface.height, 1.0f, 1.0f};
+ const float vertex_coordinate_transform[4] = {2.0f / destination_surface->texture.surface.width, -2.0f / destination_surface->texture.surface.height, 1.0f, 1.0f};
GX2SetVertexUniformReg(shader_group_glyph.vertexShader->uniformVars[0].offset, 4, (uint32_t*)vertex_coordinate_transform);
const float texture_coordinate_transform[4] = {1.0f / atlas->texture.surface.width, 1.0f / atlas->texture.surface.height, 1.0f, 1.0f};