mirror of https://github.com/PCSX2/pcsx2.git
GS-OGL: Remove wide line support (deprecated in OGL Spec).
This commit is contained in:
parent
a9407f055c
commit
73f45b8772
|
@ -23,7 +23,6 @@ namespace GLState
|
|||
GSVector4i scissor;
|
||||
|
||||
bool point_size = false;
|
||||
float line_width = 1.0f;
|
||||
|
||||
bool blend;
|
||||
u16 eq_RGB;
|
||||
|
|
|
@ -25,7 +25,6 @@ namespace GLState
|
|||
extern GSVector4i scissor;
|
||||
|
||||
extern bool point_size;
|
||||
extern float line_width;
|
||||
|
||||
extern bool blend;
|
||||
extern u16 eq_RGB;
|
||||
|
|
|
@ -226,15 +226,14 @@ bool GSDeviceOGL::Create(HostDisplay* display)
|
|||
m_features.framebuffer_fetch = GLLoader::found_framebuffer_fetch;
|
||||
m_features.dual_source_blend = GLLoader::has_dual_source_blend && !GSConfig.DisableDualSourceBlend;
|
||||
m_features.stencil_buffer = true;
|
||||
// Wide line support in GL is deprecated as of 3.1, so we will just do it in the Geometry Shader.
|
||||
m_features.line_expand = false;
|
||||
|
||||
GLint point_range[2] = {};
|
||||
GLint line_range[2] = {};
|
||||
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_range);
|
||||
glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, line_range);
|
||||
m_features.point_expand = (point_range[0] <= static_cast<GLint>(GSConfig.UpscaleMultiplier) && point_range[1] >= static_cast<GLint>(GSConfig.UpscaleMultiplier));
|
||||
m_features.line_expand = (line_range[0] <= static_cast<GLint>(GSConfig.UpscaleMultiplier) && line_range[1] >= static_cast<GLint>(GSConfig.UpscaleMultiplier));
|
||||
Console.WriteLn("Using %s for point expansion and %s for line expansion.",
|
||||
m_features.point_expand ? "hardware" : "geometry shaders", m_features.line_expand ? "hardware" : "geometry shaders");
|
||||
|
||||
Console.WriteLn("Using %s for point expansion.", m_features.point_expand ? "hardware" : "geometry shaders");
|
||||
|
||||
{
|
||||
auto shader = Host::ReadResourceFileToString("shaders/opengl/common_header.glsl");
|
||||
|
@ -637,8 +636,6 @@ void GSDeviceOGL::ResetAPIState()
|
|||
{
|
||||
if (GLState::point_size)
|
||||
glDisable(GL_PROGRAM_POINT_SIZE);
|
||||
if (GLState::line_width != 1.0f)
|
||||
glLineWidth(1.0f);
|
||||
}
|
||||
|
||||
void GSDeviceOGL::RestoreAPIState()
|
||||
|
@ -691,8 +688,6 @@ void GSDeviceOGL::RestoreAPIState()
|
|||
|
||||
if (GLState::point_size)
|
||||
glEnable(GL_PROGRAM_POINT_SIZE);
|
||||
if (GLState::line_width != 1.0f)
|
||||
glLineWidth(GLState::line_width);
|
||||
}
|
||||
|
||||
void GSDeviceOGL::DrawPrimitive()
|
||||
|
@ -1967,12 +1962,6 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config)
|
|||
glDisable(GL_PROGRAM_POINT_SIZE);
|
||||
GLState::point_size = point_size_enabled;
|
||||
}
|
||||
const float line_width = config.line_expand ? static_cast<float>(GSConfig.UpscaleMultiplier) : 1.0f;
|
||||
if (GLState::line_width != line_width)
|
||||
{
|
||||
GLState::line_width = line_width;
|
||||
glLineWidth(line_width);
|
||||
}
|
||||
|
||||
if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue