Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What version of OpenGL does SFML depend on?  (Read 4742 times)

0 Members and 1 Guest are viewing this topic.

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
What version of OpenGL does SFML depend on?
« on: April 11, 2013, 11:35:32 pm »
I recently bought a new laptop, and it comes with an Intel HD 3000 graphics card. Whenever I run a test SFML project (one provided in the documentation), it immediately crashes. My graphics card comes with OpenGL version 1.3.1. Thanks.

Edit: It runs Windows 7 Home premium, and I have a dual core intel core i7 2.7 Ghz processor.
Current Projects:
Technoport

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: What version of OpenGL does SFML depend on?
« Reply #1 on: April 12, 2013, 12:34:04 am »
IIRC OpenGL 2, which is well every where supported, if you update your graphics driver... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #2 on: April 12, 2013, 12:36:18 am »
My drivers are fully up to date. I suppose my graphics card isn't very well updated by Intel :P
Current Projects:
Technoport

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: What version of OpenGL does SFML depend on?
« Reply #3 on: April 12, 2013, 12:41:05 am »
Were did you get the OpenGL version from?

How do you run the test project?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #4 on: April 12, 2013, 01:02:21 am »
I bought a new macbook pro and loaded windows 7 on it. It turns out, Apple's drivers aren't up-to-date and downloading Intel's drivers causes Windows to freak out. Thanks for the help anyways.
Current Projects:
Technoport

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #5 on: April 12, 2013, 11:21:11 pm »
Ok, I managed to install drivers for my Intel GPU that upgraded OpenGL to 3.1. However, I'm still having the same problem. This code will compile:

 #include <SFML/Audio.hpp>
 #include <SFML/Graphics.hpp>
 
 int main()
 {
     // Create the main window
     sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");
 
     // Load a sprite to display
     sf::Texture texture;
     if (!texture.loadFromFile("cute_image.jpg"))
         return EXIT_FAILURE;
     sf::Sprite sprite(texture);
 
     // Create a graphical text to display
     sf::Font font;
     if (!font.loadFromFile("arial.ttf"))
         return EXIT_FAILURE;
     sf::Text text("Hello SFML", font, 50);
 
     // Load a music to play
     sf::Music music;
     if (!music.openFromFile("nice_music.ogg"))
         return EXIT_FAILURE;

     // Play the music
     music.play();
 
     // Start the game loop
     while (window.isOpen())
     {
         // Process events
         sf::Event event;
         while (window.pollEvent(event))
         {
             // Close window : exit
             if (event.type == sf::Event::Closed)
                 window.close();
         }
 
         // Clear screen
         window.clear();
 
         // Draw the sprite
         window.draw(sprite);
 
         // Draw the string
         window.draw(text);
 
         // Update the window
         window.display();
     }
 
     return EXIT_SUCCESS;
 }

But, it immediately crashes once the program executes. It's very frustrating :/. I attached a picture to illustrate my problems.

[attachment deleted by admin]
Current Projects:
Technoport

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: What version of OpenGL does SFML depend on?
« Reply #6 on: April 12, 2013, 11:29:05 pm »
But, it immediately crashes once the program executes. It's very frustrating :/. I attached a picture to illustrate my problems.
Then run it in the debugger and figure out what gets it to crash (basic skill every programmer should have). ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #7 on: April 13, 2013, 04:43:22 am »
I did exactly what you said. Apparantly, it crashing right when the instantiation of the sf::RenderWindow occurs. Very odd.
Current Projects:
Technoport

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: What version of OpenGL does SFML depend on?
« Reply #8 on: April 13, 2013, 11:48:46 am »
Version of SFML?
Did you recompile it?
Which compiler?
Laurent Gomila - SFML developer

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #9 on: April 13, 2013, 02:37:42 pm »
Version: SFML 2.0 RC
Recompile: No
Compiler: MinGW GCC version 4.7.1
IDE: Code::Blocks 12.11
Current Projects:
Technoport

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
AW: What version of OpenGL does SFML depend on?
« Reply #10 on: April 13, 2013, 02:45:17 pm »
 SFML 2 RC is not compatible with GCC 4.7.x. you need to recompile SFML. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #11 on: April 13, 2013, 03:13:55 pm »
Ok. I'd do that with cmake correct?
Current Projects:
Technoport

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: What version of OpenGL does SFML depend on?
« Reply #12 on: April 13, 2013, 03:21:29 pm »
Yes, there is an official tutorial about it :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #13 on: April 13, 2013, 05:55:33 pm »
Ok, I'm sort of confused on this one thing. I successfully compiled and installed it, but how do I actually include SFML into an existing project for Code::Blocks?
Current Projects:
Technoport

The Terminator

  • Full Member
  • ***
  • Posts: 224
  • Windows and Mac C++ Developer
    • View Profile
Re: What version of OpenGL does SFML depend on?
« Reply #14 on: April 13, 2013, 07:38:40 pm »
Nevermind! Got it working :D
Current Projects:
Technoport

 

anything