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

Author Topic: sf::RenderWindow crash  (Read 4481 times)

0 Members and 1 Guest are viewing this topic.

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« on: March 10, 2010, 03:52:53 pm »
I have ATI card, winXP, 2 monitors. So in my code:
Code: [Select]
       sf::WindowSettings st;
        st.AntialiasingLevel = 8;  // Make smooth drawing
        delete(m_pSfmlView);
        m_pSfmlView = new sf::RenderWindow(GetSafeHwnd(), st);


I have sporadic crash here:

Code: [Select]
void WindowImplWin32::CreateContext(const VideoMode& Mode, WindowSettings& Params)
{
...
   bool  IsValid = wglChoosePixelFormatARB(myDeviceContext, IntAttributes, FloatAttributes, sizeof(Formats) / sizeof(*Formats), Formats, &NbFormats) != 0;

..
}


I can see that wglChoosePixelFormatARB is NULL.
looks like call
Code: [Select]
       // Get the wglChoosePixelFormatARB function (it is an extension)
        PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = reinterpret_cast<PFNWGLCHOOSEPIXELFORMATARBPROC>(wglGetProcAddress("wglChoosePixelFormatARB"));


 failed. I have no idea why.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow crash
« Reply #1 on: March 10, 2010, 05:38:35 pm »
Hi

It's already fixed for SFML 1.6.
Laurent Gomila - SFML developer

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« Reply #2 on: March 10, 2010, 07:25:14 pm »
Ok, but on this site I see only download 1.5 Could anybody give me link to 1.6 ? Thanks

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow crash
« Reply #3 on: March 10, 2010, 07:55:19 pm »
It hasn't been released yet.
Laurent Gomila - SFML developer

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« Reply #4 on: March 10, 2010, 08:14:42 pm »
Could you give me patch at least ? Is it ok just to check for NULL?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
sf::RenderWindow crash
« Reply #5 on: March 10, 2010, 08:17:45 pm »
Quote from: "hippocat"
Could you give me patch at least ?
You could download the SVN version.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« Reply #6 on: March 10, 2010, 08:34:41 pm »
That what I am trying to find, I found SFML 2 tree but not 1.6 :(

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« Reply #7 on: March 10, 2010, 08:35:53 pm »
Finally found it

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
sf::RenderWindow crash
« Reply #8 on: March 10, 2010, 08:40:08 pm »
Version 1.6 is "/trunk". Don't use "/tags/1.6", it was supposed to be the final version of 1.6 but I created it too early, and didn't update it since then.
Laurent Gomila - SFML developer

hippocat

  • Newbie
  • *
  • Posts: 17
    • View Profile
sf::RenderWindow crash
« Reply #9 on: March 10, 2010, 09:16:57 pm »
Ok, thanks, it works now. Actually I have huge problem with small sprite that somehow gets stretched as background and have no idea why it appears.