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 ... 55 56 [57] 58 59 ... 63
841
Graphics / Re: Drawing in 2D causes 3D to disappear
« on: January 29, 2013, 04:26:07 am »
Isn't it normal for the screen to be cleared if you use glClear?

Also, you should (probably) use pushGLStates and popGLStates, as shown in the second example in the sf::RenderWindow documentation.

842
General / Re: Function do not works
« on: January 27, 2013, 11:59:18 pm »
My blind guess (since you're using win7 and not linux :D): unless you know what you're doing, use break in your switch cases.

Here for one key pressed (and released) you go in your second case twice, once when the key is pressed, another one when the key is released.

843
Graphics / Re: A quick question about shaders...
« on: January 27, 2013, 11:35:40 pm »
SFML doesn't provide any shader (but the ones in the shader example), just ways to use them.
You'll have to write your own or find one on the internet. (since 2.0 shaders are in GLSL, so you can probably find what you want)

844
Graphics / Re: Image is not displayed and application uses 100% CPU
« on: January 25, 2013, 01:43:30 pm »
Look at the sf::RenderWindow doc.
You need to call window.display() in order to display anything that has been drawn.
If you don't want to use 100% CPU set a fps limitation with setFramerateLimit or enable the vertical synchronization with setVerticalSyncEnabled.

845
Python / Re: VertexArray & Vertex's tilemap nightmare
« on: January 24, 2013, 10:11:03 pm »
You can (and will) have more than 4 vertices in your vertex array. ;)

846
Window / Re: Right analog stick is not working. [SFML 2.0]
« on: January 23, 2013, 10:31:04 pm »
Yep, exactly. ^^

847
Window / Re: Right analog stick is not working. [SFML 2.0]
« on: January 23, 2013, 10:26:12 pm »
Look at the sf::Joystick documentation, the first parameter is the joystick identifier (if you have multiple joysticks/gamepads plugged in).

848
General discussions / Re: A new logo for SFML
« on: January 22, 2013, 11:21:58 am »
I loved the one with 2 gears ( https://legacy.sfmluploads.org/cache/pics/176_sfml%20logo%20example.png without the version number and the long text) and it looks really cool animated in a splash screen. :D

850
Graphics / Re: Problem with convertCoords in RenderTarget
« on: January 18, 2013, 11:36:03 am »
NP, and good luck, Dungeon Keeper is awesome.  :D

851
Graphics / Re: Problem with convertCoords in RenderTarget
« on: January 18, 2013, 11:09:20 am »
The name changed to mapPixelToCoords. (see https://github.com/SFML/SFML/commit/6ce6014dd8517ee3012c0b969484f6bc258e65ef )

The documentation on the website matches the 2.0RC. You need to generate it yourself if you want the latest doc matching the latest sources.

852
Graphics / Re: Problems with loading Texture in a seperate class
« on: January 18, 2013, 10:00:22 am »
Hi.
Your sf::Texture is local to your player_main::init function, so it is destroyed at the end of the function. That's why you get a white sprite. It's a very recurrent mistake, you could probably have found the answer by googling sfml white sprite. ^^

You have to keep your sf::Texture alive in memory. You can make it a member of player_main, or use some kind of texture manager, etc.
It's even written in the doc :
Quote
It is important to note that the sf::Sprite instance doesn't copy the texture that it uses, it only keeps a reference to it. Thus, a sf::Texture must not be destroyed while it is used by a sf::Sprite (i.e. never write a function that uses a local sf::Texture instance for creating a sprite).
Oh, and for your cout weird behavior, you probably need some std::flush or std::endl. (endl calls flush)

854
Graphics / Re: Can't get different font
« on: January 16, 2013, 10:16:05 pm »
Yeah, I didn't notice it was 1.6. ^^

Using 2.0 is perfectly fine, it's actually the recommended version and yes you should use it.
There are a few threads about this. The website will be updated when 2.0 is officially released.

855
Graphics / Re: Can't get different font
« on: January 16, 2013, 09:44:57 pm »
If you don't use sf::Text::setFont (or provide your font in sf::Text constructor), the text is drawn with the default font indeed.

Note that in recent versions (on github) of SFML , there isn't a default font anymore.

Pages: 1 ... 55 56 [57] 58 59 ... 63