mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Only show GL extensions in the GL backend.
This commit is contained in:
parent
301571359c
commit
438c7c1344
5 changed files with 40 additions and 37 deletions
|
@ -429,41 +429,42 @@ void SystemInfoScreen::CreateViews() {
|
|||
oglExtensions->SetSpacing(0);
|
||||
oglExtensionsScroll->Add(oglExtensions);
|
||||
|
||||
tabHolder->AddTab("OGL Extensions", oglExtensionsScroll);
|
||||
|
||||
if (!gl_extensions.IsGLES) {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL Extensions"));
|
||||
} else if (gl_extensions.GLES3) {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL ES 3.0 Extensions"));
|
||||
} else {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL ES 2.0 Extensions"));
|
||||
}
|
||||
|
||||
exts.clear();
|
||||
SplitString(g_all_gl_extensions, ' ', exts);
|
||||
std::sort(exts.begin(), exts.end());
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
oglExtensions->Add(new TextView(exts[i]))->SetFocusable(true);
|
||||
}
|
||||
|
||||
exts.clear();
|
||||
SplitString(g_all_egl_extensions, ' ', exts);
|
||||
std::sort(exts.begin(), exts.end());
|
||||
|
||||
// If there aren't any EGL extensions, no need to show the tab.
|
||||
if (exts.size() > 0) {
|
||||
ViewGroup *eglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
eglExtensionsScroll->SetTag("DevSystemInfoEGLExt");
|
||||
LinearLayout *eglExtensions = new LinearLayout(ORIENT_VERTICAL);
|
||||
eglExtensions->SetSpacing(0);
|
||||
eglExtensionsScroll->Add(eglExtensions);
|
||||
|
||||
tabHolder->AddTab("EGL Extensions", eglExtensionsScroll);
|
||||
|
||||
eglExtensions->Add(new ItemHeader("EGL Extensions"));
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
tabHolder->AddTab("OGL Extensions", oglExtensionsScroll);
|
||||
|
||||
if (!gl_extensions.IsGLES) {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL Extensions"));
|
||||
} else if (gl_extensions.GLES3) {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL ES 3.0 Extensions"));
|
||||
} else {
|
||||
oglExtensions->Add(new ItemHeader("OpenGL ES 2.0 Extensions"));
|
||||
}
|
||||
exts.clear();
|
||||
SplitString(g_all_gl_extensions, ' ', exts);
|
||||
std::sort(exts.begin(), exts.end());
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
eglExtensions->Add(new TextView(exts[i]))->SetFocusable(true);
|
||||
oglExtensions->Add(new TextView(exts[i]))->SetFocusable(true);
|
||||
}
|
||||
|
||||
exts.clear();
|
||||
SplitString(g_all_egl_extensions, ' ', exts);
|
||||
std::sort(exts.begin(), exts.end());
|
||||
|
||||
// If there aren't any EGL extensions, no need to show the tab.
|
||||
if (exts.size() > 0) {
|
||||
ViewGroup *eglExtensionsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT));
|
||||
eglExtensionsScroll->SetTag("DevSystemInfoEGLExt");
|
||||
LinearLayout *eglExtensions = new LinearLayout(ORIENT_VERTICAL);
|
||||
eglExtensions->SetSpacing(0);
|
||||
eglExtensionsScroll->Add(eglExtensions);
|
||||
|
||||
tabHolder->AddTab("EGL Extensions", eglExtensionsScroll);
|
||||
|
||||
eglExtensions->Add(new ItemHeader("EGL Extensions"));
|
||||
|
||||
for (size_t i = 0; i < exts.size(); i++) {
|
||||
eglExtensions->Add(new TextView(exts[i]))->SetFocusable(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -450,7 +450,7 @@ void LogoScreen::render() {
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
dc.DrawText(screenManager()->getThin3DContext()->GetInfoString(T3DInfo::APINAME), bounds.centerX(), bounds.y2() - 100, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
dc.DrawText(screenManager()->getThin3DContext()->GetInfoString(T3DInfo::APINAME).c_str(), bounds.centerX(), bounds.y2() - 100, colorAlpha(0xFFFFFFFF, alphaText), ALIGN_CENTER);
|
||||
#endif
|
||||
|
||||
dc.End();
|
||||
|
|
|
@ -282,6 +282,8 @@ class Thin3DContext : public Thin3DObject {
|
|||
public:
|
||||
virtual ~Thin3DContext();
|
||||
|
||||
virtual std::vector<std::string> GetFeatureList() { return std::vector<std::string>(); }
|
||||
|
||||
virtual Thin3DDepthStencilState *CreateDepthStencilState(bool depthTestEnabled, bool depthWriteEnabled, T3DComparison depthCompare) = 0;
|
||||
virtual Thin3DBlendState *CreateBlendState(const T3DBlendStateDesc &desc) = 0;
|
||||
virtual Thin3DBuffer *CreateBuffer(size_t size, uint32_t usageFlags) = 0;
|
||||
|
@ -334,7 +336,7 @@ public:
|
|||
targetHeight_ = h;
|
||||
}
|
||||
|
||||
virtual const char *GetInfoString(T3DInfo info) const = 0;
|
||||
virtual std::string GetInfoString(T3DInfo info) const = 0;
|
||||
|
||||
protected:
|
||||
void CreatePresets();
|
||||
|
|
|
@ -429,7 +429,7 @@ public:
|
|||
void DrawUP(T3DPrimitive prim, Thin3DShaderSet *shaderSet, Thin3DVertexFormat *format, const void *vdata, int vertexCount) override;
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal);
|
||||
|
||||
const char *GetInfoString(T3DInfo info) const override {
|
||||
std::string GetInfoString(T3DInfo info) const override {
|
||||
switch (info) {
|
||||
case APIVERSION: return "DirectX 9.0";
|
||||
case VENDORSTRING: return identifier_.Description;
|
||||
|
|
|
@ -361,7 +361,7 @@ public:
|
|||
void DrawUP(T3DPrimitive prim, Thin3DShaderSet *shaderSet, Thin3DVertexFormat *format, const void *vdata, int vertexCount) override;
|
||||
void Clear(int mask, uint32_t colorval, float depthVal, int stencilVal) override;
|
||||
|
||||
const char *GetInfoString(T3DInfo info) const override {
|
||||
std::string GetInfoString(T3DInfo info) const override {
|
||||
// TODO: Make these actually query the right information
|
||||
switch (info) {
|
||||
case APINAME:
|
||||
|
|
Loading…
Add table
Reference in a new issue