I successful build this SFMLexample:
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
sf::CircleShape shape(100.f);
shape.setFillColor(sf::Color::Green);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(shape);
window.display();
}
return 0;
}
But when I run application It opens 2 windows:
-> First with information:
Warning: Detected "Microsoft Corporation GDI Generic" OpenGL implementation
The current OpenGL implementation is not hardware-accelerated
Setting vertical sync not supported
-> Second with main programme.
My question is how to switch off first window ?
Is somthing wrong with my graphics card driver ?
I have got ATI Radeon HD 3870 graphics card and driver date is 31.01.2018
I know my English isn't perfect but I think i understand everything.
I use Codeblocks. I change setting Console application to GUI application and replace int main with:
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nCmdShow
So do the step linking libsfml-main.a
But the programme don't run.
error: expected initializer before 'WinMain'
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nCmdShow)
maybe there's some option for your GPU to force some application to run with your GPU.
Where can I find this option ? My workstation is Windows 10.