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

Pages: [1]
1
D / Re: Drawing in threads
« on: February 22, 2017, 02:56:29 pm »
I'm not doing any event handing in the thread.

The reason I'm using a separate thread is that I dont want the app to become unreponsive during the animation. There's definitely a possibility to pass a RenderWindow to a thread in SFML. See bottom of page.
http://www.sfml-dev.org/tutorials/2.4/graphics-draw.php

Since I dont need to process input during animation, I've decided to do the animation in the main thread after all. It seems to be working fine.



2
D / Drawing in threads
« on: February 22, 2017, 01:10:38 pm »
dfsml 2.1

Working with DSFML has been very pleasant and fairly painless so far, but now I've hit a bit of a snag.

When I call window.display in a thread I get an error "Failed to activate the windows context". I've set window inactive in the main thread and tried to pass a window to the animation thread but that's not possible, no overloads for that.

If I dont call window display in the thread the animation still works but is somewhat irregular (probably because the call to display in the main thread and the sleep in the animation thread are not coordinated).

The documentation on Drawing from Threads says "to be done later", so I guess this simply isn't implemented yet? Any work arounds?


3
D / Re: Error when closing window
« on: May 25, 2015, 12:14:08 am »
Quote
Any other information you can give me? Maybe a minimal example that reproduces the error when you build from the command line?

It's just the sample code from the wiki (building your first DFSML Program), the one that draws a smiley, I didn't change much.

Quote
And you can suppress the destructor output by defining the version DSFML_Quiet_Destructors.

I see. That works.

Thanks


4
D / Re: Error when closing window
« on: May 20, 2015, 01:57:28 pm »
I've set up dsfml with eclipse and DDT and can now better see what happens when I close the app. The following is printed to stdout:

Destroying Texture
Destroying Shader
Destroying RenderWindow
Destroying Window
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying VertexArray
Destroying CircleShape
Destroying CircleShape
Destroying CircleShape
Destroying CircleShape
Destroying RectangleShape
Destroying RectangleShape

But I don't get an error now. It only happens when I build from the command line.

So far I'm very impressed with DSFML, btw. It seems to be exactly what I was looking for.

5
D / Re: Error when closing window
« on: May 19, 2015, 11:31:28 pm »
The problem goes away if I build in release mode.

6
D / Error when closing window
« on: May 19, 2015, 04:15:08 pm »
I've been checking out dsfml and it looks very promising.

When trying out the sample code (the one with the smiley) I ran into a problem. In order to get rid of the console window, I added the linkerflag "-L:/su:windows" to dub.json. It does suppress the console window but now when I exit the app I get an InvalidMemoryOperationError.

Any thoughts?

Pages: [1]