Jump to content
  • Advertisement

el-enemigo

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About el-enemigo

  • Rank
    Newbie
  1. Does any1 got an idea yet?
  2. el-enemigo

    2D HLSL Shader Tutorial for XNA 4.0

    Do you mean something like this? (or this) It doesn't say anything about XNA, but is there any difference at all? Afaik XNA uses Direct3D, so I think you can use the HLSL Shader just like it's shown in those two tutorials. P.S. Since I've never written XNA Code I don't know what it is like, so the things I mentioned before are only assumptions. Anyway I hope this'll help. ;)
  3. Hello all, I wrote a piece of C++ Code sometimes to Capture the Webcam Video Stream to a Windows Media File as it's explained here. But somehow it doesn't work. I checked every line and the error apparently occurs when I want to call the following function: IMediaControl::Run(). Though I don't see what is wrong with it, so I thought maybe you would see it. Anyway here's my Code: // Initalizing FilterGraph and CaaptureGraphBuilder hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&pGraph); hr = CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER, IID_ICaptureGraphBuilder2, (void**)&pBuild); hr = pGraph->QueryInterface(IID_IMediaControl, (void **)&pControl); hr = pGraph->QueryInterface(IID_IMediaEventEx, (void **)&pEvent); hr = pEvent->SetNotifyWindow((OAHWND)hWnd, WM_GRAPHNOTIFY, 0); hr = pBuild->SetFiltergraph(pGraph); // Searching for a Video-Input Device(Webcam) { IMoniker* pMoniker = NULL; ICreateDevEnum *pDevEnum = NULL; IEnumMoniker *pClassEnum = NULL; hr = CoCreateInstance(CLSID_SystemDeviceEnum, NULL, CLSCTX_INPROC, IID_ICreateDevEnum, (void **)&pDevEnum); hr = pDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pClassEnum, 0); hr = pClassEnum->Next(1, &pMoniker, NULL); hr = pMoniker->BindToObject(0, 0, IID_IBaseFilter, (void**)&pCap); pMoniker->Release(); pDevEnum->Release(); pClassEnum->Release(); } // Adding the previously found Video Input Device to the FilterGraph hr = pGraph->AddFilter(pCap, L"Video Capture"); // Creating the File-Writing section of the FilterGraph hr = pBuild->SetOutputFileName(&MEDIASUBTYPE_Asf, L"I:\\VidCap.wmv", &pASFWriter, NULL); hr = pASFWriter->QueryInterface(IID_IConfigAsfWriter, (void**)&pConfig); // <-The config file. I actually don't know what to do with it, maybe this is why I get the error? // Connecting Video Capture Filter to File Writing Section hr = pBuild->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pCap, 0, pASFWriter); pConfig->Release(); hr = pControl->Run(); // <- This is where I get E_FAIL!!! Regards, el-enemigo EDIT: I commented the code, so maybe now someone could help me.
  4. el-enemigo

    Clear Screen with a transparent color

    Thanks for the reply. Are you sure about that? 'Cause MSDN says:Color [in] Type: D3DCOLOR Clear a render target to this ARGB color. [/quote]
  5. Hey all, first of all I'm german so please excuse my grammar. However, I want to Clear the Screen of my Direct3D9 Application with a transparent color and for that I use the following code: hr = pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_ARGB(0, 0, 0, 0), 1.0f, 0); But it looks like the Alphachannel is still being ignored. The Backbuffer format is: D3DFMT_A8R8G8B8 Oh and I think it's worth mentioning that I render on the desktop instead in a window. So my question is, how do I get the background of my Direct3D scene to be transparent? I hope you can help me out...thanks in advance, Regards el-enemigo P,S. Here's a screenshot of my program
  6. el-enemigo

    a

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!