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

Pages: [1] 2 3 ... 21
1
Graphics / Can't render in a thread
« on: November 06, 2015, 08:10:20 am »
Hi guys!

I'm using SFML v2.3, Mingw32 v4.9.2 and Windows 10.

I'm trying to render in a thread, and runtime errors keep coming no matter what I do (Failed to activate the window's context). Here's the code I'm using.

#include <future>
#include <SFML/Graphics.hpp>

int main()
{
    // create the window
    sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
    window.setVerticalSyncEnabled(true);

    // run the program as long as the window is open
    while (window.isOpen()) {

        // handle events
        {
            sf::Event event;
            while (window.pollEvent(event)) {
                // "close requested" event: we close the window
                if (event.type == sf::Event::Closed) {
                    window.close();
                }
            }
        }

        // clear the window with black color
        window.clear(sf::Color::Black);

        window.setActive(false);
        std::async(std::launch::async, [&]() {
            window.draw(sf::CircleShape(20));
        }).wait();

        // end the current frame
        window.display();
    }

    return 0;
}

Am I missing something? Thanks.

2
I think he means he wsnts to create f2p games that work in Linux

3
Be careful about the include guards. I would prepend ODFAEG in all the include guards (ODFAEG_TILEMAP for example).

4
I'm not sure if you already know doxygen, but it's an amazing tool that generates documentation from your source comments (I think SFML still uses it)

5
I think that some documentation would be more useful than videos

6
SFML wiki / Re: [Sources] Rich text
« on: February 24, 2014, 08:09:52 pm »
Hey guys!

FYI, I've released version 2.0.0 that mainly fixes the newline bug.

Have fun!

7
Can you define a pure virtual function with the auto return type? It doesn't make sense to me...

8
Maybe you should use std::function and forget all this headaches :P

9
General / Re: Computing the normals of AABB collision
« on: February 20, 2014, 12:42:10 am »
Looks like you still lack basic concepts of physics. Mind if I ask you why don't you use Box2D, for example?

10
Totally agree with the user above. Always go for simplicity unless you can't for crucial reasons.

11
Network / Re: sf::Packet onSend and onReceive - Simple zlib Implementation
« on: February 08, 2014, 01:12:19 am »
Amazing article by the way. You're such a genius, Nexus!

12
General / Re: Re: Trouble switching states...
« on: February 03, 2014, 08:50:00 am »

 

while (GameState == TestRoom);
{


 

Thanks for any help, you guys.
Remove the ;

13
SFML projects / Re: My small 2D game creation software - [Game Inventor]
« on: January 20, 2014, 10:41:53 pm »
Good old days learning the basics of programming with Game Maker!

I have to try it but looks quite nice. I like you did choose Qt (I'm in love with it).

So you're not going to make it open source? Would be nice to contribute.

I'm developing an open source Spine like software. Maybe it could be integrated into Game Inventor in the future.

14
Graphics / Re: Delayed rotation
« on: January 20, 2014, 10:00:46 am »
Glad to hear that!

Sorry Nexus, I didn't know Thor also supported this. Is it the signed angle function?

15
Graphics / Re: Delayed rotation
« on: January 19, 2014, 08:48:00 pm »
It computes the shortest angle difference. Is a game maker script but it's easily convertible to C++.

Pages: [1] 2 3 ... 21