1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Tidied up some docs and comments.

This commit is contained in:
jules 2012-04-03 11:36:31 +01:00
parent 875cb97217
commit 351416c09a
9 changed files with 12 additions and 13 deletions

View file

@ -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");

View file

@ -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);

View file

@ -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 <typename Type>
inline void deleteAndZero (Type& pointer) { delete pointer; pointer = nullptr; }

View file

@ -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;

View file

@ -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.
*/

View file

@ -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<int> bounds (component.getLocalBounds());

View file

@ -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

View file

@ -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
{

View file

@ -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?