mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-15 00:24:19 +00:00
Added an assertion to check the OpenGL swap interval on MacOS
This commit is contained in:
parent
06a2654a74
commit
be83a08c3b
2 changed files with 5 additions and 1 deletions
|
|
@ -331,7 +331,7 @@ inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::write>::fin
|
|||
{
|
||||
f.finishedWrite (num);
|
||||
}
|
||||
|
||||
|
||||
template<>
|
||||
inline void AbstractFifo::ScopedReadWrite<AbstractFifo::ReadOrWrite::read>::prepare (AbstractFifo& f, int num) noexcept
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,6 +200,10 @@ public:
|
|||
|
||||
bool setSwapInterval (int numFramesPerSwap)
|
||||
{
|
||||
// The macOS OpenGL programming guide says that numFramesPerSwap
|
||||
// can only be 0 or 1.
|
||||
jassert (isPositiveAndBelow (numFramesPerSwap, 2));
|
||||
|
||||
minSwapTimeMs = (numFramesPerSwap * 1000) / 60;
|
||||
|
||||
[renderContext setValues: (const GLint*) &numFramesPerSwap
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue