diff --git a/extras/JuceDemo/Source/demos/OpenGLDemo.cpp b/extras/JuceDemo/Source/demos/OpenGLDemo.cpp index 5968f92ad0..9b8506d704 100644 --- a/extras/JuceDemo/Source/demos/OpenGLDemo.cpp +++ b/extras/JuceDemo/Source/demos/OpenGLDemo.cpp @@ -37,9 +37,8 @@ public: : rotation (0.0f), textScrollPos (200) { - infoLabel.setText ("These sliders demonstrate how components can be added as children " - "of an OpenGLComponent, in which case, their content will be rendered into " - "an OpenGL framebuffer and efficiently overlaid onto your GL content.", false); + infoLabel.setText ("These sliders demonstrate how components and 2D graphics can be rendered " + "using OpenGL by using the OpenGLContext class.", false); infoLabel.setInterceptsMouseClicks (false, false); addAndMakeVisible (&infoLabel); infoLabel.setBounds ("parent.width * 0.05, bottom - 150, parent.width * 0.4, parent.height - 60"); diff --git a/modules/juce_core/maths/juce_MathsFunctions.h b/modules/juce_core/maths/juce_MathsFunctions.h index 42a671ba61..2cf9a11b61 100644 --- a/modules/juce_core/maths/juce_MathsFunctions.h +++ b/modules/juce_core/maths/juce_MathsFunctions.h @@ -430,9 +430,9 @@ bool isPowerOfTwo (IntegerType value) return (value & (value - 1)) == 0; } -/** Returns the next power-of-two which is equal to or greater than the given integer. +/** Returns the smallest power-of-two which is equal to or greater than the given integer. */ -inline int nextPowerOfTwo (int n) +inline int nextPowerOfTwo (int n) noexcept { --n; n |= (n >> 1); diff --git a/modules/juce_core/memory/juce_Memory.h b/modules/juce_core/memory/juce_Memory.h index 830c434570..df144c1005 100644 --- a/modules/juce_core/memory/juce_Memory.h +++ b/modules/juce_core/memory/juce_Memory.h @@ -57,7 +57,7 @@ inline void zerostruct (Type& structure) noexcept { memset (&s /** Delete an object pointer, and sets the pointer to null. Remember that it's not good c++ practice to use delete directly - always try to use a ScopedPointer - or other automatic lieftime-management system rather than resorting to deleting raw pointers! + or other automatic lifetime-management system rather than resorting to deleting raw pointers! */ template inline void deleteAndZero (Type& pointer) { delete pointer; pointer = nullptr; } diff --git a/modules/juce_events/native/juce_linux_Messaging.cpp b/modules/juce_events/native/juce_linux_Messaging.cpp index 3e65f10625..fccc359888 100644 --- a/modules/juce_events/native/juce_linux_Messaging.cpp +++ b/modules/juce_events/native/juce_linux_Messaging.cpp @@ -239,7 +239,7 @@ namespace LinuxErrorHandling XGetErrorText (display, event->error_code, errorStr, 64); XGetErrorDatabaseText (display, "XRequest", String (event->request_code).toUTF8(), "Unknown", requestStr, 64); - DBG ("ERROR: X returned " + String (errorStr) + " for operation " + String (requestStr)); + DBG ("ERROR: X returned " << errorStr << " for operation " << requestStr); #endif return 0; diff --git a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h index c037a8d898..8901296024 100644 --- a/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h +++ b/modules/juce_gui_basics/layout/juce_ComponentMovementWatcher.h @@ -40,7 +40,7 @@ It also includes a callback that lets you know when the top-level peer is changed. - This class is used by specialised components like OpenGLComponent or QuickTimeComponent + This class is used by specialised components like WebBrowserComponent or QuickTimeComponent because they need to keep their custom windows in the right place and respond to changes in the peer. */ diff --git a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp index 479fba5401..033b27858d 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLContext.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLContext.cpp @@ -165,7 +165,7 @@ public: needsUpdate = false; - // you mustn't set your own cached image object for an OpenGLComponent! + // you mustn't set your own cached image object when attaching a GL context! jassert (get (component) == this); const Rectangle bounds (component.getLocalBounds()); diff --git a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp index 46c0b812d4..e6c56ee3f4 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLFrameBuffer.cpp @@ -39,7 +39,7 @@ public: ok (true) { // Framebuffer objects can only be created when the current thread has an active OpenGL - // context. You'll need to make an OpenGLComponent active before calling this. + // context. You'll need to create this object in one of the OpenGLContext's callbacks. jassert (OpenGLHelpers::isContextActive()); #if JUCE_WINDOWS || JUCE_LINUX diff --git a/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h b/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h index 486b375850..05ea44a8ee 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h +++ b/modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h @@ -29,9 +29,9 @@ //============================================================================== /** - Represents the various properties of an OpenGL bitmap format. + Represents the various properties of an OpenGL pixel format. - @see OpenGLComponent::setPixelFormat + @see OpenGLContext::setPixelFormat */ class JUCE_API OpenGLPixelFormat { diff --git a/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp b/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp index af85a6890d..c6a42bbe1d 100644 --- a/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp +++ b/modules/juce_opengl/opengl/juce_OpenGLTexture.cpp @@ -41,7 +41,7 @@ bool OpenGLTexture::isValidSize (int width, int height) void OpenGLTexture::create (const int w, const int h, const void* pixels, GLenum type) { // Texture objects can only be created when the current thread has an active OpenGL - // context. You'll need to make an OpenGLComponent active before calling this. + // context. You'll need to create this object in one of the OpenGLContext's callbacks. jassert (OpenGLHelpers::isContextActive()); jassert (isValidSize (w, h)); // Perhaps these dimensions must be a power-of-two?