Vulkan: Support wide lines if available on the GPU.

This commit is contained in:
Henrik Rydgård committed 2017-11-12 10:17:49 +01:00
1 parent afa5b23abb
commit 525cb40f84
6 files changed
+53 -22

No files matched your search

+10 -14
View File
@@ -226,7 +226,6 @@ void FramebufferManagerGLES::Init() {
// Workaround for upscaling shaders where we force x1 resolution without saving it
Resized();
CompileDraw2DProgram();
SetLineWidth();
}
void FramebufferManagerGLES::SetTextureCache(TextureCacheGLES *tc) {
@@ -449,18 +448,6 @@ void FramebufferManagerGLES::RebindFramebuffer() {
glstate.viewport.restore();
}
void FramebufferManagerGLES::SetLineWidth() {
#ifndef USING_GLES2
if (g_Config.iInternalResolution == 0) {
glLineWidth(std::max(1, (int)(renderWidth_ / 480)));
glPointSize(std::max(1.0f, (float)(renderWidth_ / 480.f)));
} else {
glLineWidth(g_Config.iInternalResolution);
glPointSize((float)g_Config.iInternalResolution);
}
#endif
}
void FramebufferManagerGLES::ReformatFramebufferFrom(VirtualFramebuffer *vfb, GEBufferFormat old) {
if (!useBufferedRendering_ || !vfb->fbo) {
return;
@@ -1064,7 +1051,16 @@ void FramebufferManagerGLES::Resized() {
}
DestroyDraw2DProgram();
SetLineWidth();
#ifndef USING_GLES2
if (g_Config.iInternalResolution == 0) {
glLineWidth(std::max(1, (int)(renderWidth_ / 480)));
glPointSize(std::max(1.0f, (float)(renderWidth_ / 480.f)));
} else {
glLineWidth(g_Config.iInternalResolution);
glPointSize((float)g_Config.iInternalResolution);
}
#endif
if (!draw2dprogram_) {
CompileDraw2DProgram();