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

Pages: [1]
1
Graphics / Video frames display
« on: March 28, 2008, 02:35:18 pm »
Hmm.. Which files did you update?
IS it the Windows Development files?

Cheers,

Bob

2
Graphics / Video frames display
« on: March 28, 2008, 02:16:27 pm »
Gee that was fast!
OK I will try asap.
And to reply to your previous question, the below function seems to be the one taking so much time. OK, back to the tests.


Code: [Select]

Image.LoadFromPixels()

3
Graphics / Video frames display
« on: March 26, 2008, 08:42:44 am »
Merci for the reply Laurent.

The idea is not necessarily to get a high frame rate but rather a low CPU usage at standard frame rates, say 30 fps.

I was not particularly impressed by the solution below, hence my question on whether I was doing things right. NOw that you are telling me that it is creating a new texture everytime, it makes more sense.

Displaying a 512x512 image at 30fps requires something like 40% of my CPU (I have a low profile dual core PC with no special videocard) which is far too much for my need.

Indeed if you could add a way to reuse the same texture, that would be nice. Maybe also adding a way to handle grey level images... I kind of remember that you can use the LUMINANCE type when calling the glTexSubImage2D() function in which case a pointer to a grey level array (ie. not rgba) is fine. I don't know if that is still current or makes sense in this context though.

Best,

Bob

4
Graphics / Video frames display
« on: March 25, 2008, 07:03:28 pm »
Hi,

I am new in using SFML which I find quite interesting.
I was wondering if someone could confirm that my approach is correct:

I am trying to use SFML as a hardware accelerator to display 2D video frames in a GUI. I have a video camera which triggers a callback every time a new video frame (grey level, 8bpp) is available.

I created a view, an image and a sprite. In the callback, I call the following functions:

Code: [Select]

Image.LoadFromPixels(ImageWidth, ImageHeight, ImageDataPointer);
Sprite.SetImage(Image);
SFMLView.Draw(Sprite);
SFMLView.Display();


Is this the proper (ie. most efficient)way to do this?

Thanks

Bob

Pages: [1]
anything