VTK  9.3.20240328
vtkTestOpenGLVersion.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
26 #include "vtkABINamespace.h"
27 
28 #include <windows.h>
29 
30 // returns an int, zero indicates a problem though right now
31 // all paths return 1.
32 VTK_ABI_NAMESPACE_BEGIN
33 int HandleOpenGL32Issues(const char* pathToTestOpenGLExecutable, const char* mesaLibPath)
34 {
35  // run the test executable and collect the result
36  int result = system(pathToTestOpenGLExecutable);
37 
38  // if the default works then just return
39  if (result == 0)
40  {
41  return 1;
42  }
43 
44  // otherwise set the dll path so that mesa willbe loaded
45  SetDllDirectory(mesaLibPath);
46 
47  return 1;
48 }
49 
50 // VTK-HeaderTest-Exclude: vtkTestOpenGLVersion.h
51 VTK_ABI_NAMESPACE_END
int HandleOpenGL32Issues(const char *pathToTestOpenGLExecutable, const char *mesaLibPath)
This header file is designed to be included into your program to support delayed loading of opengl an...