Jump to content
  • Advertisement

Archived

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

Clint Samuel

OpenGL DirectShow(ActiveMovie) with OpenGL render

This topic is 6256 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 am working on a program that will run a DirectShow render in one pane or window and will run another concurrent OpenGL/game render in another. OpenGL rendering in windows API seems to hog the device context and rendering contexts. The MSDN documentation in the DirectShow API(included in DirectX 8.0a SDK), which deals with digital video and raw AVI files, says that DirectShow is a threading API that could have some problems running with other higher priority threads running concurrently. This is because windows threading has been preemptive since Windows 95. - So I believe that without windows thread handling enabled in my application, the higher priority threads could grab the CPU and hold on to the context without letting my DirectShow rendering window run. Since I want my application to have a motion tracking object in the DirectShow window message as input for a corresponding action in the OpenGL rendered window, locking up the DirectShow''s low priority threads could lock up the whole program. - I am planning on using MFC/VC++ 6.0 for the user interface part of my application. Unfortunately, I am not sure how thread-safe the MFC are with OpenGL and DirectShow COM filters. Should I use an idle event or timer callback in my OpenGL code to signal the DirectShow graph object that it is releasing the context? If so, should I use the "wiggle" functions in my OpenGL code, i.e. wglMakeCurrent, etc.? I have not been able to find any examples of using DirectShow (a.k.a ActiveMovie) with OpenGL, just DirectInput with OpenGL. - I also am just learning the MFC now, so I am not sure what is the best way to set up the two animation renders in two windows. Should I use an MDI application with two child windows and explicit thread messaging? I don''t think just working with modifying the View classes will work for DirectShow and MFC like it does for OpenGL and MFC. My DirectShow/MFC application has most of it''s COM codes implemented in the CMainFrame classes. I also don''t know what thread protection is built in to MDI child windows with MFC. - The two applications that I want to combine are: 1. the CamShiftDemo posted by Bob Davies on Intel''s web site as part of the OpenCV API example codes at: http://www.intel.com/research/mrl/research/opencv/ 2. the OpenGL/directinput virtual world tutorial #23 posted by Justin Eslinger on Jeff Molofee''s site at: http://nehe.gamedev.net/tutorials/lesson23.asp I think that this can work, but I am not sure how to go about running the two renders concurrently, or if it ''should'' be done. Can anyone help? Has anyone heard about DirectShow or ActiveMovie ever being used with OpenGL? -Thanks. -Clint Samuel

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!