mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
Refactored Vertex Pipeline to always use Pica Formatted Vertex
This commit is contained in:
parent
7f48334ffa
commit
ca89909c00
6 changed files with 72 additions and 82 deletions
|
@ -9,20 +9,11 @@
|
|||
#include "surface_cache.hpp"
|
||||
#include "textures.hpp"
|
||||
#include "PICA/regs.hpp"
|
||||
#include "PICA/pica_vertex.hpp"
|
||||
|
||||
// More circular dependencies!
|
||||
class GPU;
|
||||
|
||||
struct Vertex {
|
||||
OpenGL::vec4 position;
|
||||
OpenGL::vec4 colour;
|
||||
OpenGL::vec2 texcoord0;
|
||||
OpenGL::vec2 texcoord1;
|
||||
Floats::f24 texcoord0_w;
|
||||
u32 padding; // pad so that texcoord2 is 64-bit aligned
|
||||
OpenGL::vec2 texcoord2;
|
||||
};
|
||||
|
||||
class Renderer {
|
||||
GPU& gpu;
|
||||
OpenGL::Program triangleProgram;
|
||||
|
@ -95,7 +86,7 @@ class Renderer {
|
|||
void getGraphicsContext(); // Set up graphics context for rendering
|
||||
void clearBuffer(u32 startAddress, u32 endAddress, u32 value, u32 control); // Clear a GPU buffer in VRAM
|
||||
void displayTransfer(u32 inputAddr, u32 outputAddr, u32 inputSize, u32 outputSize, u32 flags); // Perform display transfer
|
||||
void drawVertices(PICA::PrimType primType, std::span<const Vertex> vertices); // Draw the given vertices
|
||||
void drawVertices(PICA::PrimType primType, std::span<const PicaVertex> vertices); // Draw the given vertices
|
||||
|
||||
void setFBSize(u32 width, u32 height) {
|
||||
fbSize.x() = width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue