SDL/libav/opengl [pseudo-OT... probably]

Hello, I have a sample program I’ve pieced together from bits I’ve
found online involving SDL, libav (from ffmpeg) and opengl trying to
get video frames from a movie file and feed the to opengl as texture
data. The problem is that all I get is a white rectangle (on my
mac), or whatever color I set before drawing the supposedly-textured
polygon. I realize the problem is probably not anything directly due
to SDL, but I figure I’d better cover my bases, and if anyone can see
something on the side which might be causing my problems, I would
really appreciate it.

I’ve pasted it up at http://pastebin.com/863868 for now (for a month)
so as to avoid excess text filling up my message.

Thanks for ANY assistance you can offer me.

–Scott

Thanks for ANY assistance you can offer me.

Make sure GL_TEXTURE_2D is enabled, and that your textures are sized to
powers of 2 (a 640x480 texture won’t work, a 512x512 one will), and make
sure you specified all the miplevels…those are the usual reasons that
textures silently go missing.

Check glGetError(), too.

–ryan.

Thanks… It was the power-of-2 thing… >.<

I thought I’d read about them doing away with that sometime around
OpenGL 2.0?

Anyway, thanks again, and sorry I was dumb and didn’t think to try
that… ^^;;

–ScottOn Jan 21, 2007, at 9:58 AM, Ryan C. Gordon wrote:

Thanks for ANY assistance you can offer me.

Make sure GL_TEXTURE_2D is enabled, and that your textures are
sized to
powers of 2 (a 640x480 texture won’t work, a 512x512 one will), and
make
sure you specified all the miplevels…those are the usual reasons
that
textures silently go missing.

Check glGetError(), too.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

New question, though:

I’m calling SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1);, but I
don’t seem to be getting any double buffering when I redraw. What am
I doing wrong with that?

–ScottOn Jan 21, 2007, at 9:58 AM, Ryan C. Gordon wrote:

Thanks for ANY assistance you can offer me.

Make sure GL_TEXTURE_2D is enabled, and that your textures are
sized to
powers of 2 (a 640x480 texture won’t work, a 512x512 one will), and
make
sure you specified all the miplevels…those are the usual reasons
that
textures silently go missing.

Check glGetError(), too.

–ryan.


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl