Hi Mark,

   In v1.2 beta we check for existing of D3D library only in
the following cases:


(A)
    HINSTANCE h = LoadLibrary("ddraw.dll");
    if (!h) {
        D3dCtx::d3dError(D3DNOTFOUND);
        exit(1);
    }

    LPDIRECTDRAWENUMERATEEX lpDDEnumEx;
    // assume Ansi
(B)
    lpDDEnumEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(h,
                                              "DirectDrawEnumerateExA");
    if (!lpDDEnumEx) {
        // try Unicode
        lpDDEnumEx = (LPDIRECTDRAWENUMERATEEX) GetProcAddress(h,
                                               "DirectDrawEnumerateExW");
    }
    FreeLibrary(h);
    if (!lpDDEnumEx) {
        D3dCtx::d3dError(D3DNOTFOUND);
        return;
    }


And also,

(C)
 hr = DirectDrawCreateEx( pGUID, (VOID**)&pDD, IID_IDirectDraw7, NULL );
 if (FAILED(hr)) {
       D3dCtx::d3dError(D3DNOTFOUND);
       return D3DENUMRET_CANCEL;
  }
(D)
  hr = pDD->QueryInterface( IID_IDirect3D7, (VOID**)&pD3D );
  if (FAILED(hr)) {
       D3dCtx::d3dError(D3DNOTFOUND);
       SafeRelease(pDD);
       return D3DENUMRET_CANCEL;
   }

We don't have ATI Mobility card for testing so we think the problem
is (A) or (B) since the program can continue to run afterwards.

In v1.2.1 beta1, the checking in (A) & (B) is removed.
But as mention the warning message still appear (only in mobility
card) and program continue to run. On further investigation
the problem is cause by


   DirectDrawEnumerateEx(DriverEnumCallback, NULL,
                          DDENUM_ATTACHEDSECONDARYDEVICES |
                          DDENUM_DETACHEDSECONDARYDEVICES |
                          DDENUM_NONDISPLAYDEVICES );

in DriverEnumCallback function,

BOOL WINAPI D3dDriverInfo::DriverEnumCallback(
                              GUID* pGUID, LPSTR strDesc,
                              LPSTR strName, VOID*,
                              HMONITOR monitor)
{
    LPDIRECT3D7   pD3D;
    LPDIRECTDRAW7 pDD;
    HRESULT       hr;

    // Use the GUID to create the DirectDraw object
    hr = DirectDrawCreateEx( pGUID, (VOID**)&pDD, IID_IDirectDraw7, NULL );
    if (FAILED(hr)) {
        D3dCtx::d3dError(D3DNOTFOUND);
        return D3DENUMRET_CANCEL;
    }

    // Create a D3D object, to enumerate the d3d devices
    hr = pDD->QueryInterface( IID_IDirect3D7, (VOID**)&pD3D );
    if (FAILED(hr)) {
        D3dCtx::d3dError(D3DNOTFOUND);
        SafeRelease(pDD);
        return D3DENUMRET_CANCEL;
    }
    ...
}

somehow the pGUID pass in is not DirectDraw7 compatible so the
warning is output.

We'll fix this by only EnumerateEx
DDENUM_ATTACHEDSECONDARYDEVICES
and remove the warning when DirectDraw create fail in
enumerate callback.

Bug 4391432 is submitted. and we'll fix this by v1.2.1beta2.

Thanks for your bug report.

- Kelvin
----------------------
Java 3D Team
Sun Microsystems Inc.

>X-Sender: [EMAIL PROTECTED]
>Date: Tue, 21 Nov 2000 14:52:14 -0500
>To: Kelvin Chung <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>From: Mark Ferneau <[EMAIL PROTECTED]>
>Subject: Re: [JAVA3D] 1.2.1 beta DirectX8.0 issues
>Cc: isie Masri <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
>Mime-Version: 1.0
>
>Kelvin,
>
>I am running J3D 1.2.1 Beta 1 Direct X with Win2K & Win98 and I still am
>definitely getting this warning also.  I know that DirectX 8.0 is installed
>properly because dxdiag.exe tells me so and the performance I am seeing is
>better than DirectX 7.0.
>
>The boards are ATI Mobility-P, OS is Win2K / Win98, this happens with both
>the previous and the current version of the ATI Mobility-P driver.
>
>I also looked in the J3D.DLL and found the warning string: "DirectX 7.0 is
>requierd for this version of Java3D.".  If it's not supposed to be in J3D
>1.2.1 Beta 1, why am I finding it?
>
>--Mark
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to