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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mina66

Pages: [1] 2
1
General / Re: SFML 2.2 Static linking
« on: December 24, 2014, 03:56:21 am »
Thanks!  :)

2
General / SFML 2.2 Static linking
« on: December 23, 2014, 05:06:52 pm »
Hello.

Code::Blocks 13.12
 tdm-gcc-4.9.2 32 http://tdm-gcc.tdragon.net/


It is impossible to do static linking. The project settings in here http://www.sfml-dev.org/tutorials/2.2/start-cb.php
Errors
D:\CB_Library\SFML\lib\libsfml-graphics-s-d.a(Texture.cpp.obj)||In function `checkMaximumTextureSize':|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|64|undefined reference to `glGetIntegerv@8'
|
D:\CB_Library\SFML\lib\libsfml-graphics-s-d.a(Texture.cpp.obj)||In function `ZN2sf7TextureD2Ev':|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|111|undefined reference to `glDeleteTextures@8'
|
D:\CB_Library\SFML\lib\libsfml-graphics-s-d.a(Texture.cpp.obj)||In function `ZN2sf7Texture6createEjj':|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|152|undefined reference to `glGenTextures@8'
|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|160|undefined reference to `glBindTexture@8'|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|161|undefined reference to `glTexImage2D@36'
|
D:\sfml-release\_Sources\SFML\src\SFML\Graphics\Texture.cpp|162|undefined reference to `glTexParameteri@12'|
...

3
Graphics / Re: Text height
« on: October 23, 2014, 03:07:07 am »
Maybe it will be clearer
I need to define a yellow question (??)


4
Graphics / Re: Text height
« on: October 23, 2014, 02:43:10 am »
If you want the maximum height independent of the actual text string it should be same as getCharacterSize/setCharacterSize.

If you want the height of an sf::Text Object simply call sf::Text::getLocalBounds().height.

No. It will be up to the base line.



5
Graphics / Re: Text height
« on: October 22, 2014, 04:07:35 pm »
If you want the height of an sf::Text Object simply call sf::Text::getLocalBounds().height.

No. It will be up to the base line.


6
Graphics / Text height
« on: October 22, 2014, 11:24:02 am »
How to measure the height of a pin


7
Graphics / Re: sf::RenderTexture and CPU 50%
« on: December 31, 2013, 03:04:58 am »
if it is
window.setVerticalSyncEnabled(true);
to replace it
window.setFramerateLimit(60);
then CPU usage falls

Tell me, what's wrong?

8
Graphics / sf::RenderTexture and CPU 50%
« on: December 31, 2013, 02:43:49 am »
Hello
When you add in the draft RenderTexture, CPU immediately increased to 50%.

    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML");
    window.setVerticalSyncEnabled(true);

    sf::RenderTexture rendTexture;
    rendTexture.create(100, 100);

    while (window.isOpen())
    {
        sf::Event event;
        while(window.pollEvent(event))
        {
            switch(event.type)
            {
                case sf::Event::Closed:
                    window.close();
                    break;
                case sf::Event::KeyPressed:

                    if(sf::Keyboard::isKeyPressed(sf::Keyboard::Escape))
                        window.close();
                break;

                default:
                break;
            }
        }

        rendTexture.clear();      
        rendTexture.display();  

        window.clear();
        window.display();
    }
 

Tell me, is this normal?

9
Graphics / Re: sf::Texture and sf::RenderTexture.getTexture
« on: September 13, 2013, 08:05:11 am »
Thanks a lot, Laurent  :)

here is the result


10
Graphics / Re: sf::Texture and sf::RenderTexture.getTexture
« on: September 13, 2013, 07:32:59 am »
Instead of transparent white have you tried using transparent black?

renderTexture.clear(sf::Color(0, 0, 0, 0));

changed, there is a difference


    renderTexture.clear(sf::Color(0, 0, 0, 0));

....

   Window.clear(sf::Color(128, 128, 128, 0));

 


11
Graphics / Re: sf::Texture and sf::RenderTexture.getTexture
« on: September 13, 2013, 07:31:38 am »
Well I have one other guess: try setSmooth with true and false.

If that doesn't work we'll have to hope someone smarter than me shows up.

changed, there is a difference

    renderTexture.setSmooth(true);
    renderTexture.clear(sf::Color(128, 128, 128, 0));

....

   Window.clear(sf::Color(128, 128, 128, 0));

 


12
Graphics / Re: sf::Texture and sf::RenderTexture.getTexture
« on: September 13, 2013, 05:42:29 am »
changed, there is a difference


    renderTexture.clear(sf::Color(128, 128, 128, 0));

....

   Window.clear(sf::Color(128, 128, 128, 0));

 


13
Graphics / sf::Texture and sf::RenderTexture.getTexture
« on: September 13, 2013, 05:14:39 am »
Hello
There is such a code


    sf::Sprite sprite_1;
    sf::Texture texture;
    texture.loadFromFile("d:\\1.png");
    sprite_1.setTexture(texture);

    sf::RenderTexture renderTexture;
    renderTexture.create(96, 96);
    renderTexture.clear(sf::Color(255, 255, 255, 0));
    renderTexture.draw(sprite_1);
    renderTexture.display();

    sf::Sprite sprite_2;
    sprite_2.setTexture(renderTexture.getTexture());
    sprite_2.setPosition(97.f, 0.f);

....

   Window.clear(sf::Color(128, 128, 128));
   Window.draw(sprite_1);
   Window.draw(sprite_2);
   Window.display();

 

Please explain why little difference between pictures. (the shadow)




Sorry for the English.

14
Graphics / Re: Dynamic size RenderTexture
« on: June 03, 2013, 11:22:30 am »
As long as there are no problems.
When the program starts, the object is created with texture. It is painted a picture and text.
During the program the size of the object has to change depending on the length of the text and the image size.
But for this you need to change the size of the texture.
And asked, just in case, that would not have any problems in the future.

15
Graphics / Dynamic size RenderTexture
« on: June 03, 2013, 11:00:05 am »
How can I dynamically change the size RenderTexture?
Is this possible?

sf::RenderTexture rTexture;
rTexture.create(100.0f, 100.0f);
...
...
rTexture.create(200.0f, 200.0f);
 

or better not?

Pages: [1] 2