diff --git a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp index d2ecbf4ca1..20239010ea 100644 --- a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp +++ b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.cpp @@ -139,10 +139,10 @@ void OpenGLComponent::createContext() if (context == 0 && isShowing() && getTopLevelComponent()->getPeer() != 0) { - context = OpenGLContext::createContextForWindow (this, - preferredPixelFormat, - componentToShareListsWith != 0 - ? componentToShareListsWith->context + context = OpenGLContext::createContextForWindow (this, + preferredPixelFormat, + componentToShareListsWith != 0 + ? componentToShareListsWith->context : 0); if (context != 0) diff --git a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h index 3b9e557be2..91a4ec5bdb 100644 --- a/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h +++ b/src/juce_appframework/gui/components/special/juce_OpenGLComponent.h @@ -51,7 +51,7 @@ struct OpenGLPixelFormat //============================================================================== /** Creates an OpenGLPixelFormat. - The default constructor just initialises the object as a simple 8-bit + The default constructor just initialises the object as a simple 8-bit RGBA format. */ OpenGLPixelFormat (const int bitsPerRGBComponent = 8, @@ -140,7 +140,7 @@ public: you're doing - the OpenGLComponent calls this and manages the context for you. */ static OpenGLContext* createContextForWindow (Component* componentToDrawTo, - const OpenGLPixelFormat& pixelFormat, + const OpenGLPixelFormat& pixelFormat, const OpenGLContext* const contextToShareWith); //============================================================================== @@ -218,7 +218,7 @@ public: /** Returns the context that will draw into this component. This may return 0 if it failed to initialise properly, or if the component - is currently invisible. The context object may be deleted and a new one created + is currently invisible. The context object may be deleted and a new one created during the life of this component - see newOpenGLContextCreated(). */ OpenGLContext* getCurrentContext() const throw(); @@ -255,8 +255,8 @@ public: /** Calls the rendering callback, and swaps the buffers afterwards. This is called automatically by paint() when the component needs to be rendered. - - It can be overridden if you need to decouple the rendering from the paint callback + + It can be overridden if you need to decouple the rendering from the paint callback and render with a custom thread. Returns true if the operation succeeded. diff --git a/src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp b/src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp index d8359d6d8c..0a21c5edd3 100644 --- a/src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp +++ b/src/juce_appframework/gui/graphics/contexts/juce_Graphics.cpp @@ -458,8 +458,8 @@ void Graphics::drawRect (const int x, void Graphics::drawRect (const Rectangle& r, const int lineThickness) const throw() { - drawRect (r.getX(), r.getY(), - r.getWidth(), r.getHeight(), + drawRect (r.getX(), r.getY(), + r.getWidth(), r.getHeight(), lineThickness); } @@ -538,8 +538,10 @@ void Graphics::fillRoundedRectangle (const float x, void Graphics::fillRoundedRectangle (const Rectangle& r, const float cornerSize) const throw() { - fillRoundedRectangle (r.getX(), r.getY(), - r.getWidth(), r.getHeight(), + fillRoundedRectangle ((float) r.getX(), + (float) r.getY(), + (float) r.getWidth(), + (float) r.getHeight(), cornerSize); } @@ -562,8 +564,10 @@ void Graphics::drawRoundedRectangle (const Rectangle& r, const float cornerSize, const float lineThickness) const throw() { - drawRoundedRectangle (r.getX(), r.getY(), - r.getWidth(), r.getHeight(), + drawRoundedRectangle ((float) r.getX(), + (float) r.getY(), + (float) r.getWidth(), + (float) r.getHeight(), cornerSize, lineThickness); }