[SDL] Convert opencv IplImage * to SDL_Texture * (SDL 1.3)
alex.barry at gmail.com
Sat Jul 17 17:35:18 PDT 2010
Well, if the most efficient way is to just use SDL_Surface stuff, I found
this link (
that seems to have some value to it.
I think my biggest question is just how to proceed: with SDL_Texture or
If you have some code, though, that would be helpful :)
Thanks for the help
On Sat, Jul 17, 2010 at 8:32 PM, Justin Coleman <jmcoleman at gmail.com> wrote:
> I think I have some old code for accessing opencv images, I could post
> it Monday if you like, assuming you don't get anything better before
> On Sat, Jul 17, 2010 at 8:18 PM, Alex Barry <alex.barry at gmail.com> wrote:
> > Well, I bit the bullet and decided to work on some software using SDL 1.3
> > I'm under the impression that to render to a window, you need to use
> > textures. Well, after searching the wiki and SDL_video.h, there doesn't
> > seem to be a way to directly access pixels from a texture to convert an
> > image. I noticed there seems to be a lot of code that still uses
> > SDL_Surface * and even found a a function that converts a surface to a
> > texture. Is that the proper way to do things, so does anyone have a
> > suggestion?
> > I'm using opencv to capture a webcam and do some shape tracking, but I
> > SDL has much better event handling and graphic display.
> > I'm also not sure of the pixel format from the IplImage - I did a few
> > searches and the best I hear is that it is BGR format...SDL_Texture has
> > options to use that, but I'm not sure what BGR format it is (the wiki
> > a few different versions...)
> > Any help would be appreciated.
> > Take care,
> > -Alex
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> SDL mailing list
> SDL at lists.libsdl.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL