ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static HRESULT IDirect3DDevice9Impl_CreateSurface ( IDirect3DDevice9Impl device,
UINT  Width,
UINT  Height,
D3DFORMAT  Format,
BOOL  Lockable,
BOOL  Discard,
UINT  Level,
IDirect3DSurface9 **  ppSurface,
UINT  Usage,
D3DPOOL  Pool,
D3DMULTISAMPLE_TYPE  MultiSample,
DWORD  MultisampleQuality 
) [static]

Definition at line 888 of file device.c.

Referenced by device_parent_create_surface(), IDirect3DDevice9Impl_CreateDepthStencilSurface(), IDirect3DDevice9Impl_CreateOffscreenPlainSurface(), and IDirect3DDevice9Impl_CreateRenderTarget().

{
    IDirect3DSurface9Impl *object;
    HRESULT hr;

    TRACE("device %p, width %u, height %u, format %#x, lockable %#x, discard %#x, level %u, surface %p.\n"
            "usage %#x, pool %#x, multisample_type %#x, multisample_quality %u.\n",
            device, Width, Height, Format, Lockable, Discard, Level, ppSurface, Usage, Pool,
            MultiSample, MultisampleQuality);

    object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DSurface9Impl));
    if (!object)
    {
        FIXME("Failed to allocate surface memory.\n");
        return D3DERR_OUTOFVIDEOMEMORY;
    }

    hr = surface_init(object, device, Width, Height, Format, Lockable, Discard, Level, Usage, Pool,
            MultiSample, MultisampleQuality);
    if (FAILED(hr))
    {
        WARN("Failed to initialize surface, hr %#x.\n", hr);
        HeapFree(GetProcessHeap(), 0, object);
        return hr;
    }

    TRACE("Created surface %p.\n", object);
    *ppSurface = &object->IDirect3DSurface9_iface;

    return D3D_OK;
}

Generated on Mon May 28 2012 05:01:29 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.