Skip to main content
gamedev.net
🔒 Locked

Displaying large non-square images

Started by LGAB Dec 11, 2008 at 5:59 AM 1 replies 1.2k views
Original Post
LGAB
LGAB
Hey everone, I want to display large non-square images, such as sequences of HD frames in 1920x1080, other common TV formats like 720x576 and potentially any user resolution in between. I'd also like to store them in RAM for playback in real time to use my app as a flipbook/RAM player. Loading the frames is going to be slow of course, that's always the case even with professional products, but I'm interested in the best way of storing and displaying these odd resolutions. The way I've done it before is to create a square buffer, larger than the next multiple of 8 of the image, so an HD frame would require a 2048x2048 buffer, a PAL frame like 720x576 requires 1024x1024, etc. Seems wasteful, so is it necessary? If I only store the actual image resolution in memory, is there a quick enough way to copy it into an OpenGL-friendly buffer of a larger size, and yet maintain a 25fps playback? I'd like some insight into how these OpenGL-based players usually work, if someone know..! Or suggestions on how you'd do it :) Thanks in advance!
Fen
Fen
try using NPOT textures (http://www.opengl.org/wiki/index.php?title=NPOT_Textures&printable=yes)

and Pixel Buffer Objects - for allocating and accesing texture data directly on GPU - http://www.songho.ca/opengl/gl_pbo.html

it may helps
Se my programming blog: Code and Graphics
LGAB
LGAB
I have to say, NPOT was perfect for my needs! I didn't know it existed before, and it's definitely fast enough for my needs, and it was easy to implement, I've got HD sequences playing at 20fps straight off a regular harddrive. :) I'm sure I'll get real time on a fast raid.

Thanks!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.