AnsweredAssumed Answered

Quad Buffer Stereo With DirectX11

Question asked by mahoaga on Jan 24, 2012
Latest reply on Feb 16, 2012 by Byron

Currently , I am working on a project name Remote Stereo.

My objective in this phase is,displaying an image pair in stereo mode with DirectX 11 with the Quad Buffer SDK that AMD published.I have already written a software for DirectX 9 that is displaying images in 3D,but the problem about that one is AMD's functions that they provided with SDK for DirectX 9 is not working.However,I did it by creating two back buffers and changing the view between them relatively. The thing about DirectX version 11 is the same.I am following all the steps in documentation,however there is a problem about the interface I guess.

 

This is OpenStereoInterface function.Software loads 64 bit dll.files .There is not any problems about this function.Every routine works including AmdDxExtCreate11.

 

HRESULT OpenStereoInterface()

          {

                    PFNAmdDxExtCreate11 AmdDxExtCreate11;

                    HMODULE hDLL;

                    HRESULT hr = S_OK;

                    DWORD code;

                    AmdDxExtVersion extVersion;

 

#if defined _WIN64

                    LoadLibrary(L"atidxx64.dll");

                    hDLL=GetModuleHandle(L"atidxx64.dll");

 

#else

                    LoadLibrary(L"atidxx32.dll");

                    hDLL=GetModuleHandleW(L"atidxx32.dll");

#endif

 

                    /*code=GetLastError();          */

                    AmdDxExtCreate11=reinterpret_cast<PFNAmdDxExtCreate11>(GetProcAddress(hDLL,"AmdDxExtCreate11"));

                    if (AmdDxExtCreate11 == NULL)

                    {

                              hr = E_FAIL;

                    }

                     if (SUCCEEDED(hr))

                    {

                              hr=AmdDxExtCreate11(pDevice,&pExtension);

                    }

 

                     if (SUCCEEDED(hr))

                     {

                               hr=pExtension->GetVersion(&extVersion);

                               if(hr==S_OK)

                               {

                                         sprintf_s(versionInfo,"Extension Version: %d.%d",extVersion.majorVersion,extVersion.minorVersion);

 

                               }

 

                     }

 

                     if(FAILED(hr))

                     {

                               CloseStereoInterface();

                               FreeLibrary(hDLL);

                     }

 

                     return hr;

 

          }

 

And this is the CreateDevice function.I create the device without swap chain,as mentioned in documentation.

 

hr=D3D11CreateDevice(NULL,D3D_DRIVER_TYPE_HARDWARE,(HMODULE)0,0,&FeatureLevels,1,D3D11_SDK_VERSION,&pDevice,&featureLevel,&pDeviceContext);


                    if(SUCCEEDED(hr))

                    {

                              if(SUCCEEDED(OpenStereoInterface()))

                              {

                                         pStereo=static_cast<IAmdDxExtQuadBufferStereo*>(pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID));

                                                  if(pStereo==NULL)

                                                            hr=E_FAIL;

                                                  else

                                                            pStereo->EnableQuadBufferStereo(TRUE);

                              }

 

                    }

                    return hr;

 

However,in the line below;

pStereo=static_cast<IAmdDxExtQuadBufferStereo*>(pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID));

 

pExtension->GetExtInterface(AmdDxExtQuadBufferStereoID) returns null because of a reason I could not found.I debugged the Sample DirectX11 application included in Documentation,and still the same problem in same function.There is no problem with casting,problem is with the GetExtInterface function.

 

 

 

I am using Visual Studio Express Edition 2008 as development tool and all the necessary headers and libraries are imported.

 

What should I do to overcome this problem ?

Attachments

Outcomes