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

Pages: 1 [2]
16
Graphics / Question about SFML like entity's
« on: April 16, 2015, 11:29:51 am »
Hello :)

After viewing some sfml tutorials about vertex arrays I have made class called "Canvas"( it is a smaller and simpler replacement of sprite when you don't need full transform stuff). So the question is how to make a function that changes the texture of this "Canvas"?

17
General / Resource textures
« on: April 14, 2015, 05:38:31 pm »
Hi!  :)

My question is how to load images from resources of .exe file, as you know VS2012 supports it. But how can i do it if sfml can load from image-file and stream. Am i missing something in my head? Can SFML load from .exe resources with loadFromStream() or loadFromMemmory()?

18
General / sf::Vertex question
« on: April 14, 2015, 05:29:14 pm »
Hello! :)

Todays question is how to draw SF::VERTEX. I checked sf::vertex doesn't have draw() function. If you want to know for what i need it here is example: put one pixel on screen.

19
Graphics / A question about sf::RenderWindow
« on: April 12, 2015, 02:07:10 pm »
Hello  :) i want to ask everyone about sf::RenderWindow as you know evethyng in 2D scales in same time with window for example the sprite was in size of 800x600, the window scaled in 2 times and the size of sprite became 1600x1200. So the question is: how to prevent this scaling?

20
Graphics / Texture error(solved)
« on: March 28, 2015, 09:53:08 am »
Hello :) and have a huge problem with SFML I created a project, setuped it.

Than I wrote it
sf::RenderWindow Wind(sf::VideoMode(800,600), "main");
sf::Texture tex;
tex.loadFromFile("image.png");
 
So when I load a texture some creepy stuff appears in console in speed of sound and than my program crashes! What does that means?

21
Graphics / Perfect collision with rotated rectangle
« on: March 02, 2015, 10:28:42 am »
Help me! I need some help I have a rectangle. How to make perfect collision with rotated rectangle without any extra empty space (getGlobalBounds() feature that is comfortable in some ways).

22
Window / Get pixel from window
« on: March 02, 2015, 10:07:45 am »
Exscuse me. Is there any fast way to get every the window pixel with knowledge of pixel coordinates?

23
Graphics / collisions with mouse
« on: February 24, 2015, 06:46:43 pm »
Hellow everyone !  :) I have some problems with sfml  :'( the thing is that  i am checking if mouse is over the sprite and everything seems fine(first time a made this)

bool isMouseOverObjectBox(sf::Sprite &object, sf::Texture &tex, sf::RenderWindow &target){
               
                sf::Vector2i Mpos(sf::Mouse::getPosition(target));
                sf::Vector2f pos(object.getPosition());
                sf::Vector2u size(tex.getSize());
                if(Mpos.y >= pos.y && Mpos.x >= pos.x && Mpos.y <= pos.y+size.y && Mpos.x <= pos.x+size.x){
                return true;
                }
                return false;
        }


but this isn't all i want. i want to make it work with rotated, scaled sprite and unfortinatly i don't know how to do it can anyone help me?

Pages: 1 [2]