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

Author Topic: My circle won't display on the window(using codeblocks on windows 32bits)  (Read 2100 times)

0 Members and 1 Guest are viewing this topic.

Prado

  • Newbie
  • *
  • Posts: 6
  • Revive shmups
    • View Profile
I installed SFML in my CodeBlocks, following all instructions from here:

http://www.sfml-dev.org/tutorials/2.2/start-cb.php

This code should display a window with a green circle(I'm using dinamic library, and I put all necessary dll in the exe folder)

#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 what I get is a transparent window, without the circle. What is wrong?

I hope that it isn't my computer that can't run OpenGl

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
What PC hardware do ypu have? What's your GPU model? What GPU driver version have you installed?
What's the output on the console?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Prado

  • Newbie
  • *
  • Posts: 6
  • Revive shmups
    • View Profile
Processor: Intel(R) Core(TM)2 CPU      T5500 @1.66 GHz 1.67 GHz

RAM memory: 2 GB

OS: Windows 7 Professional 32 bits

Console output? There's no console window
« Last Edit: July 14, 2016, 06:32:33 pm by Prado »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11033
    • View Profile
    • development blog
    • Email
And the GPU (i.e. graphics card)?
And GPU driver version?

Make sure to not link sfml-main and use the subsytem console.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Prado

  • Newbie
  • *
  • Posts: 6
  • Revive shmups
    • View Profile
Graphics card:

          Card name: Mobile Intel(R) 945 Express Chipset Family
       Manufacturer: Intel Corporation
          Chip type: Intel(R) GMA 950
           DAC type: Internal
         Device Key: Enum\PCI\VEN_8086&DEV_27A2&SUBSYS_30AA103C&REV_03
     Display Memory: 256 MB
   Dedicated Memory: 0 MB
      Shared Memory: 256 MB
       Current Mode: 1024 x 768 (32 bit) (60Hz)
       Monitor Name: Monitor Genérico PnP
      Monitor Model: unknown
         Monitor Id: QDS0025
        Native Mode: 1024 x 768(p) (60.004Hz)
        Output Type: Internal
        Driver Name: igdumd32.dll
Driver File Version: 8.14.0010.1930 (English)
     Driver Version: 8.15.10.1930
        DDI Version: 9Ex
       Driver Model: WDDM 1.0
  Driver Attributes: Final Retail
   Driver Date/Size: 9/23/2009 18:18:08, 3829760 bytes
        WHQL Logo'd: n/a
    WHQL Date Stamp: n/a
  Device Identifier: {D7B78E66-64E2-11CF-0674-A010A2C2C535}
          Vendor ID: 0x8086
          Device ID: 0x27A2
          SubSys ID: 0x30AA103C
        Revision ID: 0x0003

here's a screenshot:

http://i.imgur.com/f81Q6EP.png
« Last Edit: July 16, 2016, 01:05:33 am by Prado »