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

Pages: [1]
1
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]