SFML community forums
Help => Graphics => Topic started by: EClaesson on August 11, 2009, 02:52:15 am
-
Hi there.
I'm sitting on a fairly new Laptop (yes i know, crappy gfx-card) but it at least support PixelShader 2.0. But i guess the total lack of any VertexShader support and HW T & L is the problem.
Is it possible to run PostFX on gfx-cards like mine?
I have my small plans on implementing my own, using some lightweight scripting language such as GameMonkey. This could use GetPixel() to get the color and give me the new color. The problem i have is that there are no SetPixel() (afaik).
Laurent, take this as a feature request maybe? :wink:
Would this bee way too slow? It may mean that every pixel of the screen has to be read and written every frame.
Thanks in advance for your answers. :)
-
Is it possible to run PostFX on gfx-cards like mine?
Not if sf::PostFX::CanUsePostFX() returns false.
This could use GetPixel() to get the color and give me the new color. The problem i have is that there are no SetPixel() (afaik).
sf::Image::SetPixel(x, y, color).
Would this bee way too slow? It may mean that every pixel of the screen has to be read and written every frame.
Definitely. At least you should directly work on the array of pixels, and re-uploading them once per frame with sf::Image::LoadFromPixels.
-
Definitely.
Definitely.. too slow?
-
Definitely.. too slow?
Yep. Especially if you target old configurations.
-
Yep. Especially if you target old configurations.
Not old really. Just for systems which doesn't support advanced shaders. Like my laptop, dualcore cpu, 2gb ram, weak/integrated gfx-card and such.
-
At least you should directly work on the array of pixels, and re-uploading them once per frame with sf::Image::LoadFromPixels.
Does LoadFromPixels want a miltidimensional array, or a "single"? And what type does it expect the pixel values to be?
-
Does LoadFromPixels want a miltidimensional array, or a "single"? And what type does it expect the pixel values to be?
It's all in the documentation ;)
--> Single array of 8-bits RGBA components.