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

Pages: 1 ... 3 4 [5] 6 7 ... 9
61
General / MSVC++ 2010 64 bit libraries
« on: December 08, 2010, 12:16:32 pm »
thanks! thats awesome.

by the way, on mc PC there's no runtime error or anything when I used the 32bit dll's, it just doesn't ever draw anything.

62
General / MSVC++ 2010 64 bit libraries
« on: December 06, 2010, 09:32:59 pm »
hey there.

any chance you could upload the dlls and libs again?

63
Graphics / Program crashes upon exiting int main(); [sfml 2]
« on: November 25, 2010, 03:27:27 pm »
When I try to debug it, Visual Studio shows "no source", but says the call stack location is  "atioglxx.dll" so I'm assuming it has something to do with graphics.

What could this be? I've checked the code again and again. I'm deleting all pointers probably, I'm closing all streams and windows probably.  

I have two configurations for both debug and release, both with the respective sfml2 libraries.

I remember that this problem randomly occured for me with sfml 1.x too, but here it just happens every time.

Could this be an ATI-driver related issue? I've updated it just a few weeks ago when I installed fallout new vegas.

edit: oh and I should probably say: This happens exactly when I'm exiting int main();

before the return 0; I can set a breakpoint just fine and it doesn't crash before that. the window also closes etc.

64
General discussions / SFML 2.0
« on: November 22, 2010, 08:49:12 pm »
Laurent, would it be possible to add a method to sf::RenderWindow that returns a RenderImage (or just Image) containing everything that's "drawn on the window" right now?

Would make setting the texture inside a shader to the current screen's contents very very easy and much more comfortable.

65
General discussions / Thanks
« on: November 18, 2010, 10:00:50 am »
SFML is, hands down and even from an objective point of view, the best 2D+multimedia API out there and even if you want to do 3D it's probably choice #1 for handling sound, events, networking and the windows (unless you want to use DirectX of course). It's the fastest one, with the most features and the best/cleanest interface of them all. Not even mentioning the fact that Laurent is still working on it and will probably do so for the forseeable future, meaning it's not basically "dead" like SDL. Also there's barely any question that Laurent doesn't answer himself if you ask him.

I have no idea why there is even a single person who is still using SDL or Allegro with C++ and even more so, why people sometimes still suggest SDL or Allegro when a newcomer comes to a C++ forum and asks how to program games with C++. Both of those APIs are hopelessly outdated compared to this and SFML is soooooo much simpler and cleaner to use.

To be completely honest, if I was rich, I'd donate large sums to Laurent on a regular basis just because of the awesome work he does.

66
General discussions / New Shader class in SFML 2 to replace PostFx
« on: November 18, 2010, 09:55:43 am »
Quote from: "Laurent"
Basically, people had to learn GLSL and then unlearn a few things and replace them with SFML specific stuff. I find it more natural to use plain GLSL.


Mhm, yeah that is true I guess. I remember getting confused with the GLSL syntax a few times when I started using it together with the "sfmlglsl".

But without all the gl_Whatever stuff in the shader files it just seemed way more streamlined with the rest of SFML to me.

Maybe a solution would be to write a more detailed tutorial about pixel shaders in general?

I know it would cost you time, but you wouldn't have to go into syntax specific things like "put a ; after every statement". You'd just have to tell people: This is how you address pixels of a texture, this is how you manipulate it's color, and this is how you put it out to the screen. And maybe something like: "A pixel shader does that, and it works like this" etc.

Or you could somehow provide us with the preprocessing code so we can include it in our code ourselves?

But whatever, it isn't too big of a deal I guess. It's one of the few (if not only) 2D libraries where we even get to use pixel shaders so I'm happy :)

67
General discussions / New Shader class in SFML 2 to replace PostFx
« on: November 17, 2010, 09:31:13 pm »
why did you remove the preprocessing step? seem very odd. what you had in there was a very clean, very easy to use version of the GLSL shader language.

68
General / Best way to load the same image multiple times
« on: November 17, 2010, 05:40:40 pm »
you can write a simple generic ResourceManager class using templates that manages all kinds of stuff:


Code: [Select]


template <class T>
class ResourceManager
{
public:
    //......
    void Store(string name, T *obj)
    {
         storage[name]=T;
    }

    T* Get(string name) { return storage[name]; }
private:
map storage<string, T*>
}

//Usage:

void xyz()
{
      ResourceManager<Image> imageManager;
      //pointer is important, otherwise it gets deleted at the end of the block
      Image *i = new Image; i->LoadFromFile("...");
     imageManager.Store(i);
     i = imageManager.Get("...");
}


I left out namespaces for the most part cause it's bothersome to write.

You may want to attach the singleton pattern to the ResourceManager classes. But I won't go into that, you can look it up on google.

69
General / Questions about managing states
« on: November 12, 2010, 04:55:51 pm »
This is an excellent case for the Singleton Pattern. If you don't know what it is, google it up, it's pretty simple.

70
Graphics / Huge problem with SFML
« on: May 23, 2010, 03:39:08 pm »
I have the same problem. No idea how to fix it (1.6 here)

71
General discussions / OpenGL 4
« on: April 12, 2010, 05:29:44 pm »
feels to me like new opengl specifications pop out of the ground every day.

72
Graphics / Shaders: Accessing pixels around _in
« on: March 14, 2010, 12:16:37 pm »
Quote from: "Laurent"
You have to send the texture size to the shader, so that it can compute the proper offset (which is 1/size).


Thanks! :)

edit: Still, why is my image upside down when I pass it to the shader using PostFX::SetTexture? Code is pretty much straightforward:

Code: [Select]

sf::Image someimage; someimage.LoadFromFile("foo.bmp");
sf::PostFX what; what.LoadFromFile("whaat.okay");
what.SetTexture("background",&someimage);

//....
mywindow.Draw(what);


Using this simple shader:

Code: [Select]

texture background

effect
{
    _out=background(_in);
}


draws the picture upside down (but x-values remain the same). Is that intended?

73
Graphics / Shaders: Accessing pixels around _in
« on: March 14, 2010, 10:19:38 am »
OK, using sf::Image I created the appropriate heightmap. This way I can pass the Image on to my shader program.

Now something else:
Within my algorithm, I check the "neighbours" of every pixel. But in the PostFx Tutorial here on sfml-dev.org it states that the coordinates of _in are in the range from 0 to 1. How do I (for example) access the pixel to the left of the current pixel?

Quote

float red = texture(vec2(_in.x-1.0,_in.y)).r;


obviously wont work.

by the way: why does sf::PostFX::SetTexture pass on images upside down?

74
Graphics / Shaders: Accessing pixels around _in
« on: March 14, 2010, 05:33:04 am »
Hi.

I've got an 2-dimensional (float) array that I need to pass on to my shader.

More specifically: The 2D-Array is a heightmap that I need for calculations inside the shader. Each point (x,y) contains the height of that location.

I know that 2D-Arrays are only supported by geometry shaders, so how would I do that? I guess the best way would be to create a heightmap-texture using my heightmap-array, but how can I do that using sf::Image?

75
General discussions / New Shader class in SFML 2 to replace PostFx
« on: November 04, 2009, 08:54:17 pm »
Already made up your mind about giving us the ability to apply textures to sf::Shape's ?

Pages: 1 ... 3 4 [5] 6 7 ... 9