Loading...
Searching...
No Matches
juce::OpenGLHelpers Class Reference

## Detailed Description

A set of miscellaneous openGL helper functions.

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

- juce_opengl/opengl/juce_OpenGLHelpers.h

## Static Public Member Functions

static void | resetErrorState ()
| Clears the GL error state.
static bool | isContextActive ()
| Returns true if the current thread has an active OpenGL context.
static void | clear (Colour colour)
| Clears the current context using the given colour.
static void | enableScissorTest (Rectangle< int > clip)
static bool | isExtensionSupported (const char *extensionName)
| Checks whether the current context supports the specified extension.
static void * | getExtensionFunction (const char *functionName)
| Returns the address of a named GL extension function.
static String | getGLSLVersionString ()
| Returns a version string such as "#version 150" suitable for prefixing a GLSL shader on this platform.
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.
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.

## Member Functions

## resetErrorState()

void juce::OpenGLHelpers::resetErrorState | ( |  | ) |

static

Clears the GL error state.

## isContextActive()

bool juce::OpenGLHelpers::isContextActive | ( |  | ) |

static

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

## clear()

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

static

Clears the current context using the given colour.

## enableScissorTest()

void juce::OpenGLHelpers::enableScissorTest | ( | Rectangle< int > | clip | ) |

static

## isExtensionSupported()

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

static

Checks whether the current context supports the specified extension.

## getExtensionFunction()

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

static

Returns the address of a named GL extension function.

## getGLSLVersionString()

String juce::OpenGLHelpers::getGLSLVersionString | ( |  | ) |

static

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

## translateVertexShaderToV3()

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!

## translateFragmentShaderToV3()

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!

### Purchase

Get JUCE

### Discover

What's New in JUCE Features

### Learn

Documentaion Tutorials Made with JUCE Resources

### Support

JUCE Forum Newsletter Archive

### About

Contact Us JUCE Legal JUCE Licensing FAQ

### Events

Audio Developer Conference
© Raw Material Software Limited