Permalink
Browse files

Guess what? More renaming

  • Loading branch information...
1 parent 9b439e4 commit f86b9f7900f4c7ad3f9b4365515c2b6428a09df4 @hrydgard committed Dec 25, 2016
@@ -25,7 +25,7 @@ class GraphicsContext {
// Needs casting to the appropriate type, unfortunately. Should find a better solution..
virtual void *GetAPIContext() { return nullptr; }
- virtual Draw::Thin3DContext *CreateThin3DContext() = 0;
+ virtual Draw::DrawContext *CreateThin3DContext() = 0;
};
class DummyGraphicsContext : public GraphicsContext {
@@ -35,5 +35,5 @@ class DummyGraphicsContext : public GraphicsContext {
void SwapBuffers() override {}
void Resize() override {}
- Draw::Thin3DContext *CreateThin3DContext() override { return nullptr; }
+ Draw::DrawContext *CreateThin3DContext() override { return nullptr; }
};
@@ -35,7 +35,7 @@ class FileLoader;
class GraphicsContext;
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
}
// PSP_CoreParameter()
@@ -46,7 +46,7 @@ struct CoreParameter {
GPUCore gpuCore;
GraphicsContext *graphicsContext; // TODO: Find a better place.
- Draw::Thin3DContext *thin3d;
+ Draw::DrawContext *thin3d;
bool enableSound; // there aren't multiple sound cores.
std::string fileToStart;
@@ -513,7 +513,7 @@ GPU_DX9::~GPU_DX9() {
// Needs to be called on GPU thread, not reporting thread.
void GPU_DX9::BuildReportingInfo() {
using namespace Draw;
- Thin3DContext *thin3d = gfxCtx_->CreateThin3DContext();
+ DrawContext *thin3d = gfxCtx_->CreateThin3DContext();
reportingPrimaryInfo_ = thin3d->GetInfoString(InfoField::VENDORSTRING);
reportingFullInfo_ = reportingPrimaryInfo_ + " - " + System_GetProperty(SYSPROP_GPUDRIVER_VERSION) + " - " + thin3d->GetInfoString(InfoField::SHADELANGVERSION);
View
@@ -46,7 +46,7 @@ static void SetGPU(T *obj) {
#undef new
#endif
-bool GPU_Init(GraphicsContext *ctx, Draw::Thin3DContext *thin3d) {
+bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *thin3d) {
switch (PSP_CoreParameter().gpuCore) {
case GPUCORE_NULL:
SetGPU(new NullGPU());
View
@@ -99,8 +99,8 @@ extern GPUInterface *gpu;
extern GPUDebugInterface *gpuDebug;
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
}
-bool GPU_Init(GraphicsContext *ctx, Draw::Thin3DContext *thin3d);
+bool GPU_Init(GraphicsContext *ctx, Draw::DrawContext *thin3d);
void GPU_Shutdown();
@@ -51,7 +51,7 @@ static Draw::SamplerState *samplerLinear = nullptr;
static Draw::Buffer *vdata = nullptr;
static Draw::Buffer *idata = nullptr;
-SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::Thin3DContext *_thin3D)
+SoftGPU::SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *_thin3D)
: gfxCtx_(gfxCtx), thin3d(_thin3D)
{
using namespace Draw;
@@ -46,13 +46,13 @@ typedef struct {
class ShaderManager;
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
class Texture;
}
class SoftGPU : public GPUCommon {
public:
- SoftGPU(GraphicsContext *gfxCtx, Draw::Thin3DContext *_thin3D);
+ SoftGPU(GraphicsContext *gfxCtx, Draw::DrawContext *_thin3D);
~SoftGPU();
void InitClear() override {}
void ExecuteOp(u32 op, u32 diff) override;
@@ -108,6 +108,6 @@ class SoftGPU : public GPUCommon {
GraphicsContext *gfxCtx_;
Draw::Texture *fbTex;
- Draw::Thin3DContext *thin3d;
+ Draw::DrawContext *thin3d;
std::vector<u32> fbTexBuffer;
};
View
@@ -353,7 +353,7 @@ void SystemInfoScreen::CreateViews() {
#endif
deviceSpecs->Add(new ItemHeader("GPU Information"));
- Thin3DContext *thin3d = screenManager()->getThin3DContext();
+ DrawContext *thin3d = screenManager()->getThin3DContext();
deviceSpecs->Add(new InfoItem("3D API", thin3d->GetInfoString(InfoField::APINAME)));
deviceSpecs->Add(new InfoItem("Vendor", std::string(thin3d->GetInfoString(InfoField::VENDORSTRING)) + " (" + thin3d->GetInfoString(InfoField::VENDOR) + ")"));
View
@@ -991,7 +991,7 @@ void EmuScreen::render() {
bool useBufferedRendering = g_Config.iRenderingMode != FB_NON_BUFFERED_MODE;
if (!useBufferedRendering) {
- Thin3DContext *thin3d = screenManager()->getThin3DContext();
+ DrawContext *thin3d = screenManager()->getThin3DContext();
thin3d->Clear(ClearFlag::COLOR | ClearFlag::DEPTH | ClearFlag::STENCIL, 0xFF000000, 0.0f, 0);
Viewport viewport;
@@ -1032,7 +1032,7 @@ void EmuScreen::render() {
fbo_unbind();
if (!osm.IsEmpty() || g_Config.bShowDebugStats || g_Config.iShowFPSCounter || g_Config.bShowTouchControls || g_Config.bShowDeveloperMenu || g_Config.bShowAudioDebug || saveStatePreview_->GetVisibility() != UI::V_GONE || g_Config.bShowFrameProfiler) {
- Thin3DContext *thin3d = screenManager()->getThin3DContext();
+ DrawContext *thin3d = screenManager()->getThin3DContext();
// This sets up some important states but not the viewport.
screenManager()->getUIContext()->Begin();
@@ -730,7 +730,7 @@ void GameInfoCache::WaitUntilDone(GameInfo *info) {
// Runs on the main thread.
-GameInfo *GameInfoCache::GetInfo(Draw::Thin3DContext *thin3d, const std::string &gamePath, int wantFlags) {
+GameInfo *GameInfoCache::GetInfo(Draw::DrawContext *thin3d, const std::string &gamePath, int wantFlags) {
GameInfo *info = 0;
auto iter = info_.find(gamePath);
@@ -781,7 +781,7 @@ GameInfo *GameInfoCache::GetInfo(Draw::Thin3DContext *thin3d, const std::string
return info;
}
-void GameInfoCache::SetupTexture(GameInfo *info, std::string &textureData, Draw::Thin3DContext *thin3d, Draw::Texture *&tex, double &loadTime) {
+void GameInfoCache::SetupTexture(GameInfo *info, std::string &textureData, Draw::DrawContext *thin3d, Draw::Texture *&tex, double &loadTime) {
using namespace Draw;
if (textureData.size()) {
if (!tex) {
View
@@ -26,7 +26,7 @@
#include "Core/Loaders.h"
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
class Texture;
}
class PrioritizedWorkQueue;
@@ -192,7 +192,7 @@ class GameInfoCache {
// but filled in later asynchronously in the background. So keep calling this,
// redrawing the UI often. Only set flags to GAMEINFO_WANTBG or WANTSND if you really want them
// because they're big. bgTextures and sound may be discarded over time as well.
- GameInfo *GetInfo(Draw::Thin3DContext *thin3d, const std::string &gamePath, int wantFlags);
+ GameInfo *GetInfo(Draw::DrawContext *thin3d, const std::string &gamePath, int wantFlags);
void FlushBGs(); // Gets rid of all BG textures. Also gets rid of bg sounds.
PrioritizedWorkQueue *WorkQueue() { return gameInfoWQ_; }
@@ -202,7 +202,7 @@ class GameInfoCache {
private:
void Init();
void Shutdown();
- void SetupTexture(GameInfo *info, std::string &textureData, Draw::Thin3DContext *thin3d, Draw::Texture *&tex, double &loadTime);
+ void SetupTexture(GameInfo *info, std::string &textureData, Draw::DrawContext *thin3d, Draw::Texture *&tex, double &loadTime);
// Maps ISO path to info.
std::map<std::string, GameInfo *> info_;
View
@@ -185,7 +185,7 @@ void GameScreen::update(InputState &input) {
I18NCategory *ga = GetI18NCategory("Game");
- Draw::Thin3DContext *thin3d = screenManager()->getThin3DContext();
+ Draw::DrawContext *thin3d = screenManager()->getThin3DContext();
GameInfo *info = g_gameInfoCache->GetInfo(thin3d, gamePath_, GAMEINFO_WANTBG | GAMEINFO_WANTSIZE);
View
@@ -139,15 +139,15 @@ struct PendingMessage {
static recursive_mutex pendingMutex;
static std::vector<PendingMessage> pendingMessages;
-static Draw::Thin3DContext *thin3d;
+static Draw::DrawContext *thin3d;
static UIContext *uiContext;
static std::vector<std::string> inputboxValue;
#ifdef _WIN32
WindowsAudioBackend *winAudioBackend;
#endif
-Draw::Thin3DContext *GetThin3D() {
+Draw::DrawContext *GetThin3D() {
return thin3d;
}
@@ -15,7 +15,7 @@ void D3D11Context::SwapBuffers() {
swapChain_->Present(0, 0);
}
-Draw::Thin3DContext *D3D11Context::CreateThin3DContext() {
+Draw::DrawContext *D3D11Context::CreateThin3DContext() {
return Draw::T3DCreateD3D11Context(); // device_, context_);
}
@@ -23,7 +23,7 @@
#include "Windows/GPU/WindowsGraphicsContext.h"
#include <d3d11.h>
-class Thin3DContext;
+class DrawContext;
class D3D11Context : public WindowsGraphicsContext {
public:
@@ -37,7 +37,7 @@ class D3D11Context : public WindowsGraphicsContext {
void Resize() override;
- Draw::Thin3DContext *CreateThin3DContext() override;
+ Draw::DrawContext *CreateThin3DContext() override;
private:
ID3D11Device *device_;
@@ -27,7 +27,7 @@ void D3D9Context::SwapBuffers() {
}
}
-Draw::Thin3DContext *D3D9Context::CreateThin3DContext() {
+Draw::DrawContext *D3D9Context::CreateThin3DContext() {
return Draw::T3DCreateDX9Context(d3d, d3dEx, adapterId, device, deviceEx);
}
@@ -24,7 +24,7 @@
#include <d3d9.h>
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
}
class D3D9Context : public WindowsGraphicsContext {
@@ -39,7 +39,7 @@ class D3D9Context : public WindowsGraphicsContext {
void Resize() override;
- Draw::Thin3DContext *CreateThin3DContext() override;
+ Draw::DrawContext *CreateThin3DContext() override;
private:
bool has9Ex;
@@ -400,7 +400,7 @@ void WindowsGLContext::Shutdown() {
void WindowsGLContext::Resize() {
}
-Draw::Thin3DContext *WindowsGLContext::CreateThin3DContext() {
+Draw::DrawContext *WindowsGLContext::CreateThin3DContext() {
CheckGLExtensions();
return Draw::T3DCreateGLContext();
}
@@ -4,7 +4,7 @@
#include "Windows/GPU/WindowsGraphicsContext.h"
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
}
class WindowsGLContext : public WindowsGraphicsContext {
@@ -21,7 +21,7 @@ class WindowsGLContext : public WindowsGraphicsContext {
void Resize() override;
- Draw::Thin3DContext *CreateThin3DContext() override;
+ Draw::DrawContext *CreateThin3DContext() override;
private:
HDC hDC; // Private GDI Device Context
@@ -206,7 +206,7 @@ void WindowsVulkanContext::Shutdown() {
finalize_glslang();
}
-Draw::Thin3DContext *WindowsVulkanContext::CreateThin3DContext() {
+Draw::DrawContext *WindowsVulkanContext::CreateThin3DContext() {
return Draw::T3DCreateVulkanContext(g_Vulkan);
}
@@ -31,6 +31,6 @@ class WindowsVulkanContext : public WindowsGraphicsContext {
void *GetAPIContext();
- Draw::Thin3DContext *CreateThin3DContext() override;
+ Draw::DrawContext *CreateThin3DContext() override;
};
@@ -48,7 +48,7 @@ SDLJoystick *joystick = NULL;
class GLDummyGraphicsContext : public DummyGraphicsContext {
public:
- Thin3DContext *CreateThin3DContext() override {
+ DrawContext *CreateThin3DContext() override {
CheckGLExtensions();
return T3DCreateGLContext();
}
@@ -32,7 +32,7 @@ DrawBuffer::~DrawBuffer() {
delete [] verts_;
}
-void DrawBuffer::Init(Draw::Thin3DContext *t3d) {
+void DrawBuffer::Init(Draw::DrawContext *t3d) {
using namespace Draw;
if (inited_)
@@ -67,7 +67,7 @@ class DrawBuffer {
void End();
// TODO: Enforce these. Now Init is autocalled and shutdown not called.
- void Init(Draw::Thin3DContext *t3d);
+ void Init(Draw::DrawContext *t3d);
void Shutdown();
int Count() const { return count_; }
@@ -157,7 +157,7 @@ class DrawBuffer {
Matrix4x4 drawMatrix_;
- Draw::Thin3DContext *t3d_;
+ Draw::DrawContext *t3d_;
Draw::Buffer *vbuf_;
Draw::Thin3DVertexFormat *vformat_;
Draw::ShaderSet *shaderSet_;
@@ -50,7 +50,7 @@ struct TextDrawerContext {
int *pBitmapBits;
};
-TextDrawer::TextDrawer(Draw::Thin3DContext *thin3d) : thin3d_(thin3d), ctx_(nullptr) {
+TextDrawer::TextDrawer(Draw::DrawContext *thin3d) : thin3d_(thin3d), ctx_(nullptr) {
fontScaleX_ = 1.0f;
fontScaleY_ = 1.0f;
@@ -300,7 +300,7 @@ void TextDrawer::DrawString(DrawBuffer &target, const char *str, float x, float
#else
-TextDrawer::TextDrawer(Thin3DContext *thin3d) : thin3d_(thin3d), ctx_(NULL) {
+TextDrawer::TextDrawer(DrawContext *thin3d) : thin3d_(thin3d), ctx_(NULL) {
fontScaleX_ = 1.0f;
fontScaleY_ = 1.0f;
}
@@ -14,7 +14,7 @@
#include "gfx_es2/draw_buffer.h"
namespace Draw {
- class Thin3DContext;
+ class DrawContext;
class Texture;
}
@@ -49,7 +49,7 @@ struct TextDrawerFontContext;
class TextDrawer {
public:
- TextDrawer(Draw::Thin3DContext *thin3d);
+ TextDrawer(Draw::DrawContext *thin3d);
~TextDrawer();
uint32_t SetFont(const char *fontName, int size, int flags);
@@ -65,7 +65,7 @@ class TextDrawer {
void OncePerFrame();
private:
- Draw::Thin3DContext *thin3d_;
+ Draw::DrawContext *thin3d_;
void WrapString(std::string &out, const char *str, float maxWidth);
Oops, something went wrong.

0 comments on commit f86b9f7

Please sign in to comment.