Skip to main content
GameDev.net gamedev.net
🔒 Locked

Main Window Video

Started by newbie_programmer Dec 15, 2005 at 4:37 PM 1 replies 750+ views
Original Post
newbie_programmer
newbie_programmer
Hi Everyone, I have gotten the code to render the video in a different window (Active MOvie window) up and running. (thanks to help i got from toymaker.com) I am trying to render video in the same window as my game but the following call fails.

if(FAILED(pVW->put_Owner((OAHWND)hWnd)))
		return E_FAIL;
this is the initialization of present parametres.

d3dpp.Windowed               = TRUE;
	d3dpp.SwapEffect             = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferFormat       = d3ddm.Format;
    d3dpp.EnableAutoDepthStencil = TRUE;
    d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
    d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE;

    // Create rendering device object
    if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
                                      D3DCREATE_SOFTWARE_VERTEXPROCESSING,
                                      &d3dpp, &g_pd3dDevice ) ) )
i am using the same handle to the window i dont know where i am going wrong. Help me out please. PS:- This is the first time i have posted code and have tried to do it the right way. if i have not posted it in the right way i apologize. Thank You.
circlesoft
circlesoft
I'm not really experienced with DShow, so I can only try to point you in the right direction. Have you looked at the Texture3D9 sample in the SDK? This demonstrates how to render to an IDirect3DTexture9, which in turn can be rendered to the screen. Doing this allows you to render the video to pretty much anywhere you want - as a textured quad on-screen, onto the screen of a TV model in the game, or even as the texture of some character.

I would try checking that sample out, to see exactly where you are getting hung up at.

Topic Locked

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

Sign in to reply to this topic.