Platform SDK: DirectX

Step 1.2: Prepare the Texture Surface

[C++]

This section pertains only to application development in Visual Basic. See Direct3D Immediate Mode C/C++ Tutorials.

[Visual Basic]

You can use a DDSURFACEDESC2 type to describe the texture surface:

Public Function CreateTextureSurface(sFile As String) As DirectDrawSurface7
    Dim ddsTexture As DirectDrawSurface7
    Dim i As Long
    Dim bIsFound As Boolean
    
    ' Prepare the texture surface.
    Dim ddsd As DDSURFACEDESC2
    
    ddsd.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH Or DDSD_PIXELFORMAT Or DDSD_TEXTURESTAGE

Now, you are ready to enumerate the texture formats. This step is explained in Step 1.3: Enumerate the Texture Formats.