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

Author Topic: Can't Create sf::Text Object  (Read 1312 times)

0 Members and 1 Guest are viewing this topic.

MrPlosion1243

  • Newbie
  • *
  • Posts: 9
    • View Profile
Can't Create sf::Text Object
« on: January 06, 2013, 11:29:55 pm »
So I wanted to create a sf::Text object so I went to the documentation (2.0) and the second overload of the constructor is this:
Text (const String &string, const Font &font=Font::getDefaultFont(), unsigned int characterSize=30)
But when I go to create the object in visual studio the intellisense gives me this:
Text(cont sf::String &string, const sf::Font &font, unisigned int characterSize = 30U)
See in visual studio I have to give it a font but the documentation says I don't. Just thought I would point that out no big deal.

So I simply threw this code together:
sf::Font font;
font.loadFromFile("arial.ttf");
sf::Text text("Some Text", font);
 
I then ran the application and inside the console window this is printed a total of 3 times:
An internal OpenGL call failed in Texture.cpp (146) : GL_INVALID_ENUM, an unacceptable value has been specified for an enumerated argument
An internal OpenGL call failed in Texture.cpp (147) : GL_INVALID_ENUM, an unacceptable value has been specified for an enumerated argument

Now from this thread the admin says and I quote "This error implies that you have a crappy graphics card (or drivers) that don't support OpenGL 1.2. Is that true?" Indeed this is true for me. Running this code prints 1.1 out:
sf::ContextSettings settings = window.getSettings();
std::cout << settings.majorVersion << "." << settings.minorVersion << std::endl;
So I guess my graphics card only supports OpenGL 1.1 and windows says that my driver for it is up to date. The thread then ends and how to resolve the problem is not there.

My question is what does this leave me with? Can I not use features of SFML 2 that use OpenGL 1.2? Do I have to buy a better graphics card? In XNA I could switch some variable and it worked for crappy graphics cards does SMFL 2 have something like that?

How do I resolve this problem?

I'm running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with Windows 8 using SFML 2.0 built with cmake (I just fallowed this tutorial). I don't even have a dedicated graphics card this is what the Device Manager says: ATI Radeon HD 3200 Graphics (Microsoft Corperation - WDDM v1.1).

Thanks.

cire

  • Full Member
  • ***
  • Posts: 138
    • View Profile
Re: Can't Create sf::Text Object
« Reply #1 on: January 07, 2013, 12:12:34 am »
Quote
So I guess my graphics card only supports OpenGL 1.1 and windows says that my driver for it is up to date.

I'd go to the manufacturer's website and update.  Windows is notorious for not updating card drivers.  I believe the "Microsoft" in "ATI Radeon HD 3200 Graphics (Microsoft Corperation - WDDM v1.1)" may indicate you're using a Microsoft driver and not one from the manufacturer.  So, did Microsoft misspell "corporation" or did you?   :)

MrPlosion1243

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Can't Create sf::Text Object
« Reply #2 on: January 07, 2013, 07:30:09 pm »
Yeah, I must have spelled that wrong because I couldn't copy and past.

Well I went to there website and installed what I believe to be is the most up to date driver for me (at least that's what the AMD Driver Autodetect said). I restarted my computer, ran the application again and I got the same errors and 1.1 is still what it prints.

Am I screwed or is there some way to update OpenGL on my machine or is that up to the manufacturer of the graphics?

Picture if that helps? http://i.imgur.com/wLWIb.png

 

anything