#include <juce_OpenGL_win32.h>
Classes | |
struct | DummyComponent |
struct | Locker |
struct | MouseForwardingNSOpenGLViewClass |
Public Member Functions | |
NativeContext (Component &component, const OpenGLPixelFormat &pixFormat, void *contextToShare, bool shouldUseMultisampling, OpenGLVersion version) | |
NativeContext (Component &component, const OpenGLPixelFormat &pixelFormat, void *contextToShareWith, bool, OpenGLVersion) | |
NativeContext (Component &comp, const OpenGLPixelFormat &, void *, bool, OpenGLVersion) | |
NativeContext (Component &comp, const OpenGLPixelFormat &cPixelFormat, void *shareContext, bool, OpenGLVersion) | |
~NativeContext () | |
~NativeContext () | |
~NativeContext () | |
~NativeContext () | |
bool | createdOk () const noexcept |
bool | createdOk () const noexcept |
bool | createdOk () const noexcept |
bool | createdOk () const noexcept |
void | dispatchDraw (jobject canvas) |
GLuint | getFrameBufferID () const noexcept |
unsigned int | getFrameBufferID () const noexcept |
GLuint | getFrameBufferID () const noexcept |
GLuint | getFrameBufferID () const noexcept |
void * | getRawContext () const noexcept |
void * | getRawContext () const noexcept |
void * | getRawContext () const noexcept |
void * | getRawContext () const noexcept |
int | getSwapInterval () const |
int | getSwapInterval () const |
int | getSwapInterval () const |
int | getSwapInterval () const |
void | initialiseOnRenderThread (OpenGLContext &c) |
void | initialiseOnRenderThread (OpenGLContext &aContext) |
void | initialiseOnRenderThread (OpenGLContext &) |
void | initialiseOnRenderThread (OpenGLContext &c) |
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 | setSwapInterval (int numFramesPerSwap) |
bool | setSwapInterval (const int) |
bool | setSwapInterval (int numFramesPerSwap) |
bool | setSwapInterval (int numFramesPerSwap) |
void | shutdownOnRenderThread () |
void | shutdownOnRenderThread () |
void | shutdownOnRenderThread () |
void | shutdownOnRenderThread () |
void | surfaceChanged (jobject holder, int format, int width, int height) |
void | surfaceCreated (jobject holder) |
void | surfaceDestroyed (jobject holder) |
void | swapBuffers () const noexcept |
void | swapBuffers () |
void | swapBuffers () const noexcept |
void | swapBuffers () |
void | triggerRepaint () |
void | triggerRepaint () |
void | updateWindowPosition (Rectangle< int > bounds) |
void | updateWindowPosition (Rectangle< int > bounds) |
void | updateWindowPosition (Rectangle< int > newBounds) |
void | updateWindowPosition (Rectangle< int >) |
Static Public Member Functions | |
static void | createAttribs (NSOpenGLPixelFormatAttribute *attribs, OpenGLVersion version, const OpenGLPixelFormat &pixFormat, bool shouldUseMultisampling) |
static void | deactivateCurrentContext () |
static void | deactivateCurrentContext () |
static void | deactivateCurrentContext () |
static void | deactivateCurrentContext () |
Public Attributes | |
Component & | component |
double | lastSwapTime |
int | minSwapTimeMs |
NSOpenGLContext * | renderContext |
int | underrunCounter |
NSOpenGLView * | view |
ReferenceCountedObjectPtr< ReferenceCountedObject > | viewAttachment |
Private Member Functions | |
void | createNativeWindow (Component &component) |
void | deleteRenderContext () |
bool | initEGLDisplay () |
void | initialiseGLExtensions () |
void | releaseDC () |
int | wglChoosePixelFormatExtension (const OpenGLPixelFormat &pixelFormat) const |
Static Private Member Functions | |
static void | initialisePixelFormatDescriptor (PIXELFORMATDESCRIPTOR &pfd, const OpenGLPixelFormat &pixelFormat) |
Private Attributes | |
XVisualInfo * | bestVisual = {} |
Rectangle< int > | bounds |
OpenGLContext * | context = {} |
EGLContext | context = {} |
void * | contextToShareWith |
HDC | dc |
::Display * | display = {} |
DummyComponent | dummy |
ScopedPointer< DummyComponent > | dummyComponent |
Window | embeddedWindow = {} |
bool | hasInitialised |
OpenGLContext * | juceContext |
Rectangle< int > | lastBounds |
ScopedPointer< ComponentPeer > | nativeWindow |
HGLRC | renderContext |
GLXContext | renderContext = {} |
EGLSurface | surface |
GlobalRef | surfaceView |
int | swapFrames = 0 |
Static Private Attributes | |
static EGLConfig | config |
static EGLDisplay | display |
|
inline |
References AndroidSystem::activity, android, bounds, component, GlobalRef::get(), Component::getDesktopScaleFactor(), getEnv(), Component::getLocalArea(), Component::getLocalBounds(), ComponentPeer::getNativeHandle(), Component::getPeer(), Component::getTopLevelComponent(), hasInitialised, initEGLDisplay(), surfaceView, and updateWindowPosition().
Referenced by JuceGLView::layerClass.
|
inline |
References GlobalRef::get(), getEnv(), and surfaceView.
Referenced by JuceGLView::layerClass.
|
inline |
References OpenGLPixelFormat::accumulationBufferAlphaBits, OpenGLPixelFormat::accumulationBufferBlueBits, OpenGLPixelFormat::accumulationBufferGreenBits, OpenGLPixelFormat::accumulationBufferRedBits, OpenGLPixelFormat::alphaBits, bestVisual, OpenGLPixelFormat::blueBits, component, OpenGLPixelFormat::depthBufferBits, display, dummy, embeddedWindow, Component::getLocalArea(), Component::getLocalBounds(), Component::getPeer(), Component::getTopLevelComponent(), OpenGLPixelFormat::greenBits, jassert, juce::jmax(), juce_LinuxAddRepaintListener(), juce_LinuxScaledToPhysicalBounds(), OpenGLPixelFormat::redBits, OpenGLPixelFormat::stencilBufferBits, and windowHandleXContext.
|
inline |
References bestVisual, component, display, dummy, embeddedWindow, Component::getPeer(), and juce_LinuxRemoveRepaintListener().
|
inline |
|
inline |
References renderContext, and view.
|
inline |
References createNativeWindow(), dc, deactivateCurrentContext(), deleteRenderContext(), dummyComponent, Component::getTopLevelComponent(), initialiseGLExtensions(), initialisePixelFormatDescriptor(), makeActive(), nativeWindow, releaseDC(), renderContext, Component::repaint(), and wglChoosePixelFormatExtension().
|
inline |
References deleteRenderContext(), and releaseDC().
|
inlinestatic |
References OpenGLPixelFormat::accumulationBufferAlphaBits, OpenGLPixelFormat::accumulationBufferBlueBits, OpenGLPixelFormat::accumulationBufferGreenBits, OpenGLPixelFormat::accumulationBufferRedBits, OpenGLPixelFormat::alphaBits, OpenGLPixelFormat::blueBits, OpenGLPixelFormat::depthBufferBits, OpenGLPixelFormat::greenBits, juce::ignoreUnused(), OpenGLPixelFormat::multisamplingLevel, OpenGLContext::openGL3_2, OpenGLPixelFormat::redBits, and OpenGLPixelFormat::stencilBufferBits.
Referenced by NativeContext().
|
inlinenoexcept |
References getRawContext().
|
inlinenoexcept |
References getRawContext().
|
inlinenoexcept |
References hasInitialised.
Referenced by JuceGLView::layerClass.
|
inlinenoexcept |
|
inlineprivate |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
References display.
Referenced by JuceGLView::layerClass, NativeContext(), and shutdownOnRenderThread().
|
inlinestatic |
|
inlineprivate |
Referenced by NativeContext(), and ~NativeContext().
|
inline |
References juce::ignoreUnused(), juceContext, and OpenGLContext::triggerRepaint().
Referenced by JUCE_JNI_CALLBACK().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Referenced by JuceGLView::layerClass.
|
inlinenoexcept |
|
inlinenoexcept |
References renderContext.
|
inlinenoexcept |
References renderContext.
|
inlinenoexcept |
References GlobalRef::get(), and surfaceView.
Referenced by createdOk(), and JuceGLView::layerClass.
|
inlinenoexcept |
References renderContext.
|
inline |
References isActive(), and jassert.
|
inline |
Referenced by JuceGLView::layerClass.
|
inline |
References renderContext.
|
inline |
References swapFrames.
|
inlineprivate |
References config, display, and jassertfalse.
Referenced by NativeContext().
|
inlineprivate |
References JUCE_INIT_WGL_FUNCTION.
Referenced by NativeContext().
|
inline |
References context.
|
inline |
References config, context, display, GlobalRef::get(), getEnv(), hasInitialised, jassert, juceContext, surface, and surfaceView.
Referenced by JuceGLView::layerClass.
|
inline |
|
inline |
|
inlinestaticprivate |
References OpenGLPixelFormat::accumulationBufferAlphaBits, OpenGLPixelFormat::accumulationBufferBlueBits, OpenGLPixelFormat::accumulationBufferGreenBits, OpenGLPixelFormat::accumulationBufferRedBits, OpenGLPixelFormat::alphaBits, OpenGLPixelFormat::blueBits, OpenGLPixelFormat::depthBufferBits, OpenGLPixelFormat::greenBits, OpenGLPixelFormat::redBits, OpenGLPixelFormat::stencilBufferBits, and zerostruct().
Referenced by NativeContext().
|
inlinenoexcept |
References renderContext.
|
inlinenoexcept |
References renderContext.
|
inlinenoexcept |
References context.
Referenced by getSwapInterval(), JuceGLView::layerClass, makeActive(), and setSwapInterval().
|
inlinenoexcept |
References renderContext.
|
inlinenoexcept |
References dc, isActive(), and renderContext.
|
inlinenoexcept |
References context, jassert, renderContext, and view.
|
inlinenoexcept |
References context, display, hasInitialised, and surface.
Referenced by JuceGLView::layerClass, and NativeContext().
|
inlinenoexcept |
References display, embeddedWindow, and renderContext.
|
inlineprivate |
References dc, and ComponentPeer::getNativeHandle().
Referenced by NativeContext(), and ~NativeContext().
|
inline |
References isActive(), and jassert.
|
inline |
Referenced by JuceGLView::layerClass.
|
inline |
References OpenGLHelpers::getExtensionFunction(), and swapFrames.
|
inline |
References minSwapTimeMs, and renderContext.
|
inline |
References context, and deactivateCurrentContext().
|
inline |
References deactivateCurrentContext().
|
inline |
References context, display, hasInitialised, jassert, and surface.
Referenced by JuceGLView::layerClass.
|
inline |
|
inline |
References juce::ignoreUnused(), surfaceCreated(), and surfaceDestroyed().
Referenced by JUCE_JNI_CALLBACK().
void OpenGLContext::NativeContext::surfaceCreated | ( | jobject | holder | ) |
Referenced by JUCE_JNI_CALLBACK(), and surfaceChanged().
void OpenGLContext::NativeContext::surfaceDestroyed | ( | jobject | holder | ) |
Referenced by JUCE_JNI_CALLBACK(), and surfaceChanged().
|
inlinenoexcept |
References dc.
|
inline |
References Time::getMillisecondCounterHiRes(), lastSwapTime, minSwapTimeMs, renderContext, Thread::sleep(), and underrunCounter.
|
inlinenoexcept |
References display, and surface.
Referenced by JuceGLView::layerClass.
|
inline |
References display, and embeddedWindow.
|
inline |
References context.
|
inline |
References OpenGLContext::NativeContext::DummyComponent::context, and triggerRepaint().
Referenced by OpenGLContext::NativeContext::DummyComponent::handleCommandMessage(), and triggerRepaint().
References bounds, GlobalRef::get(), Rectangle< ValueType >::getBottom(), Desktop::getDisplays(), getEnv(), Desktop::getInstance(), Desktop::Displays::getMainDisplay(), Rectangle< ValueType >::getRight(), Rectangle< ValueType >::getX(), Rectangle< ValueType >::getY(), lastBounds, Desktop::Displays::Display::scale, and surfaceView.
Referenced by createNativeWindow(), JuceGLView::layerClass, and NativeContext().
References bounds, component, display, embeddedWindow, Component::getPeer(), juce::jmax(), and juce_LinuxScaledToPhysicalBounds().
|
inlineprivate |
References OpenGLPixelFormat::accumulationBufferAlphaBits, OpenGLPixelFormat::accumulationBufferBlueBits, OpenGLPixelFormat::accumulationBufferGreenBits, OpenGLPixelFormat::accumulationBufferRedBits, OpenGLPixelFormat::alphaBits, OpenGLPixelFormat::blueBits, OpenGLPixelFormat::depthBufferBits, OpenGLPixelFormat::greenBits, OpenGLHelpers::isContextActive(), OpenGLHelpers::isExtensionSupported(), jassert, JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR, OpenGLPixelFormat::multisamplingLevel, numElementsInArray(), OpenGLPixelFormat::redBits, OpenGLPixelFormat::stencilBufferBits, WGL_ACCELERATION_ARB, WGL_ACCUM_ALPHA_BITS_ARB, WGL_ACCUM_BLUE_BITS_ARB, WGL_ACCUM_GREEN_BITS_ARB, WGL_ACCUM_RED_BITS_ARB, WGL_ALPHA_BITS_ARB, WGL_BLUE_BITS_ARB, WGL_COLOR_BITS_ARB, WGL_DEPTH_BITS_ARB, WGL_DOUBLE_BUFFER_ARB, WGL_DRAW_TO_WINDOW_ARB, WGL_FULL_ACCELERATION_ARB, WGL_GREEN_BITS_ARB, WGL_PIXEL_TYPE_ARB, WGL_RED_BITS_ARB, WGL_SAMPLE_BUFFERS_ARB, WGL_SAMPLES_ARB, WGL_STENCIL_BITS_ARB, WGL_SUPPORT_OPENGL_ARB, and WGL_TYPE_RGBA_ARB.
Referenced by NativeContext().
|
private |
Referenced by initialiseOnRenderThread(), NativeContext(), and ~NativeContext().
Referenced by JuceGLView::layerClass, NativeContext(), and updateWindowPosition().
Component & OpenGLContext::NativeContext::component |
|
staticprivate |
Referenced by initEGLDisplay(), and initialiseOnRenderThread().
|
private |
|
private |
|
private |
Referenced by initialiseOnRenderThread().
|
private |
Referenced by makeActive(), NativeContext(), releaseDC(), and swapBuffers().
|
private |
|
staticprivate |
|
private |
Referenced by NativeContext(), and ~NativeContext().
|
private |
Referenced by NativeContext().
|
private |
Referenced by makeActive(), NativeContext(), swapBuffers(), updateWindowPosition(), and ~NativeContext().
|
private |
Referenced by createdOk(), initialiseOnRenderThread(), makeActive(), NativeContext(), and shutdownOnRenderThread().
|
private |
Referenced by dispatchDraw(), and initialiseOnRenderThread().
Referenced by JuceGLView::layerClass, and updateWindowPosition().
double OpenGLContext::NativeContext::lastSwapTime |
Referenced by swapBuffers().
int OpenGLContext::NativeContext::minSwapTimeMs |
Referenced by setSwapInterval(), and swapBuffers().
|
private |
Referenced by NativeContext(), and updateWindowPosition().
|
private |
NSOpenGLContext* OpenGLContext::NativeContext::renderContext |
|
private |
|
private |
Referenced by initialiseOnRenderThread(), makeActive(), shutdownOnRenderThread(), and swapBuffers().
|
private |
Referenced by getRawContext(), initialiseOnRenderThread(), NativeContext(), updateWindowPosition(), and ~NativeContext().
|
private |
Referenced by getSwapInterval(), JuceGLView::layerClass, and setSwapInterval().
int OpenGLContext::NativeContext::underrunCounter |
Referenced by swapBuffers().
NSOpenGLView* OpenGLContext::NativeContext::view |
Referenced by JuceGLView::layerClass, makeActive(), NativeContext(), and ~NativeContext().
ReferenceCountedObjectPtr<ReferenceCountedObject> OpenGLContext::NativeContext::viewAttachment |
Referenced by NativeContext().