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

Pages: 1 ... 54 55 [56] 57 58 ... 63
826
General / Re: How to copy a sprite 2+ times over the screen?
« on: February 25, 2013, 01:52:51 am »
Move your sprite, draw it on the window, move it again and draw it again.

Or use the same sf::Texture for 2 different sf::Sprite, each with its own position (and rotation etc.), and draw both of them.
Do not hesitate to use multiple sprites when needed, they are inexpensive. Just don't duplicate textures.

827
Graphics / Re: SFML 2.0 flip question
« on: February 25, 2013, 12:34:13 am »
Your new left should be "left + width", or something like that.

828
sprite doesn't exist in main.cpp
In myClass::Initialize, image and sprite are useless and destructed at the end of the method
In myClass::LoadImage you use fs instead of sf, and image doesn't exist

This is really bad, you should learn a little more C++ before. :-\

829
System / Re: Elegant way to check if mouse position is within a rectangle?
« on: February 19, 2013, 12:42:53 pm »
You can get the bounding rectangle of your shape with the getGlobalBounds method.

830
General / Re: Stack around the variable was corrupted
« on: February 17, 2013, 05:50:17 pm »
Why do you create a new local sf::RectangleShape named player in the Movement contructor that you never use? You probably wanted to use the member variable named player, since it's the one you want to draw.

831
Window / Re: Changing the cursor look?
« on: February 15, 2013, 07:09:55 am »
And you would have two .display(), one in each thread?
If yes, sounds weird.
If no, what's the point.

Seriously bad idea imo. :P

832
Graphics / Re: sf::RenderTexture Flipped
« on: February 11, 2013, 07:11:08 am »
More information about the upside down RenderTexture.
Anyway, your RenderTexture has to call display after you draw something on it. The sf::RenderTexture documentation states that "Not calling it [display] may leave the texture in an undefined state", upside down for example.  :P

I don't understand question number 2.

833
General / Re: Spritesheet algorithm not working
« on: February 11, 2013, 03:58:57 am »
So what do you actually want?  :o ??? ::)
Maybe I'm wrong, I'll let other people try.

834
General / Re: Spritesheet algorithm not working
« on: February 11, 2013, 01:08:58 am »
There are at least 2 flaws in TextureContainer.cpp. (btw, who are you lol?)
The tutorial says this: "a sprite only points to an external image it doesn't own one".
Which means that:
- when your image is deleted (end of scope where you declared it) your sprite doesn't have an image anymore, hence the white box
- if your image is modified, it affects every sprites pointing to this image

835
General / Re: Spritesheet algorithm not working
« on: February 10, 2013, 11:04:27 pm »
Keep your image alive.
It's asked A LOT in the forums...

836
SFML website / Re: How can I know or at least bookmark my own post?
« on: February 10, 2013, 11:00:03 pm »
Isn't it what the "replies" link Qix is talking about do?

837
Feature requests / Re: Support for more primitives
« on: February 08, 2013, 06:59:24 pm »
Have you read the previous request? (found with a simple search for "opengl primitive")

838
Graphics / Re: Different Views
« on: February 07, 2013, 11:23:01 pm »
Yep, the wiki is on github.

839
Window / Re: Joystick problem?
« on: February 01, 2013, 09:16:46 am »
SFML supports:
8 joysticks (sf::Joystick::Count)
Don't go up to 20.
Can't make sense of the rest of your answers. ^^

840
Sorry, I had not noticed that you were using 1.6.

Pages: 1 ... 54 55 [56] 57 58 ... 63
anything