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

Mac GL fix for some older graphics cards.

This commit is contained in:
jules 2012-01-16 09:58:43 +00:00
parent ec08dc29a4
commit a511ea6b31
3 changed files with 8 additions and 14 deletions

View file

@ -164,7 +164,7 @@ ComponentBuilder::TypeHandler* ComponentBuilder::getHandlerForState (const Value
{
TypeHandler* const t = types.getUnchecked(i);
if (t->getType() == targetType)
if (t->type == targetType)
return t;
}
@ -217,9 +217,8 @@ void ComponentBuilder::valueTreeParentChanged (ValueTree& tree)
}
//==============================================================================
ComponentBuilder::TypeHandler::TypeHandler (const Identifier& valueTreeType_)
: builder (nullptr),
valueTreeType (valueTreeType_)
ComponentBuilder::TypeHandler::TypeHandler (const Identifier& valueTreeType)
: type (valueTreeType), builder (nullptr)
{
}

View file

@ -58,13 +58,10 @@ public:
/** Destructor. */
~ComponentBuilder();
/** This is the ValueTree data object that the builder is working with. */
ValueTree state;
//==============================================================================
/** Returns the ValueTree that this builder is working with. */
ValueTree& getState() noexcept { return state; }
/** Returns the ValueTree that this builder is working with. */
const ValueTree& getState() const noexcept { return state; }
/** Returns the builder's component (creating it if necessary).
The first time that this method is called, the builder will attempt to create a component
@ -111,7 +108,7 @@ public:
virtual ~TypeHandler();
/** Returns the type of the ValueTrees that this handler can parse. */
const Identifier& getType() const noexcept { return valueTreeType; }
const Identifier type;
/** Returns the builder that this type is registered with. */
ComponentBuilder* getBuilder() const noexcept;
@ -144,7 +141,6 @@ public:
//==============================================================================
friend class ComponentBuilder;
ComponentBuilder* builder;
const Identifier valueTreeType;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (TypeHandler);
};
@ -238,7 +234,6 @@ public:
private:
//=============================================================================
ValueTree state;
OwnedArray <TypeHandler> types;
ScopedPointer<Component> component;
ImageProvider* imageProvider;

View file

@ -137,7 +137,7 @@ public:
NSOpenGLPFAStencilSize, pixelFormat.stencilBufferBits,
NSOpenGLPFAAccumSize, pixelFormat.accumulationBufferRedBits + pixelFormat.accumulationBufferGreenBits
+ pixelFormat.accumulationBufferBlueBits + pixelFormat.accumulationBufferAlphaBits,
NSOpenGLPFASampleBuffers, 1,
pixelFormat.multisamplingLevel > 0 ? NSOpenGLPFASamples : 0, pixelFormat.multisamplingLevel,
0
};