2: /* 3: Provides the calling sequences for all the basic PetscDraw routines. 4: */ 5: #include <petsc/private/drawimpl.h> 7: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Image(PetscDraw); 8: PETSC_EXTERN PetscErrorCode PetscDrawCreate_TikZ(PetscDraw); 9: #if defined(PETSC_HAVE_X) 10: PETSC_EXTERN PetscErrorCode PetscDrawCreate_X(PetscDraw); 11: #endif 12: #if defined(PETSC_HAVE_GLUT) 13: PETSC_EXTERN PetscErrorCode PetscDrawCreate_GLUT(PetscDraw); 14: #endif 15: #if defined(PETSC_HAVE_OPENGLES) 16: PETSC_EXTERN PetscErrorCode PetscDrawCreate_OpenGLES(PetscDraw); 17: #endif 18: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw); 19: #if defined(PETSC_USE_WINDOWS_GRAPHICS) 20: PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw); 21: #endif 23: PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE; 25: /*@C 26: PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package. 28: Not Collective 30: Level: developer 32: .seealso: PetscDrawRegisterDestroy() 33: @*/ 34: PetscErrorCode PetscDrawRegisterAll(void) 35: { 39: if (PetscDrawRegisterAllCalled) return(0); 40: PetscDrawRegisterAllCalled = PETSC_TRUE; 42: PetscDrawRegister(PETSC_DRAW_IMAGE, PetscDrawCreate_Image); 43: PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ); 44: #if defined(PETSC_HAVE_OPENGLES) 45: PetscDrawRegister(PETSC_DRAW_OPENGLES, PetscDrawCreate_OpenGLES); 46: #endif 47: #if defined(PETSC_HAVE_GLUT) 48: PetscDrawRegister(PETSC_DRAW_GLUT, PetscDrawCreate_GLUT); 49: #endif 50: #if defined(PETSC_HAVE_X) 51: PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X); 52: #elif defined(PETSC_USE_WINDOWS_GRAPHICS) 53: PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32); 54: #endif 55: PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null); 56: return(0); 57: }