mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Added flags for multisampling in GL, and implementation of this for iOS.
This commit is contained in:
parent
33b246ce7b
commit
30cc1ed757
7 changed files with 73 additions and 42 deletions
|
|
@ -39,7 +39,7 @@ public:
|
|||
hasInitialised (false),
|
||||
needsUpdate (1)
|
||||
{
|
||||
nativeContext = new NativeContext (component, pixFormat, contextToShare);
|
||||
nativeContext = new NativeContext (component, pixFormat, contextToShare, c.useMultisampling);
|
||||
|
||||
if (nativeContext->createdOk())
|
||||
context.nativeContext = nativeContext;
|
||||
|
|
@ -521,7 +521,7 @@ private:
|
|||
//==============================================================================
|
||||
OpenGLContext::OpenGLContext()
|
||||
: nativeContext (nullptr), renderer (nullptr), contextToShareWith (nullptr),
|
||||
renderComponents (true)
|
||||
renderComponents (true), useMultisampling (false)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -566,6 +566,15 @@ void OpenGLContext::setNativeSharedContext (void* nativeContextToShareWith) noex
|
|||
contextToShareWith = nativeContextToShareWith;
|
||||
}
|
||||
|
||||
void OpenGLContext::setMultisamplingEnabled (bool b) noexcept
|
||||
{
|
||||
// This method must not be called when the context has already been attached!
|
||||
// Call it before attaching your context, or use detach() first, before calling this!
|
||||
jassert (nativeContext == nullptr);
|
||||
|
||||
useMultisampling = b;
|
||||
}
|
||||
|
||||
void OpenGLContext::attachTo (Component& component)
|
||||
{
|
||||
component.repaint();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue