JUCE v8.0.9
JUCE API
 
Loading...
Searching...
No Matches
juce::OpenGLContext::NativeContext Class Reference

#include <juce_OpenGL_windows.h>

Inheritance diagram for juce::OpenGLContext::NativeContext:
Collaboration diagram for juce::OpenGLContext::NativeContext:

Classes

struct  ContextDestructor
 
struct  DeviceContextDeleter
 
struct  DummyComponent
 
struct  Locker
 
class  MinSwapTimeMs
 
struct  MouseForwardingNSOpenGLViewClass
 
struct  NativeWindowReleaser
 
struct  PlaceholderComponent
 
struct  RenderContextDeleter
 
class  ScopedGLXObject
 
struct  SurfaceDestructor
 
struct  TraitsGLXContext
 
struct  TraitsGLXWindow
 

Public Member Functions

 NativeContext (Component &c, const OpenGLPixelFormat &pixFormat, void *contextToShare, bool multisampling, OpenGLVersion version)
 
 NativeContext (Component &comp, const OpenGLPixelFormat &cPixelFormat, void *shareContext, bool useMultisamplingIn, OpenGLVersion)
 
 NativeContext (Component &comp, const OpenGLPixelFormat &pixelFormat, void *, bool useMultisamplingIn, OpenGLVersion)
 
 NativeContext (Component &component, const OpenGLPixelFormat &pixelFormat, void *contextToShareWithIn, bool, OpenGLVersion version)
 
 NativeContext (Component &component, const OpenGLPixelFormat &pixFormat, void *contextToShare, bool shouldUseMultisampling, OpenGLVersion version)
 
 ~NativeContext ()
 
 ~NativeContext ()
 
 ~NativeContext ()
 
 ~NativeContext () override
 
 ~NativeContext () override
 
void addListener (NativeContextListener &)
 
void addListener (NativeContextListener &)
 
void addListener (NativeContextListener &)
 
void addListener (NativeContextListener &)
 
void addListener (NativeContextListener &l)
 
bool createdOk () const noexcept
 
bool createdOk () const noexcept
 
bool createdOk () const noexcept
 
bool createdOk () const noexcept
 
bool createdOk () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
unsigned int getFrameBufferID () const noexcept
 
HWND getNativeHandle ()
 
NSOpenGLView * getNSView () const noexcept
 
void * getRawContext () const noexcept
 
void * getRawContext () const noexcept
 
void * getRawContext () const noexcept
 
NSOpenGLContext * getRawContext () const noexcept
 
void * getRawContext () const noexcept
 
int getSwapInterval () const
 
int getSwapInterval () const
 
int getSwapInterval () const
 
int getSwapInterval () const
 
int getSwapInterval () const noexcept
 
InitResult initialiseOnRenderThread (OpenGLContext &)
 
InitResult initialiseOnRenderThread (OpenGLContext &)
 
InitResult initialiseOnRenderThread (OpenGLContext &c)
 
InitResult initialiseOnRenderThread (OpenGLContext &c)
 
InitResult initialiseOnRenderThread (OpenGLContext &ctx)
 
bool isActive () const noexcept
 
bool isActive () const noexcept
 
bool isActive () const noexcept
 
bool isActive () const noexcept
 
bool isActive () const noexcept
 
bool makeActive () const noexcept
 
bool makeActive () const noexcept
 
bool makeActive () const noexcept
 
bool makeActive () const noexcept
 
bool makeActive () const noexcept
 
void notifyDidResume ()
 
void notifyWillPause ()
 
void removeListener (NativeContextListener &)
 
void removeListener (NativeContextListener &)
 
void removeListener (NativeContextListener &)
 
void removeListener (NativeContextListener &)
 
void removeListener (NativeContextListener &l)
 
void setNominalVideoRefreshPeriodS (double periodS)
 
bool setSwapInterval (int numFramesPerSwap)
 
bool setSwapInterval (int numFramesPerSwap)
 
bool setSwapInterval (int numFramesPerSwap) noexcept
 
bool setSwapInterval (int numFramesPerSwapIn)
 
bool setSwapInterval (int)
 
void shutdownOnRenderThread ()
 
void shutdownOnRenderThread ()
 
void shutdownOnRenderThread ()
 
void shutdownOnRenderThread ()
 
void shutdownOnRenderThread ()
 
void surfaceChanged (LocalRef< jobject > holder, int format, int width, int height) override
 
void surfaceCreated (LocalRef< jobject >) override
 
void surfaceDestroyed (LocalRef< jobject >) override
 
void swapBuffers ()
 
void swapBuffers ()
 
void swapBuffers ()
 
void swapBuffers () const noexcept
 
void swapBuffers () noexcept
 
void triggerRepaint ()
 
void triggerRepaint ()
 
void updateWindowPosition (Rectangle< int > bounds)
 
void updateWindowPosition (Rectangle< int > bounds)
 
void updateWindowPosition (Rectangle< int > bounds)
 
void updateWindowPosition (Rectangle< int > newBounds)
 
void updateWindowPosition (Rectangle< int >)
 

Static Public Member Functions

static std::vector< NSOpenGLPixelFormatAttribute > createAttribs (OpenGLVersion version, const OpenGLPixelFormat &pixFormat, bool shouldUseMultisampling)
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static NSOpenGLContextParameter getSwapIntervalParameter ()
 

Public Attributes

Componentcomponent
 
double lastSwapTime = 0
 
MinSwapTimeMs minSwapTimeMs
 
Componentowner
 
NSOpenGLContext * renderContext = nil
 
int underrunCounter = 0
 
NSOpenGLView * view = nil
 
ReferenceCountedObjectPtr< ReferenceCountedObjectviewAttachment
 

Private Types

using PtrGLXContext = ScopedGLXObject< TraitsGLXContext >
 
using PtrGLXWindow = ScopedGLXObject< TraitsGLXWindow >
 

Private Member Functions

void cancelPendingUpdate () noexcept
 This will stop any pending updates from happening.
 
void clear ()
 
bool createContext (EAGLRenderingAPI type, void *contextToShare)
 
void createGLBuffers ()
 
void createNativeWindow (Component &component)
 
void freeGLBuffers ()
 
void handleAsyncUpdate () override
 Called back to do whatever your class needs to do.
 
void handleUpdateNowIfNeeded ()
 If an update has been triggered and is pending, this will invoke it synchronously.
 
bool initEGLDisplay (const OpenGLPixelFormat &pixelFormat, bool multisample)
 
jobject invoke (jobject proxy, jobject method, jobjectArray args) override
 
bool isUpdatePending () const noexcept
 Returns true if there's an update callback in the pipeline.
 
void nativeScaleFactorChanged (double newScaleFactor) override
 Called when the scale factor changes.
 
void triggerAsyncUpdate ()
 Causes the callback to be triggered at a later time.
 
bool tryChooseConfig (const std::vector< EGLint > &optionalAttribs)
 
bool tryChooseVisual (const OpenGLPixelFormat &format, const std::vector< GLint > &optionalAttribs)
 
int wglChoosePixelFormatExtension (const OpenGLPixelFormat &pixelFormat) const
 

Static Private Member Functions

static HGLRC createRenderContext (OpenGLVersion version, HDC dcIn)
 
static void deleteFrameBuffer (GLuint &i)
 
static void deleteRenderBuffer (GLuint &i)
 
static void dispatchDraw (JNIEnv *, NativeContext &t, jobject)
 
static std::unique_ptr< ANativeWindow, NativeWindowReleasergetNativeWindowFromSurfaceHolder (jobject holder)
 
static void initialisePixelFormatDescriptor (PIXELFORMATDESCRIPTOR &pfd, const OpenGLPixelFormat &pixelFormat)
 
static void initialiseWGLExtensions (HDC dcIn)
 

Private Attributes

ReferenceCountedObjectPtr< AsyncUpdaterMessage > activeMessage
 
std::unique_ptr< GLXFBConfig, XFreeDeleterbestConfig
 
Rectangle< int > bounds
 
GLuint colorBufferHandle = 0
 
std::unique_ptr< std::remove_pointer_t< EGLContext >, ContextDestructorcontext { EGL_NO_CONTEXT }
 
NSUniquePtr< EAGLContext > context
 
OpenGLContextcontext = nullptr
 
void * contextToShareWith
 
std::unique_ptr< std::remove_pointer_t< HDC >, DeviceContextDeleterdc
 
GLuint depthBufferHandle = 0
 
::Display * display = nullptr
 
DummyComponent dummy
 
Window embeddedWindow = {}
 
GLuint frameBufferHandle = 0
 
CAEAGLLayer * glLayer = nil
 
PtrGLXWindow glxWindow
 
bool hasInitialised = false
 
bool haveBuffersBeenSwapped = false
 
GlobalRef invocationHandler
 
GlobalRef javaSubClass
 
OpenGLContextjuceContext = nullptr
 
Rectangle< int > lastBounds
 
ListenerList< NativeContextListener > listeners
 
GLuint msaaBufferHandle = 0
 
GLuint msaaColorHandle = 0
 
CriticalSection mutex
 
std::mutex nativeHandleMutex
 
double nativeScaleFactor = 1.0
 
std::unique_ptr< ComponentPeernativeWindow
 
bool needToRebuildBuffers = false
 
const OpenGLVersion openGLversion
 
std::optional< PeerListenerpeerListener
 
Rectangle< int > physicalBounds
 
std::unique_ptr< PlaceholderComponentplaceholderComponent
 
PtrGLXContext renderContext
 
std::unique_ptr< std::remove_pointer_t< HGLRC >, RenderContextDeleterrenderContext
 
Component::SafePointer< ComponentsafeComponent
 
void * sharedContext = nullptr
 
std::unique_ptr< std::remove_pointer_t< EGLSurface >, SurfaceDestructorsurface { EGL_NO_SURFACE }
 
GlobalRef surfaceHolderCallback
 
GlobalRef surfaceView
 
int swapFrames = 0
 
std::unique_ptr< ScopedThreadDPIAwarenessSetterthreadAwarenessSetter
 
const bool useDepthBuffer
 
const bool useMSAA
 
JuceGLViewview = nil
 

Static Private Attributes

static EGLConfig config
 
static EGLDisplay display = EGL_NO_DISPLAY
 
static constexpr int embeddedWindowEventMask = ExposureMask | StructureNotifyMask
 

Member Typedef Documentation

◆ PtrGLXContext

◆ PtrGLXWindow

Constructor & Destructor Documentation

◆ NativeContext() [1/5]

◆ ~NativeContext() [1/5]

juce::OpenGLContext::NativeContext::~NativeContext ( )
inlineoverride

◆ NativeContext() [2/5]

juce::OpenGLContext::NativeContext::NativeContext ( Component c,
const OpenGLPixelFormat pixFormat,
void *  contextToShare,
bool  multisampling,
OpenGLVersion  version 
)
inline

◆ ~NativeContext() [2/5]

juce::OpenGLContext::NativeContext::~NativeContext ( )
inline

References view.

◆ NativeContext() [3/5]

◆ ~NativeContext() [3/5]

juce::OpenGLContext::NativeContext::~NativeContext ( )
inline

◆ NativeContext() [4/5]

juce::OpenGLContext::NativeContext::NativeContext ( Component component,
const OpenGLPixelFormat pixFormat,
void *  contextToShare,
bool  shouldUseMultisampling,
OpenGLVersion  version 
)
inline

◆ ~NativeContext() [4/5]

juce::OpenGLContext::NativeContext::~NativeContext ( )
inline

References renderContext, and view.

◆ NativeContext() [5/5]

◆ ~NativeContext() [5/5]

juce::OpenGLContext::NativeContext::~NativeContext ( )
inlineoverride

Member Function Documentation

◆ addListener() [1/5]

void juce::OpenGLContext::NativeContext::addListener ( NativeContextListener &  )
inline

◆ addListener() [2/5]

void juce::OpenGLContext::NativeContext::addListener ( NativeContextListener &  )
inline

◆ addListener() [3/5]

void juce::OpenGLContext::NativeContext::addListener ( NativeContextListener &  )
inline

◆ addListener() [4/5]

void juce::OpenGLContext::NativeContext::addListener ( NativeContextListener &  )
inline

◆ addListener() [5/5]

void juce::OpenGLContext::NativeContext::addListener ( NativeContextListener &  l)
inline

◆ cancelPendingUpdate()

void juce::AsyncUpdater::cancelPendingUpdate ( )
noexceptinherited

This will stop any pending updates from happening.

If called after triggerAsyncUpdate() and before the handleAsyncUpdate() callback happens, this will cancel the handleAsyncUpdate() callback.

Note that this method simply cancels the next callback - if a callback is already in progress on a different thread, this won't block until the callback finishes, so there's no guarantee that the callback isn't still running when the method returns.

Referenced by juce::detail::ConcreteScopedContentSharerImpl::~ConcreteScopedContentSharerImpl(), juce::detail::ConcreteScopedMessageBoxImpl::~ConcreteScopedMessageBoxImpl(), ~NativeContext(), juce::detail::ConcreteScopedContentSharerImpl::close(), juce::detail::ConcreteScopedMessageBoxImpl::close(), and juce::detail::MouseInputSourceImpl::setPointerState().

◆ clear()

void juce::AndroidInterfaceImplementer::clear ( )
protectedinherited

◆ createAttribs()

◆ createContext()

bool juce::OpenGLContext::NativeContext::createContext ( EAGLRenderingAPI  type,
void *  contextToShare 
)
inlineprivate

References jassert.

◆ createdOk() [1/5]

bool juce::OpenGLContext::NativeContext::createdOk ( ) const
inlinenoexcept

References hasInitialised.

◆ createdOk() [2/5]

bool juce::OpenGLContext::NativeContext::createdOk ( ) const
inlinenoexcept

◆ createdOk() [3/5]

bool juce::OpenGLContext::NativeContext::createdOk ( ) const
inlinenoexcept

◆ createdOk() [4/5]

bool juce::OpenGLContext::NativeContext::createdOk ( ) const
inlinenoexcept

References getRawContext().

◆ createdOk() [5/5]

bool juce::OpenGLContext::NativeContext::createdOk ( ) const
inlinenoexcept

References getRawContext().

◆ createGLBuffers()

void juce::OpenGLContext::NativeContext::createGLBuffers ( )
inlineprivate

References jassert.

◆ createNativeWindow()

◆ createRenderContext()

static HGLRC juce::OpenGLContext::NativeContext::createRenderContext ( OpenGLVersion  version,
HDC  dcIn 
)
inlinestaticprivate

◆ deactivateCurrentContext() [1/5]

static void juce::OpenGLContext::NativeContext::deactivateCurrentContext ( )
inlinestatic

References display.

Referenced by NativeContext(), and shutdownOnRenderThread().

◆ deactivateCurrentContext() [2/5]

static void juce::OpenGLContext::NativeContext::deactivateCurrentContext ( )
inlinestatic

◆ deactivateCurrentContext() [3/5]

static void juce::OpenGLContext::NativeContext::deactivateCurrentContext ( )
inlinestatic

References display.

◆ deactivateCurrentContext() [4/5]

static void juce::OpenGLContext::NativeContext::deactivateCurrentContext ( )
inlinestatic

◆ deactivateCurrentContext() [5/5]

static void juce::OpenGLContext::NativeContext::deactivateCurrentContext ( )
inlinestatic

◆ deleteFrameBuffer()

static void juce::OpenGLContext::NativeContext::deleteFrameBuffer ( GLuint i)
inlinestaticprivate

◆ deleteRenderBuffer()

static void juce::OpenGLContext::NativeContext::deleteRenderBuffer ( GLuint i)
inlinestaticprivate

◆ dispatchDraw()

static void juce::OpenGLContext::NativeContext::dispatchDraw ( JNIEnv *  ,
NativeContext t,
jobject   
)
inlinestaticprivate

◆ freeGLBuffers()

void juce::OpenGLContext::NativeContext::freeGLBuffers ( )
inlineprivate

◆ getFrameBufferID() [1/5]

GLuint juce::OpenGLContext::NativeContext::getFrameBufferID ( ) const
inlinenoexcept

◆ getFrameBufferID() [2/5]

GLuint juce::OpenGLContext::NativeContext::getFrameBufferID ( ) const
inlinenoexcept

◆ getFrameBufferID() [3/5]

GLuint juce::OpenGLContext::NativeContext::getFrameBufferID ( ) const
inlinenoexcept

◆ getFrameBufferID() [4/5]

GLuint juce::OpenGLContext::NativeContext::getFrameBufferID ( ) const
inlinenoexcept

◆ getFrameBufferID() [5/5]

unsigned int juce::OpenGLContext::NativeContext::getFrameBufferID ( ) const
inlinenoexcept

◆ getNativeHandle()

HWND juce::OpenGLContext::NativeContext::getNativeHandle ( )
inline

References nativeWindow.

◆ getNativeWindowFromSurfaceHolder()

static std::unique_ptr< ANativeWindow, NativeWindowReleaser > juce::OpenGLContext::NativeContext::getNativeWindowFromSurfaceHolder ( jobject  holder)
inlinestaticprivate

◆ getNSView()

NSOpenGLView * juce::OpenGLContext::NativeContext::getNSView ( ) const
inlinenoexcept

References view.

◆ getRawContext() [1/5]

void * juce::OpenGLContext::NativeContext::getRawContext ( ) const
inlinenoexcept

◆ getRawContext() [2/5]

void * juce::OpenGLContext::NativeContext::getRawContext ( ) const
inlinenoexcept

◆ getRawContext() [3/5]

void * juce::OpenGLContext::NativeContext::getRawContext ( ) const
inlinenoexcept

◆ getRawContext() [4/5]

NSOpenGLContext * juce::OpenGLContext::NativeContext::getRawContext ( ) const
inlinenoexcept

References renderContext.

◆ getRawContext() [5/5]

void * juce::OpenGLContext::NativeContext::getRawContext ( ) const
inlinenoexcept

◆ getSwapInterval() [1/5]

int juce::OpenGLContext::NativeContext::getSwapInterval ( ) const
inline

◆ getSwapInterval() [2/5]

int juce::OpenGLContext::NativeContext::getSwapInterval ( ) const
inline

References swapFrames.

◆ getSwapInterval() [3/5]

int juce::OpenGLContext::NativeContext::getSwapInterval ( ) const
inline

◆ getSwapInterval() [4/5]

int juce::OpenGLContext::NativeContext::getSwapInterval ( ) const
inline

References isActive(), and jassert.

◆ getSwapInterval() [5/5]

int juce::OpenGLContext::NativeContext::getSwapInterval ( ) const
inlinenoexcept

◆ getSwapIntervalParameter()

static NSOpenGLContextParameter juce::OpenGLContext::NativeContext::getSwapIntervalParameter ( )
inlinestatic

Referenced by getSwapInterval(), and setSwapInterval().

◆ handleAsyncUpdate()

void juce::OpenGLContext::NativeContext::handleAsyncUpdate ( )
inlineoverrideprivatevirtual

Called back to do whatever your class needs to do.

This method is called by the message thread at the next convenient time after the triggerAsyncUpdate() method has been called.

Implements juce::AsyncUpdater.

References nativeWindow.

◆ handleUpdateNowIfNeeded()

void juce::AsyncUpdater::handleUpdateNowIfNeeded ( )
inherited

If an update has been triggered and is pending, this will invoke it synchronously.

Use this as a kind of "flush" operation - if an update is pending, the handleAsyncUpdate() method will be called immediately; if no update is pending, then nothing will be done.

Because this may invoke the callback, this method must only be called on the main event thread.

◆ initEGLDisplay()

bool juce::OpenGLContext::NativeContext::initEGLDisplay ( const OpenGLPixelFormat pixelFormat,
bool  multisample 
)
inlineprivate

◆ initialiseOnRenderThread() [1/5]

InitResult juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext )
inline

◆ initialiseOnRenderThread() [2/5]

InitResult juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext )
inline

◆ initialiseOnRenderThread() [3/5]

◆ initialiseOnRenderThread() [4/5]

◆ initialiseOnRenderThread() [5/5]

InitResult juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext ctx)
inline

◆ initialisePixelFormatDescriptor()

◆ initialiseWGLExtensions()

static void juce::OpenGLContext::NativeContext::initialiseWGLExtensions ( HDC  dcIn)
inlinestaticprivate

References JUCE_INIT_WGL_FUNCTION.

Referenced by NativeContext().

◆ invoke()

◆ isActive() [1/5]

bool juce::OpenGLContext::NativeContext::isActive ( ) const
inlinenoexcept

◆ isActive() [2/5]

bool juce::OpenGLContext::NativeContext::isActive ( ) const
inlinenoexcept

◆ isActive() [3/5]

bool juce::OpenGLContext::NativeContext::isActive ( ) const
inlinenoexcept

◆ isActive() [4/5]

bool juce::OpenGLContext::NativeContext::isActive ( ) const
inlinenoexcept

References renderContext.

◆ isActive() [5/5]

bool juce::OpenGLContext::NativeContext::isActive ( ) const
inlinenoexcept

◆ isUpdatePending()

bool juce::AsyncUpdater::isUpdatePending ( ) const
noexceptinherited

Returns true if there's an update callback in the pipeline.

◆ makeActive() [1/5]

bool juce::OpenGLContext::NativeContext::makeActive ( ) const
inlinenoexcept

◆ makeActive() [2/5]

bool juce::OpenGLContext::NativeContext::makeActive ( ) const
inlinenoexcept

◆ makeActive() [3/5]

bool juce::OpenGLContext::NativeContext::makeActive ( ) const
inlinenoexcept

◆ makeActive() [4/5]

bool juce::OpenGLContext::NativeContext::makeActive ( ) const
inlinenoexcept

References context, jassert, renderContext, and view.

◆ makeActive() [5/5]

bool juce::OpenGLContext::NativeContext::makeActive ( ) const
inlinenoexcept

◆ nativeScaleFactorChanged()

void juce::OpenGLContext::NativeContext::nativeScaleFactorChanged ( double  newScaleFactor)
inlineoverrideprivatevirtual

◆ notifyDidResume()

void juce::OpenGLContext::NativeContext::notifyDidResume ( )
inline

◆ notifyWillPause()

void juce::OpenGLContext::NativeContext::notifyWillPause ( )
inline

◆ removeListener() [1/5]

void juce::OpenGLContext::NativeContext::removeListener ( NativeContextListener &  )
inline

◆ removeListener() [2/5]

void juce::OpenGLContext::NativeContext::removeListener ( NativeContextListener &  )
inline

◆ removeListener() [3/5]

void juce::OpenGLContext::NativeContext::removeListener ( NativeContextListener &  )
inline

◆ removeListener() [4/5]

void juce::OpenGLContext::NativeContext::removeListener ( NativeContextListener &  )
inline

◆ removeListener() [5/5]

void juce::OpenGLContext::NativeContext::removeListener ( NativeContextListener &  l)
inline

◆ setNominalVideoRefreshPeriodS()

void juce::OpenGLContext::NativeContext::setNominalVideoRefreshPeriodS ( double  periodS)
inline

◆ setSwapInterval() [1/5]

bool juce::OpenGLContext::NativeContext::setSwapInterval ( int  numFramesPerSwap)
inline

◆ setSwapInterval() [2/5]

bool juce::OpenGLContext::NativeContext::setSwapInterval ( int  numFramesPerSwap)
inline

References isActive(), and jassert.

◆ setSwapInterval() [3/5]

bool juce::OpenGLContext::NativeContext::setSwapInterval ( int  numFramesPerSwap)
inlinenoexcept

◆ setSwapInterval() [4/5]

bool juce::OpenGLContext::NativeContext::setSwapInterval ( int  numFramesPerSwapIn)
inline

◆ setSwapInterval() [5/5]

bool juce::OpenGLContext::NativeContext::setSwapInterval ( int  )
inline

◆ shutdownOnRenderThread() [1/5]

void juce::OpenGLContext::NativeContext::shutdownOnRenderThread ( )
inline

References juceContext, and nativeHandleMutex.

◆ shutdownOnRenderThread() [2/5]

void juce::OpenGLContext::NativeContext::shutdownOnRenderThread ( )
inline

◆ shutdownOnRenderThread() [3/5]

void juce::OpenGLContext::NativeContext::shutdownOnRenderThread ( )
inline

◆ shutdownOnRenderThread() [4/5]

void juce::OpenGLContext::NativeContext::shutdownOnRenderThread ( )
inline

◆ shutdownOnRenderThread() [5/5]

void juce::OpenGLContext::NativeContext::shutdownOnRenderThread ( )
inline

◆ surfaceChanged()

void juce::OpenGLContext::NativeContext::surfaceChanged ( LocalRef< jobject holder,
int  format,
int  width,
int  height 
)
inlineoverridevirtual

◆ surfaceCreated()

void juce::OpenGLContext::NativeContext::surfaceCreated ( LocalRef< jobject )
overridevirtual

◆ surfaceDestroyed()

void juce::OpenGLContext::NativeContext::surfaceDestroyed ( LocalRef< jobject )
overridevirtual

◆ swapBuffers() [1/5]

void juce::OpenGLContext::NativeContext::swapBuffers ( )
inline

◆ swapBuffers() [2/5]

void juce::OpenGLContext::NativeContext::swapBuffers ( )
inline

◆ swapBuffers() [3/5]

◆ swapBuffers() [4/5]

void juce::OpenGLContext::NativeContext::swapBuffers ( ) const
inlinenoexcept

References display, and surface.

◆ swapBuffers() [5/5]

void juce::OpenGLContext::NativeContext::swapBuffers ( )
inlinenoexcept

◆ triggerAsyncUpdate()

void juce::AsyncUpdater::triggerAsyncUpdate ( )
inherited

Causes the callback to be triggered at a later time.

This method returns immediately, after which a callback to the handleAsyncUpdate() method will be made by the message thread as soon as possible.

If an update callback is already pending but hasn't happened yet, calling this method will have no effect.

It's thread-safe to call this method from any thread, BUT beware of calling it from a real-time (e.g. audio) thread, because it involves posting a message to the system queue, which means it may block (and in general will do on most OSes).

Referenced by juce::detail::TemporaryFilesDecorator::runAsync(), swapBuffers(), and juce::detail::MouseInputSourceImpl::triggerFakeMove().

◆ triggerRepaint() [1/2]

◆ triggerRepaint() [2/2]

void juce::OpenGLContext::NativeContext::triggerRepaint ( )
inline

References context.

◆ tryChooseConfig()

bool juce::OpenGLContext::NativeContext::tryChooseConfig ( const std::vector< EGLint > &  optionalAttribs)
inlineprivate

References config, and display.

Referenced by initEGLDisplay().

◆ tryChooseVisual()

bool juce::OpenGLContext::NativeContext::tryChooseVisual ( const OpenGLPixelFormat format,
const std::vector< GLint > &  optionalAttribs 
)
inlineprivate

References bestConfig, display, and juce::makeXFreePtr().

Referenced by NativeContext().

◆ updateWindowPosition() [1/5]

◆ updateWindowPosition() [2/5]

void juce::OpenGLContext::NativeContext::updateWindowPosition ( Rectangle< int >  bounds)
inline

◆ updateWindowPosition() [3/5]

◆ updateWindowPosition() [4/5]

◆ updateWindowPosition() [5/5]

void juce::OpenGLContext::NativeContext::updateWindowPosition ( Rectangle< int >  )
inline

◆ wglChoosePixelFormatExtension()

Member Data Documentation

◆ activeMessage

ReferenceCountedObjectPtr<AsyncUpdaterMessage> juce::AsyncUpdater::activeMessage
privateinherited

◆ bestConfig

std::unique_ptr<GLXFBConfig, XFreeDeleter> juce::OpenGLContext::NativeContext::bestConfig
private

◆ bounds

Rectangle<int> juce::OpenGLContext::NativeContext::bounds
private

◆ colorBufferHandle

GLuint juce::OpenGLContext::NativeContext::colorBufferHandle = 0
private

◆ component

Component & juce::OpenGLContext::NativeContext::component

◆ config

EGLConfig juce::OpenGLContext::NativeContext::config
inlinestaticprivate

Referenced by tryChooseConfig().

◆ context [1/3]

OpenGLContext * juce::OpenGLContext::NativeContext::context { EGL_NO_CONTEXT }
private

◆ context [2/3]

NSUniquePtr<EAGLContext> juce::OpenGLContext::NativeContext::context
private

◆ context [3/3]

OpenGLContext* juce::OpenGLContext::NativeContext::context = nullptr
private

◆ contextToShareWith

void* juce::OpenGLContext::NativeContext::contextToShareWith
private

◆ dc

std::unique_ptr<std::remove_pointer_t<HDC>, DeviceContextDeleter> juce::OpenGLContext::NativeContext::dc
private

◆ depthBufferHandle

GLuint juce::OpenGLContext::NativeContext::depthBufferHandle = 0
private

◆ display [1/2]

◆ display [2/2]

::Display* juce::OpenGLContext::NativeContext::display = nullptr
private

◆ dummy

DummyComponent juce::OpenGLContext::NativeContext::dummy
private

Referenced by NativeContext(), and ~NativeContext().

◆ embeddedWindow

Window juce::OpenGLContext::NativeContext::embeddedWindow = {}
private

◆ embeddedWindowEventMask

constexpr int juce::OpenGLContext::NativeContext::embeddedWindowEventMask = ExposureMask | StructureNotifyMask
staticconstexprprivate

Referenced by NativeContext(), and ~NativeContext().

◆ frameBufferHandle

GLuint juce::OpenGLContext::NativeContext::frameBufferHandle = 0
private

◆ glLayer

CAEAGLLayer* juce::OpenGLContext::NativeContext::glLayer = nil
private

◆ glxWindow

PtrGLXWindow juce::OpenGLContext::NativeContext::glxWindow
private

◆ hasInitialised

bool juce::OpenGLContext::NativeContext::hasInitialised = false
private

◆ haveBuffersBeenSwapped

bool juce::OpenGLContext::NativeContext::haveBuffersBeenSwapped = false
private

Referenced by swapBuffers().

◆ invocationHandler

GlobalRef juce::AndroidInterfaceImplementer::invocationHandler
privateinherited

◆ javaSubClass

GlobalRef juce::AndroidInterfaceImplementer::javaSubClass
privateinherited

◆ juceContext

OpenGLContext* juce::OpenGLContext::NativeContext::juceContext = nullptr
private

◆ lastBounds

Rectangle<int> juce::OpenGLContext::NativeContext::lastBounds
private

◆ lastSwapTime

double juce::OpenGLContext::NativeContext::lastSwapTime = 0

Referenced by swapBuffers().

◆ listeners

ListenerList<NativeContextListener> juce::OpenGLContext::NativeContext::listeners
private

◆ minSwapTimeMs

MinSwapTimeMs juce::OpenGLContext::NativeContext::minSwapTimeMs

◆ msaaBufferHandle

GLuint juce::OpenGLContext::NativeContext::msaaBufferHandle = 0
private

◆ msaaColorHandle

GLuint juce::OpenGLContext::NativeContext::msaaColorHandle = 0
private

◆ mutex

CriticalSection juce::OpenGLContext::NativeContext::mutex
private

◆ nativeHandleMutex

std::mutex juce::OpenGLContext::NativeContext::nativeHandleMutex
mutableprivate

◆ nativeScaleFactor

double juce::OpenGLContext::NativeContext::nativeScaleFactor = 1.0
private

◆ nativeWindow

std::unique_ptr<ComponentPeer> juce::OpenGLContext::NativeContext::nativeWindow
private

◆ needToRebuildBuffers

bool juce::OpenGLContext::NativeContext::needToRebuildBuffers = false
private

◆ openGLversion

const OpenGLVersion juce::OpenGLContext::NativeContext::openGLversion
private

◆ owner

Component& juce::OpenGLContext::NativeContext::owner

Referenced by updateWindowPosition().

◆ peerListener

std::optional<PeerListener> juce::OpenGLContext::NativeContext::peerListener
private

Referenced by NativeContext().

◆ physicalBounds

Rectangle<int> juce::OpenGLContext::NativeContext::physicalBounds
private

◆ placeholderComponent

std::unique_ptr<PlaceholderComponent> juce::OpenGLContext::NativeContext::placeholderComponent
private

◆ renderContext [1/3]

◆ renderContext [2/3]

NSOpenGLContext* juce::OpenGLContext::NativeContext::renderContext = nil

◆ renderContext [3/3]

std::unique_ptr<std::remove_pointer_t<HGLRC>, RenderContextDeleter> juce::OpenGLContext::NativeContext::renderContext
private

◆ safeComponent

Component::SafePointer<Component> juce::OpenGLContext::NativeContext::safeComponent
private

◆ sharedContext

void* juce::OpenGLContext::NativeContext::sharedContext = nullptr
private

◆ surface

std::unique_ptr<std::remove_pointer_t<EGLSurface>, SurfaceDestructor> juce::OpenGLContext::NativeContext::surface { EGL_NO_SURFACE }
private

◆ surfaceHolderCallback

GlobalRef juce::OpenGLContext::NativeContext::surfaceHolderCallback
private

Referenced by NativeContext(), and ~NativeContext().

◆ surfaceView

GlobalRef juce::OpenGLContext::NativeContext::surfaceView
private

◆ swapFrames

int juce::OpenGLContext::NativeContext::swapFrames = 0
private

Referenced by getSwapInterval(), and setSwapInterval().

◆ threadAwarenessSetter

std::unique_ptr<ScopedThreadDPIAwarenessSetter> juce::OpenGLContext::NativeContext::threadAwarenessSetter
private

◆ underrunCounter

int juce::OpenGLContext::NativeContext::underrunCounter = 0

Referenced by swapBuffers().

◆ useDepthBuffer

const bool juce::OpenGLContext::NativeContext::useDepthBuffer
private

◆ useMSAA

const bool juce::OpenGLContext::NativeContext::useMSAA
private

◆ view [1/2]

JuceGLView* juce::OpenGLContext::NativeContext::view = nil
private

◆ view [2/2]

NSOpenGLView* juce::OpenGLContext::NativeContext::view = nil

◆ viewAttachment

ReferenceCountedObjectPtr<ReferenceCountedObject> juce::OpenGLContext::NativeContext::viewAttachment

Referenced by NativeContext().


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