JUCE
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
juce::OpenGLContext::NativeContext Class Reference

Classes

struct  Locker
 
struct  MouseForwardingNSOpenGLViewClass
 

Public Member Functions

 NativeContext (Component &comp, const OpenGLPixelFormat &, void *, bool, OpenGLVersion)
 
 ~NativeContext ()
 
bool initialiseOnRenderThread (OpenGLContext &aContext)
 
void shutdownOnRenderThread ()
 
bool makeActive () const noexcept
 
bool isActive () const noexcept
 
void swapBuffers () const noexcept
 
bool setSwapInterval (const int)
 
int getSwapInterval () const
 
bool createdOk () const noexcept
 
void * getRawContext () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
void updateWindowPosition (Rectangle< int > bounds)
 
void dispatchDraw (jobject canvas)
 
void surfaceChanged (jobject holder, int format, int width, int height)
 
void surfaceCreated (jobject holder)
 
void surfaceDestroyed (jobject holder)
 
 NativeContext (Component &c, const OpenGLPixelFormat &pixFormat, void *contextToShare, bool multisampling, OpenGLVersion version)
 
 ~NativeContext ()
 
bool initialiseOnRenderThread (OpenGLContext &)
 
void shutdownOnRenderThread ()
 
bool createdOk () const noexcept
 
void * getRawContext () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
bool makeActive () const noexcept
 
bool isActive () const noexcept
 
void swapBuffers ()
 
void updateWindowPosition (Rectangle< int > bounds)
 
bool setSwapInterval (int numFramesPerSwap) noexcept
 
int getSwapInterval () const noexcept
 
 NativeContext (Component &comp, const OpenGLPixelFormat &cPixelFormat, void *shareContext, bool, OpenGLVersion)
 
 ~NativeContext ()
 
bool initialiseOnRenderThread (OpenGLContext &c)
 
void shutdownOnRenderThread ()
 
bool makeActive () const noexcept
 
bool isActive () const noexcept
 
void swapBuffers ()
 
void updateWindowPosition (Rectangle< int > newBounds)
 
bool setSwapInterval (int numFramesPerSwap)
 
int getSwapInterval () const
 
bool createdOk () const noexcept
 
void * getRawContext () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
void triggerRepaint ()
 
 NativeContext (Component &component, const OpenGLPixelFormat &pixFormat, void *contextToShare, bool shouldUseMultisampling, OpenGLVersion version)
 
 ~NativeContext ()
 
bool initialiseOnRenderThread (OpenGLContext &)
 
void shutdownOnRenderThread ()
 
bool createdOk () const noexcept
 
void * getRawContext () const noexcept
 
GLuint getFrameBufferID () const noexcept
 
bool makeActive () const noexcept
 
bool isActive () const noexcept
 
void swapBuffers ()
 
void updateWindowPosition (Rectangle< int >)
 
bool setSwapInterval (int numFramesPerSwap)
 
int getSwapInterval () const
 
 NativeContext (Component &component, const OpenGLPixelFormat &pixelFormat, void *contextToShareWith, bool, OpenGLVersion)
 
 ~NativeContext ()
 
bool initialiseOnRenderThread (OpenGLContext &c)
 
void shutdownOnRenderThread ()
 
bool makeActive () const noexcept
 
bool isActive () const noexcept
 
void swapBuffers () const noexcept
 
bool setSwapInterval (int numFramesPerSwap)
 
int getSwapInterval () const
 
void updateWindowPosition (Rectangle< int > bounds)
 
bool createdOk () const noexcept
 
void * getRawContext () const noexcept
 
unsigned int getFrameBufferID () const noexcept
 
void triggerRepaint ()
 

Static Public Member Functions

static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 
static void createAttribs (NSOpenGLPixelFormatAttribute *attribs, OpenGLVersion version, const OpenGLPixelFormat &pixFormat, bool shouldUseMultisampling)
 
static void deactivateCurrentContext ()
 
static void deactivateCurrentContext ()
 

Public Attributes

Componentcomponent
 
NSOpenGLContext * renderContext
 
NSOpenGLView * view
 
ReferenceCountedObjectPtr< ReferenceCountedObjectviewAttachment
 
double lastSwapTime
 
int minSwapTimeMs
 
int underrunCounter
 

Constructor & Destructor Documentation

◆ NativeContext() [1/5]

juce::OpenGLContext::NativeContext::NativeContext ( Component comp,
const OpenGLPixelFormat ,
void *  ,
bool  ,
OpenGLVersion   
)

◆ ~NativeContext() [1/5]

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

◆ NativeContext() [2/5]

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

◆ ~NativeContext() [2/5]

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

◆ NativeContext() [3/5]

juce::OpenGLContext::NativeContext::NativeContext ( Component comp,
const OpenGLPixelFormat cPixelFormat,
void *  shareContext,
bool  ,
OpenGLVersion   
)

◆ ~NativeContext() [3/5]

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

◆ NativeContext() [4/5]

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

◆ ~NativeContext() [4/5]

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

◆ NativeContext() [5/5]

juce::OpenGLContext::NativeContext::NativeContext ( Component component,
const OpenGLPixelFormat pixelFormat,
void *  contextToShareWith,
bool  ,
OpenGLVersion   
)

◆ ~NativeContext() [5/5]

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

Member Function Documentation

◆ initialiseOnRenderThread() [1/5]

bool juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext aContext)

◆ shutdownOnRenderThread() [1/5]

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

References jassert.

◆ makeActive() [1/5]

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

Referenced by NativeContext().

◆ isActive() [1/5]

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

◆ deactivateCurrentContext() [1/5]

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

◆ swapBuffers() [1/5]

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

◆ setSwapInterval() [1/5]

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

◆ getSwapInterval() [1/5]

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

◆ createdOk() [1/5]

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

◆ getRawContext() [1/5]

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

References juce::GlobalRef::get().

Referenced by createdOk().

◆ getFrameBufferID() [1/5]

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

◆ updateWindowPosition() [1/5]

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

◆ dispatchDraw()

void juce::OpenGLContext::NativeContext::dispatchDraw ( jobject  canvas)

◆ surfaceChanged()

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

◆ surfaceCreated()

void juce::OpenGLContext::NativeContext::surfaceCreated ( jobject  holder)

◆ surfaceDestroyed()

void juce::OpenGLContext::NativeContext::surfaceDestroyed ( jobject  holder)

◆ initialiseOnRenderThread() [2/5]

bool juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext )

◆ shutdownOnRenderThread() [2/5]

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

◆ createdOk() [2/5]

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

◆ getRawContext() [2/5]

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

◆ getFrameBufferID() [2/5]

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

◆ makeActive() [2/5]

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

References juce::GL_FRAMEBUFFER.

◆ isActive() [2/5]

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

◆ deactivateCurrentContext() [2/5]

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

◆ swapBuffers() [2/5]

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

◆ updateWindowPosition() [2/5]

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

◆ setSwapInterval() [2/5]

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

◆ getSwapInterval() [2/5]

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

◆ initialiseOnRenderThread() [3/5]

bool juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext c)

◆ shutdownOnRenderThread() [3/5]

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

◆ makeActive() [3/5]

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

◆ isActive() [3/5]

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

◆ deactivateCurrentContext() [3/5]

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

◆ swapBuffers() [3/5]

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

◆ updateWindowPosition() [3/5]

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

◆ setSwapInterval() [3/5]

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

◆ getSwapInterval() [3/5]

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

◆ createdOk() [3/5]

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

◆ getRawContext() [3/5]

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

◆ getFrameBufferID() [3/5]

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

◆ triggerRepaint() [1/2]

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

◆ createAttribs()

static void juce::OpenGLContext::NativeContext::createAttribs ( NSOpenGLPixelFormatAttribute *  attribs,
OpenGLVersion  version,
const OpenGLPixelFormat pixFormat,
bool  shouldUseMultisampling 
)
static

◆ initialiseOnRenderThread() [4/5]

bool juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext )

◆ shutdownOnRenderThread() [4/5]

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

◆ createdOk() [4/5]

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

References getRawContext().

◆ getRawContext() [4/5]

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

◆ getFrameBufferID() [4/5]

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

◆ makeActive() [4/5]

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

References jassert.

◆ isActive() [4/5]

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

◆ deactivateCurrentContext() [4/5]

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

◆ swapBuffers() [4/5]

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

◆ updateWindowPosition() [4/5]

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

◆ setSwapInterval() [4/5]

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

References minSwapTimeMs.

◆ getSwapInterval() [4/5]

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

◆ initialiseOnRenderThread() [5/5]

bool juce::OpenGLContext::NativeContext::initialiseOnRenderThread ( OpenGLContext c)

◆ shutdownOnRenderThread() [5/5]

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

◆ deactivateCurrentContext() [5/5]

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

◆ makeActive() [5/5]

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

References isActive().

◆ isActive() [5/5]

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

◆ swapBuffers() [5/5]

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

◆ setSwapInterval() [5/5]

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

References isActive(), and jassert.

◆ getSwapInterval() [5/5]

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

References isActive(), and jassert.

◆ updateWindowPosition() [5/5]

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

◆ createdOk() [5/5]

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

References getRawContext().

◆ getRawContext() [5/5]

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

◆ getFrameBufferID() [5/5]

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

◆ triggerRepaint() [2/2]

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

Member Data Documentation

◆ component

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

◆ renderContext

NSOpenGLContext* juce::OpenGLContext::NativeContext::renderContext

◆ view

NSOpenGLView* juce::OpenGLContext::NativeContext::view

◆ viewAttachment

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

Referenced by NativeContext().

◆ lastSwapTime

double juce::OpenGLContext::NativeContext::lastSwapTime

Referenced by swapBuffers().

◆ minSwapTimeMs

int juce::OpenGLContext::NativeContext::minSwapTimeMs

Referenced by setSwapInterval(), and swapBuffers().

◆ underrunCounter

int juce::OpenGLContext::NativeContext::underrunCounter

Referenced by swapBuffers().


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