Display format
Display format
Display format
Display format
Display format
Display format Display format Display format Display format Display format Display format Display format Display format
Display format Display format
Display format
Go Back  Xtreme Visual Basic Talk > > > > Display format


Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2009, 10:18 PM
Chris Ara Chris Ara is offline
Centurion
 
Join Date: Feb 2005
Posts: 176
Question Display format


I'm trying to get the display format for my device. I need to know the depth format for the autodepthstencilbuffer. I've tryed using the device manager to get the format for the default adapter but with no luck.

Code:
    Public Sub InitializeDevice()

        Dim PP As New PresentParameters
        Dim Format As Direct3D.Format
        Format = Manager.Adapters(0).CurrentDisplayMode.Format

        With PP
            .Windowed = True
            .SwapEffect = SwapEffect.Discard
            '  .BackBufferFormat = Format.D24S8
            .EnableAutoDepthStencil = True
            ' .AutoDepthStencilFormat = DepthFormat.D24S8
            .AutoDepthStencilFormat = Format
        End With

        Try

            nDevice = New Direct3D.Device(0, DeviceType.Hardware, Window, CreateFlags.SoftwareVertexProcessing, PP)

            nDevice.RenderState.ZBufferEnable = True
            nDevice.RenderState.Lighting = True
            'nDevice.RenderState.Ambient = System.Drawing.Color.White

        Catch ex As Direct3DXException

            System.Windows.Forms.MessageBox.Show(ex.ToString)

        End Try

    End Sub
Here is the code I'm using. When I use this code I keep getting a loader lock error. I'm not even really sure what that is and why I am getting it. Any suggestions ty.
Reply With Quote
  #2  
Old 06-13-2009, 12:13 AM
Qua's Avatar
QuaDisplay format Qua is offline
Impetuous & volatile

* Expert *
 
Join Date: Apr 2005
Posts: 2,177
Default

Take a look at this thread that discussed the loader lock exception thrown inside the visual studio environment. In my projects I've disabled the LoaderLock exception inside the Managed Debugging Assistant and I have had no problems running my apps on neither mine or other computers.

It has nothing to do, whatsoever, with you accessing the display format.
__________________
Reading is the foundation for all knowledge - Unknown.
Reply With Quote
  #3  
Old 06-13-2009, 09:46 AM
Chris Ara Chris Ara is offline
Centurion
 
Join Date: Feb 2005
Posts: 176
Default

I've already through that thread it was helpful. Still however I can't get the format for the defualt device to work. Is there another way of getting the supported formats of a computer other than just process of elimination i.e(trying each one to see what works)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Display format
Display format
Display format Display format
Display format
Display format
Display format Display format Display format Display format Display format Display format Display format
Display format
Display format
 
Display format
Display format
 
-->