JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::OpenGLHelpers Class Reference

A set of miscellaneous openGL helper functions. More...

#include <juce_OpenGLHelpers.h>

Static Public Member Functions

static void clear (Colour colour)
 Clears the current context using the given colour. More...
 
static void enableScissorTest (Rectangle< int > clip)
 
static void * getExtensionFunction (const char *functionName)
 Returns the address of a named GL extension function. More...
 
static String getGLSLVersionString ()
 Returns a version string such as "#version 150" suitable for prefixing a GLSL shader on this platform. More...
 
static bool isContextActive ()
 Returns true if the current thread has an active OpenGL context. More...
 
static bool isExtensionSupported (const char *extensionName)
 Checks whether the current context supports the specified extension. More...
 
static void resetErrorState ()
 Clears the GL error state. More...
 
static String translateFragmentShaderToV3 (const String &)
 Makes some simple textual changes to a shader program to try to convert old GLSL keywords to their v3 equivalents. More...
 
static String translateVertexShaderToV3 (const String &)
 Makes some simple textual changes to a shader program to try to convert old GLSL keywords to their v3 equivalents. More...
 

Detailed Description

A set of miscellaneous openGL helper functions.

@tags{OpenGL}

Member Function Documentation

◆ clear()

static void juce::OpenGLHelpers::clear ( Colour  colour)
static

Clears the current context using the given colour.

◆ enableScissorTest()

static void juce::OpenGLHelpers::enableScissorTest ( Rectangle< int clip)
static

◆ getExtensionFunction()

static void* juce::OpenGLHelpers::getExtensionFunction ( const char *  functionName)
static

Returns the address of a named GL extension function.

Referenced by juce::OpenGLContext::NativeContext::setSwapInterval().

◆ getGLSLVersionString()

static String juce::OpenGLHelpers::getGLSLVersionString ( )
static

Returns a version string such as "#version 150" suitable for prefixing a GLSL shader on this platform.

◆ isContextActive()

bool juce::OpenGLHelpers::isContextActive ( )
static

Returns true if the current thread has an active OpenGL context.

◆ isExtensionSupported()

static bool juce::OpenGLHelpers::isExtensionSupported ( const char *  extensionName)
static

Checks whether the current context supports the specified extension.

Referenced by juce::OpenGLContext::NativeContext::wglChoosePixelFormatExtension().

◆ resetErrorState()

static void juce::OpenGLHelpers::resetErrorState ( )
static

Clears the GL error state.

◆ translateFragmentShaderToV3()

static String juce::OpenGLHelpers::translateFragmentShaderToV3 ( const String )
static

Makes some simple textual changes to a shader program to try to convert old GLSL keywords to their v3 equivalents.

Before doing this, the function will check whether the current context is actually using a later version of the language, and if not it will not make any changes. Obviously this is not a real parser, so will only work on simple code!

◆ translateVertexShaderToV3()

static String juce::OpenGLHelpers::translateVertexShaderToV3 ( const String )
static

Makes some simple textual changes to a shader program to try to convert old GLSL keywords to their v3 equivalents.

Before doing this, the function will check whether the current context is actually using a later version of the language, and if not it will not make any changes. Obviously this is not a real parser, so will only work on simple code!


The documentation for this class was generated from the following files: