New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumped back the sfml-graphics OpenGL version requirement to 1.1. #858

Merged
merged 1 commit into from Apr 16, 2015

Conversation

Projects
None yet
6 participants
@binary1248
Member

binary1248 commented Apr 3, 2015

Prevents crashes on systems that can't provide a 1.2+ context such as Windows without a proper/functioning driver. People who can't be bothered with fixing the problem will still be able to use sfml-graphics while being limited to the functionality supported by 1.1. This was the behaviour before BlendModes was implemented.

http://en.sfml-dev.org/forums/index.php?topic=17793.0

@zsbzsb

This comment has been minimized.

Show comment
Hide comment
@zsbzsb

zsbzsb Apr 3, 2015

Member

Considering @binary1248 is now driving me like a slave master....

I tested this and I don't have any issues with it 👍

Member

zsbzsb commented Apr 3, 2015

Considering @binary1248 is now driving me like a slave master....

I tested this and I don't have any issues with it 👍

@binary1248 binary1248 added this to the 2.3 milestone Apr 4, 2015

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 5, 2015

Member

To test this I simply disabled my GPU driver and these are the results (I know it contains redundant information):

OpenGL example

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 24 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 32 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
Failed to initialize WglExtensions

Pong example

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
Failed to initialize WglExtensions

Shader example

While showing "Shaders not supported" as text.

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

Manually requesting 1.1

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Failed to initialize WglExtensions
Setting vertical sync not supported

Manually requesting 1.2

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported

Used example

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML MouseWheel Test", sf::Style::Default, sf::ContextSettings(0, 0, 0, 1, 1));
    window.setFramerateLimit(20);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                return 0;
            }
        }

        window.clear();
        window.display();
    }
}
Member

eXpl0it3r commented Apr 5, 2015

To test this I simply disabled my GPU driver and these are the results (I know it contains redundant information):

OpenGL example

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 24 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 32 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
Failed to initialize WglExtensions

Pong example

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available
Failed to initialize WglExtensions

Shader example

While showing "Shaders not supported" as text.

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 2.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Setting vertical sync not supported
Failed to initialize WglExtensions
Failed to initialize WglExtensions
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

Manually requesting 1.1

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Failed to initialize WglExtensions
Setting vertical sync not supported

Manually requesting 1.2

Failed to initialize WglExtensions
Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Failed to initialize WglExtensions
Setting vertical sync not supported

Used example

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML MouseWheel Test", sf::Style::Default, sf::ContextSettings(0, 0, 0, 1, 1));
    window.setFramerateLimit(20);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                return 0;
            }
        }

        window.clear();
        window.display();
    }
}
@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 8, 2015

Member

So I guess this can be merged then?

Member

eXpl0it3r commented Apr 8, 2015

So I guess this can be merged then?

@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Apr 8, 2015

Member

Wait a bit more... 😉

Member

binary1248 commented Apr 8, 2015

Wait a bit more... 😉

@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Apr 8, 2015

Member

Rebased and added a few more fixes to make 1.1 usage as tolerable as possible.

Member

binary1248 commented Apr 8, 2015

Rebased and added a few more fixes to make 1.1 usage as tolerable as possible.

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 13, 2015

Member

shader example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

opengl example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

pong example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

Manually requesting 1.1 context

Failed to initialize WglExtensions
Setting vertical sync not supported

Manually requesting 1.2 context

Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Setting vertical sync not supported

Example code

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML MouseWheel Test", sf::Style::Default, sf::ContextSettings(0, 0, 0, 1, 2));

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                return 0;
            }
        }

        window.clear();
        window.display();
    }
}
Member

eXpl0it3r commented Apr 13, 2015

shader example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

opengl example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

pong example

Failed to initialize WglExtensions
Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

Manually requesting 1.1 context

Failed to initialize WglExtensions
Setting vertical sync not supported

Manually requesting 1.2 context

Failed to initialize WglExtensions
Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Setting vertical sync not supported

Example code

#include <SFML/Graphics.hpp>
#include <iostream>

int main()
{
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML MouseWheel Test", sf::Style::Default, sf::ContextSettings(0, 0, 0, 1, 2));

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                return 0;
            }
        }

        window.clear();
        window.display();
    }
}
@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Apr 13, 2015

Member

Hmm... that already looks much quieter. I'm still contemplating on whether the "Failed to initialize WglExtensions" and "Failed to initialize GlxExtensions" are actually necessary. It doesn't really matter if they succeed or not, the variables that mark whether specific extensions are available would have been cleared to the failed value in either case anyway.

@eXpl0it3r: Can you somehow provide a list of extensions (should include WGL extensions as well) in this 1.1 test environment of yours?

Member

binary1248 commented Apr 13, 2015

Hmm... that already looks much quieter. I'm still contemplating on whether the "Failed to initialize WglExtensions" and "Failed to initialize GlxExtensions" are actually necessary. It doesn't really matter if they succeed or not, the variables that mark whether specific extensions are available would have been cleared to the failed value in either case anyway.

@eXpl0it3r: Can you somehow provide a list of extensions (should include WGL extensions as well) in this 1.1 test environment of yours?

Bumped back the sfml-graphics OpenGL version requirement to 1.1. Ever…
…ything beyond 1.1 functionality is optional, with warnings emitted when necessary.
@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 15, 2015

Member

shader / opengl example

Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

OpenGL 1.1

Setting vertical sync not supported

OpenGL 1.2

Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Setting vertical sync not supported

Looks fine to me. 👍

Member

eXpl0it3r commented Apr 15, 2015

shader / opengl example

Setting vertical sync not supported
OpenGL extension SGIS_texture_edge_clamp unavailable
Artifacts may occur along texture edges
Ensure that hardware acceleration is enabled if available

OpenGL 1.1

Setting vertical sync not supported

OpenGL 1.2

Warning: The created OpenGL context does not fully meet the settings that were requested
Requested: version = 1.2 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false
Created: version = 1.1 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false
Setting vertical sync not supported

Looks fine to me. 👍

@eXpl0it3r eXpl0it3r added s:accepted and removed s:undecided labels Apr 15, 2015

@binary1248

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Apr 15, 2015

Member

Looks good to me. 😄

Member

binary1248 commented Apr 15, 2015

Looks good to me. 😄

@eXpl0it3r

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 15, 2015

Member

This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns.

Member

eXpl0it3r commented Apr 15, 2015

This PR has been added to my merge list, meaning it will be merged soon, unless someone raises any concerns.

@eXpl0it3r eXpl0it3r merged commit 17570c3 into master Apr 16, 2015

15 checks passed

sfml-debian-64-gcc Build #116 succeeded in 1 min 29 sec
Details
sfml-freebsd Build #672 succeeded in 4 min 26 sec
Details
sfml-osx Build #84 succeeded in 4 min 18 sec
Details
sfml-windows7-32-mingw492 Build #83 succeeded in 1 min 38 sec
Details
sfml-windows7-32-msvc10 Build #59 succeeded in 3 min 6 sec
Details
sfml-windows7-32-msvc11 Build #59 succeeded in 4 min 13 sec
Details
sfml-windows7-32-msvc12 Build #57 succeeded in 2 min 8 sec
Details
sfml-windows7-32-tdm471 Build #56 succeeded in 3 min 40 sec
Details
sfml-windows7-32-tdm481 Build #58 succeeded in 1 min 1 sec
Details
sfml-windows7-64-mingw492 Build #67 succeeded in 1 min 40 sec
Details
sfml-windows7-64-msvc10 Build #60 succeeded in 3 min 26 sec
Details
sfml-windows7-64-msvc11 Build #56 succeeded in 1 min 35 sec
Details
sfml-windows7-64-msvc12 Build #73 succeeded in 1 min 29 sec
Details
sfml-windows7-64-tdm471 Build #58 succeeded in 4 min 3 sec
Details
sfml-windows7-64-tdm481 Build #76 succeeded in 1 min 13 sec
Details

@eXpl0it3r eXpl0it3r deleted the bugfix/gl_1_1 branch Apr 16, 2015

@Althar93

This comment has been minimized.

Show comment
Hide comment
@Althar93

Althar93 Apr 26, 2015

Apologies if this isn't the best place to comment :

This change appears to have caused a regression on Android (iOS possibly, but not tested) builds - the "GLEXT_blend_minmax" extension is not defined for SFML_OPENGL_ES which results in sfml-graphics failing to build currently.

Althar93 commented on 17570c3 Apr 26, 2015

Apologies if this isn't the best place to comment :

This change appears to have caused a regression on Android (iOS possibly, but not tested) builds - the "GLEXT_blend_minmax" extension is not defined for SFML_OPENGL_ES which results in sfml-graphics failing to build currently.

This comment has been minimized.

Show comment
Hide comment
@binary1248
Member

binary1248 replied Apr 26, 2015

This comment has been minimized.

Show comment
Hide comment
@Althar93

Althar93 Apr 27, 2015

Thanks for the quick turnaround. I'll give it a spin.

Althar93 replied Apr 27, 2015

Thanks for the quick turnaround. I'll give it a spin.

This comment has been minimized.

Show comment
Hide comment
@spacechase0

spacechase0 Apr 27, 2015

Contributor

I was just having the same issue, and that fixed it. GLEXT_blend_subtract is defined twice though.

Contributor

spacechase0 replied Apr 27, 2015

I was just having the same issue, and that fixed it. GLEXT_blend_subtract is defined twice though.

This comment has been minimized.

Show comment
Hide comment
@binary1248

binary1248 Apr 27, 2015

Member

GLEXT_blend_subtract is defined twice though.

Should be fixed in 32e5fee.

Member

binary1248 replied Apr 27, 2015

GLEXT_blend_subtract is defined twice though.

Should be fixed in 32e5fee.

This comment has been minimized.

Show comment
Hide comment
@eXpl0it3r

eXpl0it3r Apr 28, 2015

Member

@Althar93 & @spacechase0 can you give this another spin?

Member

eXpl0it3r replied Apr 28, 2015

@Althar93 & @spacechase0 can you give this another spin?

This comment has been minimized.

Show comment
Hide comment
@spacechase0

spacechase0 Apr 29, 2015

Contributor

It works well for me.

Contributor

spacechase0 replied Apr 29, 2015

It works well for me.

This comment has been minimized.

Show comment
Hide comment
@tiaanl

tiaanl Apr 29, 2015

Contributor

Had the same issue, works for me now too.

Contributor

tiaanl replied Apr 29, 2015

Had the same issue, works for me now too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment