DirectDraw - Backbuffer DDERR_NOTFOUND

This is a discussion on DirectDraw - Backbuffer DDERR_NOTFOUND within the Game Programming forums, part of the General Programming Boards category; HRESULT: 0x887600ff (2289434879) Name: DDERR_NOTFOUND Description: Requested item was not found Severity code: Failed Facility Code: FACILITY_D3D (2166) Error Code: ...

  1. #1
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465

    DirectDraw - Backbuffer DDERR_NOTFOUND

    HRESULT: 0x887600ff (2289434879)
    Name: DDERR_NOTFOUND
    Description: Requested item was not found
    Severity code: Failed
    Facility Code: FACILITY_D3D (2166)
    Error Code: 0x00ff (255)

    This error is propagated from a primarySurface->GetAttachedSurface(..) call. I use this code to create my surfaces

    Code:
    	DDSURFACEDESC2 ddsd;
    	DDSCAPS2 ddscaps;
    	HRESULT ddrval;
    
    	memset( &ddsd, 0, sizeof(ddsd) );
    	ddsd.dwSize = sizeof( ddsd );
    
    	ddsd.dwFlags = DDSD_CAPS | DDSD_BACKBUFFERCOUNT;
    	ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE | DDSCAPS_FLIP | DDSCAPS_COMPLEX;
    	ddsd.dwBackBufferCount = 1;
    
    	ddrval = idd->CreateSurface( &ddsd, &surfacePrimary, NULL );
    	if( ddrval != DD_OK )
    	{
    		idd->Release();
    	}
    
    	// Get the pointer to the back buffer - fails
    	ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
    	ddrval = surfacePrimary->GetAttachedSurface(&ddscaps, &surfaceBack);
    	if( ddrval != DD_OK )
    	{
    		surfacePrimary->Release();
    		idd->Release();
    	}

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    DirectDraw has been declared deprecated. Although most of the interfaces still work there is no guarantee by MS or by any driver manuf. that they will work in all cases on all cards.

    Use Direct3D to get surfaces, not DirectDraw interfaces.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Couple of simple directdraw questions.
    By Deo in forum Game Programming
    Replies: 3
    Last Post: 05-25-2005, 08:55 AM
  2. Replies: 3
    Last Post: 08-14-2003, 02:37 PM
  3. Windowed DirectDraw problems
    By Magos in forum Windows Programming
    Replies: 0
    Last Post: 01-20-2003, 01:00 PM
  4. DirectDraw Backbuffer clipping windowed-mode
    By beem in forum Game Programming
    Replies: 4
    Last Post: 06-25-2002, 02:17 AM
  5. DirectDraw Tutorials
    By Robert602 in forum Game Programming
    Replies: 3
    Last Post: 12-14-2001, 10:29 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21