GL Studio C++ Runtime API
gls_include.h File Reference

A file for all GL Studio files to include. More...

Go to the source code of this file.

Macros

#define GLS_EXPORT
 Macro denoting which functions should be visible from the runtime library.
 
#define GLS_EDITOR
 Macro denoting which functions should be visible from the editor.
 
#define GLS_EXPORT_PACKAGE
 Macro denoting which functions should be visible from packages.
 
#define IF_WIN32(win32)
 Macro to wrap code that should be present on Windows only.
 
#define IF_WIN32_ELSE(win32, notWin32)   ( notWin32 )
 Macro to wrap code specific to Windows, and an alternate implementation for other platforms.
 
#define IF_NOT_WIN32(notWin32)   ( notWin32 )
 Macro to wrap code that should be present on all platforms except Windows.
 
#define IF_APPLE(apple)
 Macro to wrap code that should be present on macOS only.
 
#define IF_APPLE_ELSE(apple, notApple)   ( notApple )
 Macro to wrap code specific to macOS, and an alternate implementation for other platforms.
 
#define IF_NOT_APPLE(notApple)   ( notApple )
 Macro to wrap code that should be present on all platforms except macOS.
 
#define IF_LINUX(linux)
 Macro to wrap code that should be present on Linux only.
 
#define IF_LINUX_ELSE(linux, notLinux)   ( notLinux )
 Macro to wrap code specific to Linux, and an alternate implementation for other platforms.
 
#define IF_NOT_LINUX(notLinux)   ( notLinux )
 Macro to wrap code that should be present on all platforms except Linux.
 
#define IF_GLES(esCode)
 
#define IF_NOT_GLES(nonEsCode)   ( nonEsCode )
 
#define IF_GLES_ELSE(esCode, nonEsCode)   ( nonEsCode )
 
#define IF_GLES_ELSE_TYPE(esType, nonEsType)   nonEsType
 
#define IF_DEBUG(notRelease)   ( notRelease )
 Macro to wrap code that should only be present in Debug builds.
 
#define IF_RELEASE(release)
 Macro to wrap code that should only be present in Release builds.
 
#define IF_RELEASE_ELSE(release, notRelease)   ( notRelease )
 Macro to wrap code specific to Release builds, with alternative code for Debug.
 
#define DISTI_IS_BITNESS(X)   DISTI_IS_BITNESS_PRIVATE_DEFINITION_##X()
 Macro for checking bitness (safer macros borrowed from https://www.fluentcpp.com/2019/05/28/better-macros-better-flags/)
 

Detailed Description

A file for all GL Studio files to include.

Copyright Information

Copyright (c) 2017 by The DiSTI Corporation.
11301 Corporate Blvd; Suite 100
Orlando, Florida 32817
USA

All rights reserved.

This Software contains proprietary trade secrets of DiSTI and may not be reproduced, in whole or part, in any form, or by any means of electronic, mechanical, or otherwise, without the written permission of DiSTI. Said permission may be derived through the purchase of applicable DiSTI product licenses which detail the distribution rights of this content and any Derivative Works based on this or other copyrighted DiSTI Software.

NO WARRANTY. THE SOFTWARE IS PROVIDED "AS-IS," WITHOUT WARRANTY OF ANY KIND, AND ANY USE OF THIS SOFTWARE PRODUCT IS AT YOUR OWN RISK. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, DISTI AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES AND CONDITIONS, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND NON-INFRINGEMENT, WITH REGARD TO THE SOFTWARE.

LIMITATION OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL DISTI OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF DISTI HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. DISTI'S ENTIRE LIABILITY AND YOUR EXCLUSIVE REMEDY SHALL NOT EXCEED FIVE DOLLARS (US$5.00).

The aforementioned terms and restrictions are governed by the laws of the State of Florida and the United States of America.

Macro Definition Documentation

◆ IF_GLES

#define IF_GLES (   esCode)

Macro to wrap code that should only be present in ES.

IF_GLES( SetShader() ); // Calls this function on OpenGL ES only.
#define IF_GLES(esCode)
Definition: gls_include.h:151

◆ IF_GLES_ELSE

#define IF_GLES_ELSE (   esCode,
  nonEsCode 
)    ( nonEsCode )

Macro to wrap code specific to ES, and an alternate implementation for Desktop.

auto fov = IF_GLES_ELSE( esBufferFOV, desktopFOV ); // Selects an expression to be assigned to the variable fov.
#define IF_GLES_ELSE(esCode, nonEsCode)
Definition: gls_include.h:171

◆ IF_GLES_ELSE_TYPE

#define IF_GLES_ELSE_TYPE (   esType,
  nonEsType 
)    nonEsType

Macro to wrap a parameter type specific to ES, and an alternate type for Desktop. This is like IF_GLES_ELSE, but does not add parenthesis.

void MyFunc( IF_GLES_ELSE_TYPE( float, double ) ); // Selects the function parameter's type.
#define IF_GLES_ELSE_TYPE(esType, nonEsType)
Definition: gls_include.h:182

◆ IF_NOT_GLES

#define IF_NOT_GLES (   nonEsCode)    ( nonEsCode )

Macro to wrap code that should not be present in ES (Desktop).

IF_NOT_GLES( DesktopFileChanged() ); // Calls this function on Desktop OpenGL only.
#define IF_NOT_GLES(nonEsCode)
Definition: gls_include.h:161