15c6c1daeSBarry Smith 25c6c1daeSBarry Smith /* 35c6c1daeSBarry Smith Provides the calling sequences for all the basic PetscDraw routines. 45c6c1daeSBarry Smith */ 5af0996ceSBarry Smith #include <petsc/private/drawimpl.h> /*I "petscdraw.h" I*/ 65c6c1daeSBarry Smith 7*2b8d69caSLisandro Dalcin PETSC_EXTERN PetscErrorCode PetscDrawCreate_Image(PetscDraw); 88cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_TikZ(PetscDraw); 95c6c1daeSBarry Smith #if defined(PETSC_HAVE_X) 108cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_X(PetscDraw); 115c6c1daeSBarry Smith #endif 125c6c1daeSBarry Smith #if defined(PETSC_HAVE_GLUT) 138cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_GLUT(PetscDraw); 145c6c1daeSBarry Smith #endif 155c6c1daeSBarry Smith #if defined(PETSC_HAVE_OPENGLES) 168cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_OpenGLES(PetscDraw); 175c6c1daeSBarry Smith #endif 188cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_Null(PetscDraw); 195c6c1daeSBarry Smith #if defined(PETSC_USE_WINDOWS_GRAPHICS) 208cc058d9SJed Brown PETSC_EXTERN PetscErrorCode PetscDrawCreate_Win32(PetscDraw); 215c6c1daeSBarry Smith #endif 225c6c1daeSBarry Smith 23e118a51fSLisandro Dalcin PetscBool PetscDrawRegisterAllCalled = PETSC_FALSE; 240f51fdf8SToby Isaac 255c6c1daeSBarry Smith #undef __FUNCT__ 265c6c1daeSBarry Smith #define __FUNCT__ "PetscDrawRegisterAll" 275c6c1daeSBarry Smith /*@C 285c6c1daeSBarry Smith PetscDrawRegisterAll - Registers all of the graphics methods in the PetscDraw package. 295c6c1daeSBarry Smith 305c6c1daeSBarry Smith Not Collective 315c6c1daeSBarry Smith 325c6c1daeSBarry Smith Level: developer 335c6c1daeSBarry Smith 345c6c1daeSBarry Smith .seealso: PetscDrawRegisterDestroy() 355c6c1daeSBarry Smith @*/ 36607a6623SBarry Smith PetscErrorCode PetscDrawRegisterAll(void) 375c6c1daeSBarry Smith { 385c6c1daeSBarry Smith PetscErrorCode ierr; 395c6c1daeSBarry Smith 405c6c1daeSBarry Smith PetscFunctionBegin; 410f51fdf8SToby Isaac if (PetscDrawRegisterAllCalled) PetscFunctionReturn(0); 420f51fdf8SToby Isaac PetscDrawRegisterAllCalled = PETSC_TRUE; 430f51fdf8SToby Isaac 44*2b8d69caSLisandro Dalcin ierr = PetscDrawRegister(PETSC_DRAW_IMAGE, PetscDrawCreate_Image);CHKERRQ(ierr); 45bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_TIKZ, PetscDrawCreate_TikZ);CHKERRQ(ierr); 465c6c1daeSBarry Smith #if defined(PETSC_HAVE_OPENGLES) 47bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_OPENGLES, PetscDrawCreate_OpenGLES);CHKERRQ(ierr); 485c6c1daeSBarry Smith #endif 495c6c1daeSBarry Smith #if defined(PETSC_HAVE_GLUT) 50bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_GLUT, PetscDrawCreate_GLUT);CHKERRQ(ierr); 515c6c1daeSBarry Smith #endif 525c6c1daeSBarry Smith #if defined(PETSC_HAVE_X) 53bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_X, PetscDrawCreate_X);CHKERRQ(ierr); 545c6c1daeSBarry Smith #elif defined(PETSC_USE_WINDOWS_GRAPHICS) 55bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_WIN32, PetscDrawCreate_Win32);CHKERRQ(ierr); 565c6c1daeSBarry Smith #endif 57bdf89e91SBarry Smith ierr = PetscDrawRegister(PETSC_DRAW_NULL, PetscDrawCreate_Null);CHKERRQ(ierr); 585c6c1daeSBarry Smith PetscFunctionReturn(0); 595c6c1daeSBarry Smith } 605c6c1daeSBarry Smith 61