Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SteveC

OpenGL Hardware Overlays in OpenGL?

This topic is 5898 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve looked around for information on this and couldn''t find anything obvious relating to this. Although I did see the article on playing an AVI file using OpenGL, I''m relatively certain that''s not what I''m looking for. DirectX 7 Had the ability to create special overlay surfaces if the video hardware supported it. This overlay surface is composited with the primary surface by the hardware. Some driver implementations also supported YCbCr ( YUYV ) pixel formats. Is there a way to do this with OpenGL?

Share this post


Link to post
Share on other sites
Advertisement
Thanks for the tip.

I looked on the nehe site and found the Playing an AVI file - which indicated how to do a similar thing, but is not exactly what I need.

I want to be able to access video memory and the hardware feature for an overlay.

Are there any other websites I can look at?

Share this post


Link to post
Share on other sites
opengl does not have access to 2d hardware accelerated stuff like that. it is designed to be a cross platform api, and thus needs to abstract away more things then dx. the closest you can get is using a YUV texture format, and since you ussualy redraw the screen anyway, you redraw the texture and scene. if this does not suit you, then use opengl for 3d stuff while using directdraw for overlay support. this is possible because you dont need exclusive hardware control for overlays to work correctly.

opengl is not designed for direct video access, neither is d3d. if you want that use directdraw. in opengl.d3d you instead create and modify textures which you draw as quads on the screen.

now on to why you need the overlay, please explain further to what you are doing. if you are expecting to read from vram, then forget it. its too slow and not what overlays are for. it really sounds to me that you are a bit lost and confused at what overlays are meant for. they are designed with streaming video content that uses YUV format. the app would place the yuv data on the surface and the hardware converts it to rgb for display on the screen NOT for you to read. furthermore many newer cards contain partial DVD acceleration which means the card can decode more, thus the app is just sending more raw data insteda of decoded data. in no way are you supposed to read from the surface to get or change the pixels of the video.

Share this post


Link to post
Share on other sites
Thanks for the info a person.

However, I am not lost or confused about what I am trying to do.

This is, in fact for playing back YCbCr ( aka YUYV ) decompressed or uncompressed video data. And I am only trying to WRITE the data to the buffer.

So this is the exact application.

Whether or not I write directly to the video memory may be more a bit of semantics. I need a separate pixel buffer that becomes an overlay - how exactly that is accomplished isn't really an issue.

The only reason I ask is I am trying to find out alternative ways of doing this on MacOSX. Currently I'm using Quicktime - which has a good deal of overhead.

On Windows, the code uses the DirectX overlays.

again, thanks for the info a person - it was helpful.

Is there a cross-platform approach for doing this?


[edited by - SteveC on April 30, 2002 10:58:10 AM]

Share this post


Link to post
Share on other sites
excuse me, if i''m completely oblivious to what you mean by overlays, but Windows has the function wglCreateLayerContext.

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
the only way i can think of is using a yuvu texture when supported by the video hardware. actually decoding of videos is unfortunatly not too cross platform. what movie format are you trying to play? since macosx is basically *nix you could look into some of the libraries that they use. smacker is a cross platform codec that may give you the yuvu data for use on the opengl texture surface. while i dont use it, it may help you http://www.radgametools.com

alos look intp things like mpeglib http://mpeglib.sourceforge.net/

just remebmer, mpeglib is gpl''d and thus opens your entire app. this may or may not be acceptable to you.

Share this post


Link to post
Share on other sites
thanks again a person - I''ll look into those possibilities.

We actually decode several types of video formats - DV25, DV50, MPEG I-frame, but this all happens at an earlier stage of the pipeline.

Essentially we are given uncompressed data to be displayed on the screen.

Yeah, GPL is not an option...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!