Convert more UI code to Thin3D

This commit is contained in:
Henrik Rydgard committed 2014-08-22 20:55:18 +02:00
1 parent e539c7009f
commit e2ecbb7a4d
5 files changed
+26 -15

No files matched your search

+1 -3
View File
@@ -384,8 +384,8 @@ static int DefaultAndroidHwScale() {
}
static ConfigSetting graphicsSettings[] = {
ReportedConfigSetting("GPUBackend", &g_Config.iGPUBackend, 0),
ConfigSetting("ShowFPSCounter", &g_Config.iShowFPSCounter, 0),
ReportedConfigSetting("GPUBackend", &g_Config.iGPUBackend, 0),
ReportedConfigSetting("RenderingMode", &g_Config.iRenderingMode, &DefaultRenderingMode),
ConfigSetting("SoftwareRendering", &g_Config.bSoftwareRendering, false),
ReportedConfigSetting("HardwareTransform", &g_Config.bHardwareTransform, true),
@@ -816,8 +816,6 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) {
}
CleanRecent();
iGPUBackend = 0;
}
void Config::Save() {
+9 -2
View File
@@ -2,6 +2,7 @@
#include <stdint.h>
#include <string.h>
#include <stdio.h>
#include "base/logging.h"
#include "fbo.h"
namespace DX9 {
@@ -60,8 +61,14 @@ FBO *fbo_create(int width, int height, int num_color_textures, bool z_stencil, F
pD3Ddevice->CreateRenderTarget(fbo->width/FB_DIV, fbo->height/FB_DIV, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &workingRtt, NULL);
}
#else
pD3Ddevice->CreateRenderTarget(fbo->width/4, fbo->height/4, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &fbo->surf, NULL);
pD3Ddevice->CreateDepthStencilSurface(fbo->width, fbo->height, D3DFMT_D24S8, D3DMULTISAMPLE_NONE, 0, FALSE, &fbo->depthstencil, NULL);
HRESULT rtResult = pD3Ddevice->CreateRenderTarget(fbo->width/4, fbo->height/4, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &fbo->surf, NULL);
if (FAILED(rtResult)) {
ELOG("Failed to create render target");
}
HRESULT dsResult = pD3Ddevice->CreateDepthStencilSurface(fbo->width, fbo->height, D3DFMT_D24S8, D3DMULTISAMPLE_NONE, 0, FALSE, &fbo->depthstencil, NULL);
if (FAILED(dsResult)) {
ELOG("Failed to create depth buffer");
}
#endif
fbo->stencil_buffer = 8;
+11 -7
View File
@@ -231,16 +231,20 @@ void SystemInfoScreen::CreateViews() {
deviceSpecs->Add(new InfoItem("Threads", cores));
#endif
deviceSpecs->Add(new ItemHeader("GPU Information"));
deviceSpecs->Add(new InfoItem("Vendor", (char *)glGetString(GL_VENDOR)));
deviceSpecs->Add(new InfoItem("Model", (char *)glGetString(GL_RENDERER)));
Thin3DContext *thin3d = screenManager()->getThin3DContext();
deviceSpecs->Add(new InfoItem("3D API", thin3d->GetInfoString(T3DInfo::APINAME)));
deviceSpecs->Add(new InfoItem("Vendor", thin3d->GetInfoString(T3DInfo::VENDOR)));
deviceSpecs->Add(new InfoItem("Model", thin3d->GetInfoString(T3DInfo::RENDERER)));
#ifdef _WIN32
deviceSpecs->Add(new InfoItem("Driver Version", System_GetProperty(SYSPROP_GPUDRIVER_VERSION)));
#endif
deviceSpecs->Add(new ItemHeader("OpenGL Version Information"));
std::string openGL = (char *)glGetString(GL_VERSION);
openGL.resize(30);
deviceSpecs->Add(new InfoItem("OpenGL", openGL));
deviceSpecs->Add(new InfoItem("GLSL", (char *)glGetString(GL_SHADING_LANGUAGE_VERSION)));
deviceSpecs->Add(new ItemHeader("Version Information"));
std::string apiVersion = thin3d->GetInfoString(T3DInfo::APIVERSION);
apiVersion.resize(30);
deviceSpecs->Add(new InfoItem("API Version", apiVersion));
deviceSpecs->Add(new InfoItem("Shading Language", thin3d->GetInfoString(T3DInfo::SHADELANGVERSION)));
#ifdef ANDROID
char temp[256];
+2
View File
@@ -432,6 +432,8 @@ void LogoScreen::render() {
ui_draw2d.DrawTextShadow(UBUNTU24, boot_filename.c_str(), bounds.centerX(), bounds.centerY() + 180, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
}
dc.DrawText(screenManager()->getThin3DContext()->GetInfoString(T3DInfo::APINAME), bounds.centerX(), bounds.y2() - 100, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
dc.End();
dc.Flush();
}
+3 -3
View File
@@ -102,9 +102,9 @@ bool D3D9_Init(HWND hWnd, bool windowed, std::string *error_message) {
DX9::pD3Ddevice = device;
LoadD3DX9Dynamic();
DX9::CompileShaders();
DX9::fbo_init();
DX9::CompileShaders();
DX9::fbo_init();
return true;
}