I did it again

rifter1818

Junior Contributor
Joined
Sep 11, 2003
Messages
255
Location
A cold dark place
Ok i finnally got my program to accept the fact that purehardware or hardwarevertexprocessing is a valid and desirable flag but somthing is terribly wrong. As soon as i change from SoftwareVertexProcessing to (HardWareVertexProcessing or PureDevice) two things happen, 1 DROP IN FRAMEFRATE 60 fps -> 20, all my meshes disapear (again). Any ideas of why this is / how to fix it? (video card is a nVida GeForce 4 128mb)
 
wyrd said:
Can you post us your device creation code?
Visual Basic:
Dim DevType As DeviceType
        Dim CFlags As CreateFlags
        Dim Caps As Caps = D3d.GetCaps()
        Dim PP As New Microsoft.DirectX.Direct3D.PresentParameters
        DevType = DeviceType.Hardware
        CFlags = CreateFlags.SoftwareVertexProcessing
        If Caps.DeviceCaps.SupportsHardwareTransformAndLight Then
             CFlags = CreateFlags.HardwareVertexProcessing
        End If
        If Caps.DeviceCaps.SupportsPureDevice Then
            CFlags = CFlags Or CreateFlags.PureDevice
            Debug.WriteLine("PureDevice")
        End If
        PP.BackBufferCount = 1
        FileOpen(1, Application.StartupPath & "\config.cfg", OpenMode.Input)
        Input(1, PP.BackBufferWidth) '1024
        Input(1, PP.BackBufferHeight) '768
        Input(1, PP.BackBufferFormat)'A8R8G8B8
        FileClose(1)
        PP.Windowed = False
        PP.SwapEffect = Microsoft.DirectX.Direct3D.SwapEffect.Discard
        PP.AutoDepthStencilFormat = DepthFormat.D16
        PP.EnableAutoDepthStencil = True
        PP.PresentFlag = PresentFlag.None
        MainForm.Show()
        If Not D3d.Initialize(DevType, MainForm, CFlags, PP) Then
            End
        End If
 
ye from what i know the device back buffer can't be A8R8G8B8.

if you need an alpha value on a rendered surface, that surface can be A8R8G8B8 but the device back buffer can't
 
Back
Top