VTK  9.1.0
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.
41int HandleOpenGL32Issues(const char* pathToTestOpenGLExecutable, const char* mesaLibPath)
42{
43 // run the test executable and collect the result
44 int result = system(pathToTestOpenGLExecutable);
45
46 // if the default works then just return
47 if (result == 0)
48 {
49 return 1;
50 }
51
52 // otherwise set the dll path so that mesa willbe loaded
53 SetDllDirectory(mesaLibPath);
54
55 return 1;
56}
57
58// 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...