VTK
vtkTestOpenGLVersion.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4 
5  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
37 #include <windows.h>
38 
39 // returns an int, zero indicates a problem though right now
40 // all paths return 1.
42  const char *pathToTestOpenGLExecutable,
43  const char *mesaLibPath
44  )
45 {
46  // run the test executable and collect the result
47  int result = system(pathToTestOpenGLExecutable);
48 
49  // if the default works then just return
50  if (result == 0)
51  {
52  return 1;
53  }
54 
55  // otherwise set the dll path so that mesa willbe loaded
56  SetDllDirectory(mesaLibPath);
57 
58  return 1;
59 }
60 
61 // VTK-HeaderTest-Exclude: vtkTestOpenGLVersion.h
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...