if (LastError == DDERR_OUTOFMEMORY || LastError == DDERR_OUTOFVIDEOMEMORY) {
D3DAppISetErrorString("There was not enough video memory to create the rendering surface.\nPlease restart the program and try another fullscreen mode with less resolution or lower bit depth.");
} else {
D3DAppISetErrorString("CreateSurface for fullscreen flipping surface failed.\n%s",
D3DAppErrorToString(LastError));
}
goto exit_with_error;
}
/*
* Obtain a pointer to the back buffer surface created above so we
* can use it later. For now, just check to see if it ended up in
if (LastError == DDERR_OUTOFMEMORY || LastError == DDERR_OUTOFVIDEOMEMORY) {
D3DAppISetErrorString("There was not enough video memory to create the rendering surface.\nTo run this program in a window of this size, please adjust your display settings for a smaller desktop area or a lower palette size and restart the program.");
} else {
D3DAppISetErrorString("CreateSurface for window front buffer failed.\n%s",
if (LastError == DDERR_OUTOFMEMORY || LastError == DDERR_OUTOFVIDEOMEMORY) {
D3DAppISetErrorString("There was not enough video memory to create the rendering surface.\nTo run this program in a window of this size, please adjust your display settings for a smaller desktop area or a lower palette size and restart the program.");
} else {
D3DAppISetErrorString("CreateSurface for window back buffer failed.\n%s",
D3DAppErrorToString(LastError));
}
goto exit_with_error;
}
/*
* Check to see if the back buffer is in video memory (FYI).
if (LastError == DDERR_OUTOFMEMORY || LastError == DDERR_OUTOFVIDEOMEMORY) {
if (d3dappi.bFullscreen) {
D3DAppISetErrorString("There was not enough video memory to create the Z-buffer surface.\nPlease restart the program and try another fullscreen mode with less resolution or lower bit depth.");
} else {
D3DAppISetErrorString("There was not enough video memory to create the Z-buffer surface.\nTo run this program in a window of this size, please adjust your display settings for a smaller desktop area or a lower palette size and restart the program.");
}
} else {
D3DAppISetErrorString("CreateSurface for Z-buffer failed.\n%s",
D3DAppErrorToString(LastError));
}
goto exit_with_error;
}
/*
* Attach the Z-buffer to the back buffer so D3D will find it