1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-09-04 18:04:42 +00:00
parent 0c9b1bff5f
commit cc99affa41

View file

@ -3120,7 +3120,7 @@ public:
wglShareLists (renderContext, contextToShareWith); wglShareLists (renderContext, contextToShareWith);
} }
~WindowedGLContext() ~WindowedGLContext()
{ {
makeInactive(); makeInactive();
@ -3196,7 +3196,7 @@ public:
PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = 0; PFNWGLCHOOSEPIXELFORMATARBPROC wglChoosePixelFormatARB = 0;
if (availableExtensions.contains ("WGL_ARB_pixel_format") if (availableExtensions.contains ("WGL_ARB_pixel_format")
&& WGL_EXT_FUNCTION_INIT (PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB)) && WGL_EXT_FUNCTION_INIT (PFNWGLCHOOSEPIXELFORMATARBPROC, wglChoosePixelFormatARB))
{ {
int attributes[64]; int attributes[64];
@ -3302,14 +3302,14 @@ public:
void findAlternativeOpenGLPixelFormats (OwnedArray <OpenGLPixelFormat>& results) void findAlternativeOpenGLPixelFormats (OwnedArray <OpenGLPixelFormat>& results)
{ {
jassert (isActive()); jassert (isActive());
StringArray availableExtensions; StringArray availableExtensions;
getWglExtensions (dc, availableExtensions); getWglExtensions (dc, availableExtensions);
PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0; PFNWGLGETPIXELFORMATATTRIBIVARBPROC wglGetPixelFormatAttribivARB = 0;
int numTypes = 0; int numTypes = 0;
if (availableExtensions.contains("WGL_ARB_pixel_format") if (availableExtensions.contains("WGL_ARB_pixel_format")
&& WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB)) && WGL_EXT_FUNCTION_INIT (PFNWGLGETPIXELFORMATATTRIBIVARBPROC, wglGetPixelFormatAttribivARB))
{ {
int attributes = WGL_NUMBER_PIXEL_FORMATS_ARB; int attributes = WGL_NUMBER_PIXEL_FORMATS_ARB;
@ -3349,7 +3349,7 @@ private:
HDC dc; HDC dc;
//============================================================================== //==============================================================================
bool fillInPixelFormatDetails (const int pixelFormatIndex, bool fillInPixelFormatDetails (const int pixelFormatIndex,
OpenGLPixelFormat& result, OpenGLPixelFormat& result,
const StringArray& availableExtensions) const throw() const StringArray& availableExtensions) const throw()
{ {
@ -3444,11 +3444,11 @@ private:
}; };
//============================================================================== //==============================================================================
OpenGLContext* OpenGLContext::createContextForWindow (Component* const component, OpenGLContext* OpenGLContext::createContextForWindow (Component* const component,
const OpenGLPixelFormat& pixelFormat, const OpenGLPixelFormat& pixelFormat,
const OpenGLContext* const contextToShareWith) const OpenGLContext* const contextToShareWith)
{ {
WindowedGLContext* c = new WindowedGLContext (component, WindowedGLContext* c = new WindowedGLContext (component,
contextToShareWith != 0 ? (HGLRC) contextToShareWith->getRawContext() : 0); contextToShareWith != 0 ? (HGLRC) contextToShareWith->getRawContext() : 0);
if (c->renderContext == 0 || ! c->setPixelFormat (pixelFormat)) if (c->renderContext == 0 || ! c->setPixelFormat (pixelFormat))