mirror of
https://github.com/blawar/GLideN64.git
synced 2024-06-25 05:49:34 +00:00
Rename Drawer to GraphicsDrawer
This commit is contained in:
parent
0d8458d6b1
commit
f92dd70d36
|
@ -349,7 +349,7 @@
|
|||
<ClCompile Include="..\..\src\Performance.cpp" />
|
||||
<ClCompile Include="..\..\src\PostProcessor.cpp" />
|
||||
<ClCompile Include="..\..\src\RDP.CPP" />
|
||||
<ClCompile Include="..\..\src\Drawer.cpp">
|
||||
<ClCompile Include="..\..\src\GraphicsDrawer.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_mupenplus|Win32'">false</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\RSP.cpp" />
|
||||
|
@ -477,7 +477,7 @@
|
|||
<ClInclude Include="..\..\src\PluginAPI.h" />
|
||||
<ClInclude Include="..\..\src\PostProcessor.h" />
|
||||
<ClInclude Include="..\..\src\RDP.h" />
|
||||
<ClInclude Include="..\..\src\Drawer.h" />
|
||||
<ClInclude Include="..\..\src\GraphicsDrawer.h" />
|
||||
<ClInclude Include="..\..\src\RSP.h" />
|
||||
<ClInclude Include="..\..\src\ShaderUtils.h" />
|
||||
<ClInclude Include="..\..\src\SoftwareRender.h" />
|
||||
|
|
|
@ -341,12 +341,12 @@
|
|||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\mupen64plus\mupen64plus_DisplayWindow.cpp">
|
||||
<Filter>Source Files\Graphics\OpenGL\mupen64plus</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Drawer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\Graphics\OpenGLContext\opengl_UnbufferedDrawer.cpp">
|
||||
<Filter>Source Files\Graphics\OpenGL</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\GraphicsDrawer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\src\3DMath.h">
|
||||
|
@ -628,14 +628,14 @@
|
|||
<ClInclude Include="..\..\src\DisplayWindow.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Drawer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\DrawerImpl.h">
|
||||
<Filter>Header Files\Graphics</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\Graphics\OpenGLContext\opengl_UnbufferedDrawer.h">
|
||||
<Filter>Header Files\Graphics\OpenGL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\GraphicsDrawer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include "GLideN64.h"
|
||||
#include "OpenGL.h"
|
||||
#include "Drawer.h"
|
||||
#include "GraphicsDrawer.h"
|
||||
#include "gDP.h"
|
||||
#include "CombinerKey.h"
|
||||
#include "Graphics/CombinerProgram.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef GRAPHICS_DRAWERIMPL_H
|
||||
#define GRAPHICS_DRAWERIMPL_H
|
||||
#include <Drawer.h>
|
||||
#include <GraphicsDrawer.h>
|
||||
#include "Parameter.h"
|
||||
#include "CombinerProgram.h"
|
||||
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
#include "DisplayWindow.h"
|
||||
#include "SoftwareRender.h"
|
||||
#include "Graphics/DrawerImpl.h"
|
||||
#include "Drawer.h"
|
||||
#include "GraphicsDrawer.h"
|
||||
|
||||
using namespace graphics;
|
||||
|
||||
Drawer::Drawer()
|
||||
GraphicsDrawer::GraphicsDrawer()
|
||||
: m_modifyVertices(0)
|
||||
, m_bImageTexture(false)
|
||||
, m_bFlatColors(false)
|
||||
|
@ -22,7 +22,7 @@ Drawer::Drawer()
|
|||
{
|
||||
}
|
||||
|
||||
void Drawer::addTriangle(int _v0, int _v1, int _v2)
|
||||
void GraphicsDrawer::addTriangle(int _v0, int _v1, int _v2)
|
||||
{
|
||||
const u32 firstIndex = triangles.num;
|
||||
triangles.elements[triangles.num++] = _v0;
|
||||
|
@ -77,7 +77,7 @@ void Drawer::addTriangle(int _v0, int _v1, int _v2)
|
|||
}
|
||||
}
|
||||
|
||||
void Drawer::_updateCullFace() const
|
||||
void GraphicsDrawer::_updateCullFace() const
|
||||
{
|
||||
if (gSP.geometryMode & G_CULL_BOTH) {
|
||||
gfxContext.enable(enable::CULL_FACE, true);
|
||||
|
@ -90,12 +90,12 @@ void Drawer::_updateCullFace() const
|
|||
gfxContext.enable(enable::CULL_FACE, false);
|
||||
}
|
||||
|
||||
void Drawer::_updateDepthUpdate() const
|
||||
void GraphicsDrawer::_updateDepthUpdate() const
|
||||
{
|
||||
gfxContext.enableDepthWrite(gDP.otherMode.depthUpdate != 0);
|
||||
}
|
||||
|
||||
void Drawer::_updateDepthCompare() const
|
||||
void GraphicsDrawer::_updateDepthCompare() const
|
||||
{
|
||||
if (config.frameBufferEmulation.N64DepthCompare != 0) {
|
||||
gfxContext.enable(enable::DEPTH_TEST, false);
|
||||
|
@ -160,7 +160,7 @@ void _adjustScissorX(f32 & _X0, f32 & _X1, float _scale)
|
|||
_X1 = (_X1 - halfX) * _scale + halfX;
|
||||
}
|
||||
|
||||
void Drawer::updateScissor(FrameBuffer * _pBuffer) const
|
||||
void GraphicsDrawer::updateScissor(FrameBuffer * _pBuffer) const
|
||||
{
|
||||
DisplayWindow & wnd = DisplayWindow::get();
|
||||
f32 scaleX, scaleY;
|
||||
|
@ -195,7 +195,7 @@ float _adjustViewportX(f32 _X0)
|
|||
return (_X0 + halfVP - halfX) * video().getAdjustScale() + halfX - halfVP;
|
||||
}
|
||||
|
||||
void Drawer::_updateViewport() const
|
||||
void GraphicsDrawer::_updateViewport() const
|
||||
{
|
||||
DisplayWindow & wnd = DisplayWindow::get();
|
||||
FrameBuffer * pCurrentBuffer = frameBufferList().getCurrent();
|
||||
|
@ -223,7 +223,7 @@ void Drawer::_updateViewport() const
|
|||
gSP.changed &= ~CHANGED_VIEWPORT;
|
||||
}
|
||||
|
||||
void Drawer::_updateScreenCoordsViewport() const
|
||||
void GraphicsDrawer::_updateScreenCoordsViewport() const
|
||||
{
|
||||
DisplayWindow & wnd = DisplayWindow::get();
|
||||
FrameBuffer * pCurrentBuffer = frameBufferList().getCurrent();
|
||||
|
@ -234,7 +234,7 @@ void Drawer::_updateScreenCoordsViewport() const
|
|||
gSP.changed |= CHANGED_VIEWPORT;
|
||||
}
|
||||
|
||||
void Drawer::_legacySetBlendMode() const
|
||||
void GraphicsDrawer::_legacySetBlendMode() const
|
||||
{
|
||||
const u32 blendmode = gDP.otherMode.l >> 16;
|
||||
// 0x7000 = CVG_X_ALPHA|ALPHA_CVG_SEL|FORCE_BL
|
||||
|
@ -385,7 +385,7 @@ void Drawer::_legacySetBlendMode() const
|
|||
}
|
||||
}
|
||||
|
||||
void Drawer::_setBlendMode() const
|
||||
void GraphicsDrawer::_setBlendMode() const
|
||||
{
|
||||
if (config.generalEmulation.enableLegacyBlending != 0) {
|
||||
_legacySetBlendMode();
|
||||
|
@ -509,7 +509,7 @@ void Drawer::_setBlendMode() const
|
|||
}
|
||||
}
|
||||
|
||||
void Drawer::_updateTextures() const
|
||||
void GraphicsDrawer::_updateTextures() const
|
||||
{
|
||||
//For some reason updating the texture cache on the first frame of LOZ:OOT causes a nullptr Pointer exception...
|
||||
CombinerInfo & cmbInfo = CombinerInfo::get();
|
||||
|
@ -526,7 +526,7 @@ void Drawer::_updateTextures() const
|
|||
gSP.changed &= ~(CHANGED_TEXTURE);
|
||||
}
|
||||
|
||||
void Drawer::_updateStates(DrawingState _drawingState) const
|
||||
void GraphicsDrawer::_updateStates(DrawingState _drawingState) const
|
||||
{
|
||||
// DisplayWindow & ogl = DisplayWindow::get();
|
||||
|
||||
|
@ -600,7 +600,7 @@ void Drawer::_updateStates(DrawingState _drawingState) const
|
|||
}
|
||||
}
|
||||
|
||||
void Drawer::_prepareDrawTriangle(bool _dma)
|
||||
void GraphicsDrawer::_prepareDrawTriangle(bool _dma)
|
||||
{
|
||||
#ifdef GL_IMAGE_TEXTURES_SUPPORT
|
||||
if (m_bImageTexture && config.frameBufferEmulation.N64DepthCompare != 0)
|
||||
|
@ -628,12 +628,12 @@ void Drawer::_prepareDrawTriangle(bool _dma)
|
|||
m_modifyVertices = 0;
|
||||
}
|
||||
|
||||
bool Drawer::_canDraw() const
|
||||
bool GraphicsDrawer::_canDraw() const
|
||||
{
|
||||
return config.frameBufferEmulation.enable == 0 || frameBufferList().getCurrent() != nullptr;
|
||||
}
|
||||
|
||||
void Drawer::drawTriangles()
|
||||
void GraphicsDrawer::drawTriangles()
|
||||
{
|
||||
if (triangles.num == 0 || !_canDraw()) {
|
||||
triangles.num = 0;
|
|
@ -30,10 +30,10 @@ struct RectVertex
|
|||
float s0, t0, s1, t1;
|
||||
};
|
||||
|
||||
class Drawer
|
||||
class GraphicsDrawer
|
||||
{
|
||||
public:
|
||||
Drawer();
|
||||
GraphicsDrawer();
|
||||
|
||||
void addTriangle(int _v0, int _v1, int _v2);
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
|||
pBuffer(_pBuffer), pInputTexture(_pInputTexture), pOutputTexture(_pOutputTexture)
|
||||
{}
|
||||
private:
|
||||
friend class Drawer;
|
||||
friend class GraphicsDrawer;
|
||||
TexturedRectParams() :
|
||||
ulx(0), uly(0), lrx(0), lry(0)
|
||||
{};
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
void dropRenderState() { m_drawingState = DrawingState::None; }
|
||||
|
||||
private:
|
||||
Drawer(const Drawer &);
|
||||
GraphicsDrawer(const GraphicsDrawer &);
|
||||
|
||||
void _initExtensions();
|
||||
void _initStates();
|
Loading…
Reference in New Issue
Block a user