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 - HemoGoblin

Pages: [1]
1
Graphics / Re: xy rotation using transform?
« on: September 09, 2012, 05:09:09 pm »
Okay, thanks.

2
Graphics / Re: xy rotation using transform?
« on: September 09, 2012, 04:37:10 pm »
Sprite.rotate uses z-rotation only, i need to rotate it also around the other axes (to achieve simple "3d" effect).

3
Graphics / Re: xy rotation using transform?
« on: September 09, 2012, 04:18:48 pm »
I have this code:


#include <SFML/Graphics.hpp>


int main() {

        sf::RenderWindow Window(sf::VideoMode(1024, 600), "Test");

        sf::Texture Texture;
        Texture.loadFromFile("A.png");

        sf::Sprite Sprite(Texture);
        Sprite.setOrigin(36.0f, 36.0f);
        Sprite.setPosition(512.0f, 300.0f);

        while (Window.isOpen()) {

                sf::Event Event;
                while (Window.pollEvent(Event)) {

                        switch (Event.type) {

                                case sf::Event::Closed:

                                        Window.close();
                                        break;

                        }

                }

                Window.clear(sf::Color::White);

                sf::Transform B(std::cos(30.0f), 0.0f, std::sin(30.0f), 0.0f, 1.0f, 0.0f, -std::sin(30.0f), 0.0f, std::cos(30.0f));
                Window.draw(Sprite, B);

                Window.display();

        }

}

What do you actually mean by "transformation origin"?

4
Graphics / xy rotation using transform?
« on: September 09, 2012, 03:44:32 pm »
Hi there!
I was trying to implement xy rotation for my sprite. Only way i could think of was to use transforms with 3x3 rotation matrix. However the image is no longer centered (its position was set to the center of view and the origin was set to half the texture size). The question is, how to rotate it using transforms without repositioning? Thanks

5
General / Re: SetFramerateLimit() problem and custom FPS regulation
« on: July 17, 2012, 06:40:47 pm »
Have read my answer like at all? ::)
It's the same problem.
Of course i did.

6
General / Re: SetFramerateLimit() problem and custom FPS regulation
« on: July 17, 2012, 06:31:10 pm »
I'm having similar problem but my framerate (set with setFramerateLimit(60U)) is sometimes ~40 FPS while other games are running smoothly. Also, i tried using clock for custom framerate regulation but i had the same problem. Also when i was moving with mouse the framerate was bigger (with unlimited framerate), what can cause this? I tried everything, even without any drawing or updating game state the framerate was still low.

Pages: [1]