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.


Topics - Mina66

Pages: [1]
1
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'|
...

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


3
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?

4
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.

5
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?

6
Graphics / Font size
« on: April 18, 2013, 10:07:54 am »
How to know the size of the X?


7
Graphics / Text and sprite in the guise
« on: March 02, 2013, 03:00:41 am »
Hello!
Tell me how can I do?
To moving text or sprite was visible like a mask. For the red box could not see them.


The result should look like this:
http://minimultik.ru/animashka/1303012052529b259bbe28b1a2ad

8
Graphics / sf::RenderTexture Flipped
« on: February 11, 2013, 06:19:51 am »
Hello!
Raised two questions on the same topic

Here is the code
#include <SFML/Graphics.hpp>

int main()
{
    sf::VideoMode VMode(800, 600, 32);
    sf::RenderWindow Window(VMode, "SFML 2", sf::Style::Close);


    sf::RenderTexture texture;
    if (!texture.create(500, 500))
     return -1;

    sf::Text text;
    text.setString("TEST");
    text.setPosition(0.0f, 0.0f);
    text.setColor(sf::Color(255, 0, 0));

    sf::Texture texture_img;
    texture_img.loadFromFile("image.png");
    sf::Sprite sprite_image;
    sprite_image.setTexture(texture_img);

    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;
            }
        }

        texture.clear(sf::Color::Blue);
        texture.draw(text);
        texture.draw(sprite_image);
//        texture.display();

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

        sf::Sprite sprite(texture.getTexture());
        Window.draw(sprite);
        Window.display();
    }
    return 0;
}

1. Why texture turns upside down, and what you can do

2. When the string / / texture.display (); longer displayed texture that I do not?


9
Graphics / sf::Text and space
« on: January 18, 2013, 02:28:31 am »
Hello!

Tell me why, with such code trim spaces?





How can I fix?

[attachment deleted by admin]

10
Graphics / VclPlayer and SFML
« on: October 12, 2012, 03:07:50 am »
Hello!
Sorry for bad English.
There is such code, http://wiki.videolan.org/LibVLC_SampleCode_SDL the video display on the surface SDL. Is it possible to implement this in SFML?

Pages: [1]
anything