Spaces:
Runtime error
Runtime error
| // Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. | |
| // | |
| // NVIDIA CORPORATION and its licensors retain all intellectual property | |
| // and proprietary rights in and to this software, related documentation | |
| // and any modifications thereto. Any use, reproduction, disclosure or | |
| // distribution of this software and related documentation without an express | |
| // license agreement from NVIDIA CORPORATION is strictly prohibited. | |
| //------------------------------------------------------------------------ | |
| // Windows-specific headers and types. | |
| //------------------------------------------------------------------------ | |
| struct GLContext | |
| { | |
| HDC hdc; | |
| HGLRC hglrc; | |
| int extInitialized; | |
| }; | |
| //------------------------------------------------------------------------ | |
| // Linux-specific headers and types. | |
| //------------------------------------------------------------------------ | |
| struct GLContext | |
| { | |
| EGLDisplay display; | |
| EGLContext context; | |
| int extInitialized; | |
| }; | |
| //------------------------------------------------------------------------ | |
| // OpenGL, CUDA interop, GL extensions. | |
| //------------------------------------------------------------------------ | |
| // Constants. | |
| // Declare function pointers to OpenGL extension functions. | |
| //------------------------------------------------------------------------ | |
| // Common functions. | |
| //------------------------------------------------------------------------ | |
| void setGLContext (GLContext& glctx); | |
| void releaseGLContext (void); | |
| GLContext createGLContext (int cudaDeviceIdx); | |
| void destroyGLContext (GLContext& glctx); | |
| const char* getGLErrorString (GLenum err); | |
| //------------------------------------------------------------------------ | |