1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-21 01:24:21 +00:00
This commit is contained in:
jules 2007-09-04 16:20:11 +00:00
parent 8cd120aead
commit c42e69ad3d
3 changed files with 19 additions and 15 deletions

View file

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

View file

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

View file

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