Fixed regression introduced in 4fcef89 causing EXT_texture_edge_clamp support to not be considered, added explicit initialization of nbFormats to 0 in WglContext.cpp in order to prevent broken graphics drivers from filling nbFormats with a garbage value.
Fixes #1786.
This commit is contained in:
parent
c0b19109a9
commit
43b2e9dc12
@ -308,6 +308,8 @@
|
|||||||
#define GLEXT_geometry_shader4 SF_GLAD_GL_ARB_geometry_shader4
|
#define GLEXT_geometry_shader4 SF_GLAD_GL_ARB_geometry_shader4
|
||||||
#define GLEXT_GL_GEOMETRY_SHADER GL_GEOMETRY_SHADER_ARB
|
#define GLEXT_GL_GEOMETRY_SHADER GL_GEOMETRY_SHADER_ARB
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
// OpenGL Versions
|
// OpenGL Versions
|
||||||
#define GLEXT_GL_VERSION_1_0 SF_GLAD_GL_VERSION_1_0
|
#define GLEXT_GL_VERSION_1_0 SF_GLAD_GL_VERSION_1_0
|
||||||
#define GLEXT_GL_VERSION_1_1 SF_GLAD_GL_VERSION_1_1
|
#define GLEXT_GL_VERSION_1_1 SF_GLAD_GL_VERSION_1_1
|
||||||
@ -329,8 +331,6 @@
|
|||||||
#define GLEXT_GL_VERSION_4_5 SF_GLAD_GL_VERSION_4_5
|
#define GLEXT_GL_VERSION_4_5 SF_GLAD_GL_VERSION_4_5
|
||||||
#define GLEXT_GL_VERSION_4_6 SF_GLAD_GL_VERSION_4_6
|
#define GLEXT_GL_VERSION_4_6 SF_GLAD_GL_VERSION_4_6
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace sf
|
namespace sf
|
||||||
{
|
{
|
||||||
namespace priv
|
namespace priv
|
||||||
|
@ -162,7 +162,7 @@ bool Texture::create(unsigned int width, unsigned int height)
|
|||||||
// Make sure that the current texture binding will be preserved
|
// Make sure that the current texture binding will be preserved
|
||||||
priv::TextureSaver save;
|
priv::TextureSaver save;
|
||||||
|
|
||||||
static bool textureEdgeClamp = GLEXT_texture_edge_clamp;
|
static bool textureEdgeClamp = GLEXT_texture_edge_clamp || GLEXT_GL_VERSION_1_2 || Context::isExtensionAvailable("GL_EXT_texture_edge_clamp");
|
||||||
|
|
||||||
if (!m_isRepeated && !textureEdgeClamp)
|
if (!m_isRepeated && !textureEdgeClamp)
|
||||||
{
|
{
|
||||||
|
@ -295,7 +295,7 @@ int WglContext::selectBestPixelFormat(HDC deviceContext, unsigned int bitsPerPix
|
|||||||
|
|
||||||
// Let's check how many formats are supporting our requirements
|
// Let's check how many formats are supporting our requirements
|
||||||
int formats[512];
|
int formats[512];
|
||||||
UINT nbFormats;
|
UINT nbFormats = 0; // We must initialize to 0 otherwise broken drivers might fill with garbage in the following call
|
||||||
bool isValid = wglChoosePixelFormatARB(deviceContext, intAttributes, NULL, 512, formats, &nbFormats) != FALSE;
|
bool isValid = wglChoosePixelFormatARB(deviceContext, intAttributes, NULL, 512, formats, &nbFormats) != FALSE;
|
||||||
|
|
||||||
if (!isValid)
|
if (!isValid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user