Ugh now what, everything seemed to work fine yesterday, but today started to open my game again and I suffered from another breakpoint memory error. I deleted basicly all of my game code and it comes down to the code below:
It breaks at WglContext.cpp
void WglContext::display()
{
if (m_deviceContext && m_context)
SwapBuffers(m_deviceContext);
}
Output window:
+ m_context 0x00010002 {unused=0 } HGLRC__ *
+ m_deviceContext 0x590118ed {unused=??? } HDC__ *
+ this 0x09224fd0 {m_window=0x0010085a m_deviceContext=0x590118ed m_context=0x00010002 ...} sf::priv::WglContext * const
My code:
#include <SFML\Graphics.hpp>
int main()
{
sf::RenderWindow m_app;
m_app.create(sf::VideoMode(500, 500, 32), "MyProgram");
while(true)
{
m_app.clear(sf::Color(65,5,23));
m_app.display();
}
return 0;
}
Because this code is so basic (and because the example program on the documentation website gives me the same error), it can't be my code right?
I downloaded the newest snapshot of SFML2 and build/installed it but it still gives me the same error.
I'm pretty sure I'm linking with the static debug libraries correctly, as I did not change anything and it used to work fine til today. Removing the "m_app.display();" makes it run.
Linking with:
sfml-system-s-d.lib;sfml-window-s-d.lib;sfml-graphics-s-d.lib;libpq.lib;%(AdditionalDependencies)
What is going on here? I'm completely clueless.