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

Pages: 1 2 [3] 4
31
Graphics / Re: onCreate() text glitch
« on: May 11, 2014, 12:53:41 pm »
I have no idea what's the purpose of your onCreate() method, let alone how it relates to the font problem.

Please read this thread carefully and edit your post accordingly, so that we can help you in a meaningful way.

some search may help you:
http://www.sfml-dev.org/documentation/2.1/classsf_1_1Window.php#a106633b9be49b27f83d4712689b493eb

32
Graphics / onCreate() text glitch
« on: May 11, 2014, 12:27:13 pm »
language: c++
visual studio ultimate 2013
sfml 2.1 static [20.02.2014]

minimal code:
namespace game
{
        class Window : public sf::RenderWindow
        {
                public:
                        void onCreate();
        };
};

void game::Window::onCreate()
{
        // load files
}

first time it appears when i tried loading files inside onCreate(),
so i removed line that load files in onCreate() but it was still
appearing .... then i removed whole function onCreate() and
glitch disappeared.
I tried this more time to be sure it isn't my fault

33
General / Re: QuadTree is adding objects to only one children
« on: May 10, 2014, 08:50:21 pm »
i solved problem without debugging  :) :D ;D

34
General / Re: QuadTree is adding objects to only one children
« on: May 10, 2014, 05:50:54 pm »
well, i have been trying to solve this whole day so ......

35
General / Re: QuadTree is adding objects to only one children
« on: May 10, 2014, 05:38:25 pm »
i tried editing code but doesnt work.

36
General / Re: QuadTree is adding objects to only one children
« on: May 10, 2014, 05:23:19 pm »
can you show me repaired code ?

37
General / QuadTree is adding objects to only one children
« on: May 10, 2014, 12:15:40 pm »
Initialize it with max_level 1 to have only 4 childrens.
its adding objects to only one children : SouthEast.
I have no idea why.

38
General discussions / Re: SFML 3 - What is your vision?
« on: May 01, 2014, 04:35:39 pm »
i am sorry......
now i see: asMicroseconds

39
General discussions / Re: SFML 3 - What is your vision?
« on: May 01, 2014, 04:26:50 pm »
i dont want to replace it with chrono just add something like sf::PreciseClock

40
General discussions / Re: SFML 3 - What is your vision?
« on: May 01, 2014, 03:08:02 pm »
- C++11: std::to_string ...
- Network: nat hole punching, define packets ttl, timestamp
- Graphics: motion blur shader, shake screen
- Global: "inline" for short functions [like getPosition(), getRotation() ...etc]
- System: add precise clock: std::chrono

41
Graphics / Re: sf::Text crash the program
« on: April 18, 2014, 07:14:20 pm »
but thanks for your help. :)

42
Graphics / Re: sf::Text crash the program
« on: April 18, 2014, 07:06:09 pm »
problem solved:

void gameWindow::setTextProperties(sf::Text &text, std::string string, unsigned char_size, sf::Color color, sf::Font font, sf::Vector2f position, float angle, sf::Uint32 style)
to:
void gameWindow::setTextProperties(sf::Text &text, std::string string, unsigned char_size, sf::Color color, sf::Font &font, sf::Vector2f position, float angle, sf::Uint32 style)

43
Graphics / Re: sf::Text crash the program
« on: April 18, 2014, 06:52:17 pm »
I think here it is:
*gameFilesMgr::instance().
Looks dangerous.
ps And use debug build.

inline static gameFilesMgr &instance()
{
        static gameFilesMgr i;
        return i;
}

sf::Font *getFont(std::string);

44
Graphics / sf::Text crash the program
« on: April 18, 2014, 06:40:37 pm »
Visual Studio 2013
sfml 2.1 [myself compiled]

sf::Text fps;

void gameWindow::setTextProperties(sf::Text &text, std::string string, unsigned char_size, sf::Color color, sf::Font font, sf::Vector2f position, float angle, sf::Uint32 style)
{
        text.setString(string);

        text.setCharacterSize(char_size);
        text.setColor(color);
        text.setFont(font);
        text.setPosition(position);
        text.setRotation(angle);
        text.setStyle(style);

        text.setOrigin(gameMath::setOrigin(text.getGlobalBounds()));
}

setTextProperties(fps, "", 12, sf::Color::Magenta, *gameFilesMgr::instance().getFont("font-orbitron-medium"), sf::Vector2f(2,2), 0, sf::Text::Regular);

fps.setString("string");

window.draw(fps);

 

it crashes when i call setTextProperties.
i had this problem even in sfml 2.0 .

font-orbitron-medium -> not the problem because same line is used in my npc's names

I have no idea where is the problem.

45
General / Re: Flickering
« on: April 18, 2014, 12:01:38 pm »
i see it but a bit.
are your character images all same size ?

Pages: 1 2 [3] 4
anything