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

Author Topic: Failed to Initialize GLEW. Missing GL version  (Read 10301 times)

0 Members and 1 Guest are viewing this topic.

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Failed to Initialize GLEW. Missing GL version
« on: January 11, 2013, 02:21:52 pm »
In a previous thread I've mentioned similar errors and a fresh install for qt creator did the trick at first, but as soon as I imported my source into the IDE everything went bad again, now creating a new project results in the same errors and it appears something is not right here. upon compiling my SFML game this is what I get, and all sprites appear as boxes in-game:


Someone on SO told me I should make sure SFML's not being released before I initialize GLEW but I don't know what that means, I thought SFML handles all the OpenGL things for me so I wouldn't have to worry about it. I'm sure it's something silly but I really don't know where to even start with fixing this, as I have 0 knowledge of OpenGL. And also, why is the max texture size 250x250? That is really small, if I were to make a fullscreen this could be a serious issue, unless it's just my computer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to Initialize GLEW. Missing GL version
« Reply #1 on: January 11, 2013, 02:33:43 pm »
What graphics card do you have?
Is the driver up-to-date? Because it the error sounds like it's not. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #2 on: January 11, 2013, 02:41:43 pm »
What graphics card do you have?
Is the driver up-to-date? Because it the error sounds like it's not. ;)

It doesn't really matter because I can use SFML for any IDE possible except qt creator but the answers are: Nvidia Geforce 210 and yes, last update was about 2 months or so ago.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to Initialize GLEW. Missing GL version
« Reply #3 on: January 11, 2013, 03:51:53 pm »
It doesn't really matter because I can use SFML for any IDE possible except qt creator
Well you didn't specify that... ;)
(Might as well link to the SO question.)

Make sure that Qt Creator doesn't provide some of it's own glew/opengl versions.

What does happen if you start the application not from within Qt, but directly via the explorer?
Qt Creator is using MinGW underneath and since that works without problem (at least on my system), it must be some strange environment variables setup by Qt.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #4 on: January 11, 2013, 04:01:18 pm »
It doesn't really matter because I can use SFML for any IDE possible except qt creator
Well you didn't specify that... ;)
(Might as well link to the SO question.)

Make sure that Qt Creator doesn't provide some of it's own glew/opengl versions.

What does happen if you start the application not from within Qt, but directly via the explorer?
Qt Creator is using MinGW underneath and since that works without problem (at least on my system), it must be some strange environment variables setup by Qt.

Sorry I forgot to mention that, I was assuming most of the people saw my other thread. I have no idea if qt creator set up any enviromentals or if it uses it's own version of openGL (possible)

Running from explorer does nothing, console opens and closes instantly, without any message in it. And yes all the DLLs are there and everything needed.  :-\

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to Initialize GLEW. Missing GL version
« Reply #5 on: January 11, 2013, 04:22:14 pm »
Running from explorer does nothing, console opens and closes instantly, without any message in it. And yes all the DLLs are there and everything needed.  :-\
Run it from the command line, to see if you get an error there.

On SO you mentioned that a normal Hello World also produces the error, so does the following  code also produce the error AND open and close directly when run from explorer AND not show any output when run from the console?

 #include <SFML/Graphics.hpp>
 
 int main()
 {
     // Create the main window
     sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window");

     // 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();
 
         // Update the window
         window.display();
     }
 
     return EXIT_SUCCESS;
 }
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #6 on: January 11, 2013, 04:34:09 pm »
The code above runs perfectly fine, the only problems I'm having is with sprites and texture, as soon as I add a sprite it shows the errors I pointed above, I don't understand what determines if the errors appear when closing the program or when opening, because I have 2 projects, same configurations: On one project I have the whole game, and the errors appear when it opens and sprites appear like boxes, and the 2nd project, where I have just 1 file with similar code as above except it also renders a sprite, but in that project the sprites appear normal and the errors are shown when closing the program.

Overall this behaviour is incredibly weird, I'm sure it's something really silly, but I can't think of even 1 thing I've done wrong, I just have no clue

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #7 on: January 13, 2013, 12:40:30 pm »
So I suppose nobody has a fix for this so I'll get back to VS  :-\

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to Initialize GLEW. Missing GL version
« Reply #8 on: January 13, 2013, 01:53:21 pm »
What version of MinGW does QtCreator ship with?
Have you ever tried to compile the application directly with GCC instead via the IDE?

I've never had problems with MinGW and SFML, so I don't really see where the problem is. Btw. there's also Code::Blocks if you don't want to work with VS. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #9 on: January 13, 2013, 02:16:22 pm »
What version of MinGW does QtCreator ship with?
Have you ever tried to compile the application directly with GCC instead via the IDE?

I've never had problems with MinGW and SFML, so I don't really see where the problem is. Btw. there's also Code::Blocks if you don't want to work with VS. ;)

I suppose I compiled the application with gcc when I was running it on VS or C::B because it worked perfectly fine when I did, it's the qt creator that's the problem, and I can't quite tell what, and I doubt I'll find out. I like C::B but it's not really suited for big projects, I used it at first but as the project grew I had to switch the IDE

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Failed to Initialize GLEW. Missing GL version
« Reply #10 on: January 13, 2013, 03:44:31 pm »
I suppose I compiled the application with gcc when I was running it on VS or C::B because it worked perfectly fine when I did
Visual Studio has its own compiler, I'm not even sure if you'd be able to trick it into compiling with GCC.
But that doesn't answer my question on the version of MinGW and actually what version of QtCreator do you use?

it's the qt creator that's the problem, and I can't quite tell what, and I doubt I'll find out.
Well nobody else here seems to have run into the same problem and since it works with other IDEs, it seems just a like a setup-problem. We can't really help you further here, other than suggesting to freshly install the newest version of QtCreator and make sure you don't setup strange things. :D

I like C::B but it's not really suited for big projects, I used it at first but as the project grew I had to switch the IDE
I'm not sure why you'd conclude that...
C::B and QtCreator are quite similar and I don't see how one IDE would be way better at handling larger projects, I don't even understand what exactly the problem is... ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Octav23

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Failed to Initialize GLEW. Missing GL version
« Reply #11 on: January 13, 2013, 04:32:39 pm »
Most details that you need are found here and on the SO question, but my mingw version is the latest, and qt is also latest, and I've tried doing a fresh qt SDK install, and a fresh qt creator install, even a fresh SFML install as well  :-\