97 lines
2.2 KiB
C++
97 lines
2.2 KiB
C++
/*
|
|
* Copyright (C) 2023 The Android Open Source Project
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
/**********************************************************************************************
|
|
* Generated by bluegl/bluegl-gen.py
|
|
* DO NOT EDIT
|
|
**********************************************************************************************/
|
|
|
|
#ifndef TNT_FILAMENT_BLUEGL__H
|
|
#define TNT_FILAMENT_BLUEGL__H
|
|
|
|
|
|
// MSVC includes .../Windows Kits\10\Include\10.0.17763.0\um\GL/gl.h, with gl APIs conflicting with
|
|
// bluegl\include\GL/glcorearb.h, causing errors for OpenGL APIs such as:
|
|
// error C2375: 'glBindTexture': redefinition; different linkage
|
|
#ifndef FILAMENT_PLATFORM_WGL
|
|
#define GL_GLEXT_PROTOTYPES 1
|
|
#endif
|
|
|
|
|
|
#include <GL/glcorearb.h>
|
|
#include <GL/glext.h>
|
|
|
|
#if defined(WIN32)
|
|
|
|
#ifdef max
|
|
#undef max
|
|
#endif
|
|
|
|
#ifdef min
|
|
#undef min
|
|
#endif
|
|
|
|
#ifdef far
|
|
#undef far
|
|
#endif
|
|
|
|
#ifdef near
|
|
#undef near
|
|
#endif
|
|
|
|
#ifdef ERROR
|
|
#undef ERROR
|
|
#endif
|
|
|
|
#ifdef OPAQUE
|
|
#undef OPAQUE
|
|
#endif
|
|
|
|
#ifdef TRANSPARENT
|
|
#undef TRANSPARENT
|
|
#endif
|
|
|
|
#ifdef PURE
|
|
#undef PURE
|
|
#endif
|
|
|
|
#endif
|
|
|
|
namespace bluegl {
|
|
|
|
/**
|
|
* Looks up and binds all available OpenGL Core functions.
|
|
* Every call to this function will increase an internal reference
|
|
* counter that can be decreased by calling unbind().
|
|
*
|
|
* @return 0 on success or -1 if an error occurred.
|
|
*/
|
|
int bind();
|
|
|
|
/**
|
|
* Unbinds all available OpenGL Core functions.
|
|
* Every call to this function will decrease an internal reference
|
|
* counter and unbind all OpenGL functions when the counter reaches 0.
|
|
* As such you should assume that no OpenGL calls can be made after
|
|
* calling this function.
|
|
*/
|
|
void unbind();
|
|
|
|
|
|
} // namespace bluegl
|
|
|
|
#endif // TNT_FILAMENT_BLUEGL__H
|