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.


Topics - Flawe

Pages: [1]
1
Graphics / RenderWindow::draw not working on different thread?
« on: January 02, 2013, 05:12:11 pm »
So I have my main thread set up to create the window and poll the event queue. I set the window to inactive on this thread, launch a second thread and do most of the logic and rendering there.

I use mostly ogl calls but I wanted to add some text rendering utilizing what is available in sfml. I quickly found out that text doesn't render. After investigating a bit, it seems any calls to RenderWindow::draw have no effect when they happen on this second thread. If I do them on the main thread where I created the window every works just fine.

Any ideas what I might be missing? I'm resetting the ogl states, everything else works just fine, no errors, or artifacts, no nothing.

Thanks!

EDIT: I just synced an built latest from the github repo, for what it's worth

2
System / Handle events in different thread
« on: July 27, 2010, 12:33:54 am »
I'm having some trouble handling events in a second thread. I do the rendering and the logic on the main thread but I spawn off a second thread for the event loop. This loop basically calls GetEvent() on the render window but it never seems to catch any events.

I have the window activated on the main thread and deactivated on the event thread, does that matter? Do I need something specific set up for the input to work on this second thread?

Thanks for any help

3
General / Overloaded global operator new
« on: January 18, 2010, 02:18:02 am »
I've implemented my own memory management and so I've overloaded the global operator new/delete/new[]/delete[] and malloc/free/etc...

My problem is, when I create a Shape like this:

Code: [Select]
sf::Shape shape = sf::Shape::Circle( ... );

The following happens (and these are my best guesses based on the call stack):
1. sf::Shape::operator= is called with the newly create shape.
2. std::vector<sf::Shape::Point,std::allocator<sf::Shape::Point> >::operator= is called.
3. std::allocator<sf::Shape::Point>::deallocate is called, which in turn calls global operator delete.

This is were the problem hits. The global operator delete is called, which is intercepted by my implementation of the operator. That's all good, except for the fact that the pointer to be freed wasn't allocated by my operator new. I have no idea where that memory comes from and why it's not deleted with the correct method (respective to how it was allocated).

Anyway ideas what I could have missed?

4
Graphics / Transparent image on top of cleared screen
« on: December 31, 2009, 03:47:57 pm »
I'm trying to fade an image from 0 alpha to full alpha on top of an empty, cleared screen. The image never fades. Does the alpha not get blended with the background color?

5
Graphics / pngs on top of pngs removes alpha
« on: May 18, 2008, 08:06:18 pm »
Sometimes when I draw two different pngs on top of each other the alpha is removed and I get ugly jagged edges, while drawing the pngs on the empty background draws them correctly.

Note that full alpha pixels are drawn correctly all the time, but the pixels where I have color and the alpha is less than 255 seem to be boosted up to have 255 alpha. Anyone got a clue why this happens when the pngs intersect?

Cheers

Pages: [1]