mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Minor clean-ups for GL, removed some old VC6 hacks.
This commit is contained in:
parent
7d9e06d788
commit
0e1b6061d5
27 changed files with 102 additions and 2104 deletions
|
|
@ -1611,6 +1611,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -1630,6 +1631,7 @@
|
|||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void DocumentEditorComponent::documentAboutToClose (OpenDocumentManager::Documen
|
|||
if (document == closingDoc)
|
||||
{
|
||||
jassert (document != nullptr);
|
||||
ProjectContentComponent* pcc = findParentComponentOfClass ((ProjectContentComponent*) 0);
|
||||
ProjectContentComponent* pcc = findParentComponentOfClass<ProjectContentComponent>();
|
||||
|
||||
if (pcc != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ bool ProjectContentComponent::setEditorComponent (Component* editor, OpenDocumen
|
|||
|
||||
void ProjectContentComponent::updateMainWindowTitle()
|
||||
{
|
||||
MainWindow* mw = Component::findParentComponentOfClass ((MainWindow*) 0);
|
||||
MainWindow* mw = findParentComponentOfClass<MainWindow>();
|
||||
|
||||
if (mw != nullptr)
|
||||
mw->updateTitle (currentDocument != nullptr ? currentDocument->getName() : String::empty);
|
||||
|
|
@ -329,7 +329,7 @@ bool ProjectContentComponent::perform (const InvocationInfo& info)
|
|||
|
||||
case CommandIDs::closeProject:
|
||||
{
|
||||
MainWindow* mw = Component::findParentComponentOfClass ((MainWindow*) 0);
|
||||
MainWindow* mw = findParentComponentOfClass<MainWindow>();
|
||||
|
||||
if (mw != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ public:
|
|||
for (int i = missingDependencies.size(); --i >= 0;)
|
||||
project.addModule (missingDependencies[i], isModuleCopiedLocally);
|
||||
|
||||
ModulesPanel* mp = findParentComponentOfClass ((ModulesPanel*) nullptr);
|
||||
ModulesPanel* mp = findParentComponentOfClass<ModulesPanel>();
|
||||
if (mp != nullptr)
|
||||
mp->refresh();
|
||||
}
|
||||
|
|
@ -787,7 +787,7 @@ private:
|
|||
|
||||
void buttonClicked (Button*)
|
||||
{
|
||||
ProjectSettingsComponent* psc = findParentComponentOfClass ((ProjectSettingsComponent*) nullptr);
|
||||
ProjectSettingsComponent* psc = findParentComponentOfClass<ProjectSettingsComponent>();
|
||||
if (psc != nullptr)
|
||||
psc->deleteButtonClicked (deleteButton.getName());
|
||||
}
|
||||
|
|
@ -860,7 +860,7 @@ private:
|
|||
|
||||
void buttonClicked (Button*)
|
||||
{
|
||||
ProjectSettingsComponent* psc = findParentComponentOfClass ((ProjectSettingsComponent*) nullptr);
|
||||
ProjectSettingsComponent* psc = findParentComponentOfClass<ProjectSettingsComponent>();
|
||||
if (psc != nullptr)
|
||||
psc->newItemButtonClicked (createNewButton);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@ void ProjectTreeViewBase::getAllSelectedNodesInTree (Component* componentInTree,
|
|||
TreeView* tree = dynamic_cast <TreeView*> (componentInTree);
|
||||
|
||||
if (tree == nullptr)
|
||||
tree = componentInTree->findParentComponentOfClass ((TreeView*) 0);
|
||||
tree = componentInTree->findParentComponentOfClass<TreeView>();
|
||||
|
||||
if (tree != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ String replacePreprocessorDefs (const StringPairArray& definitions, String sourc
|
|||
//==============================================================================
|
||||
void autoScrollForMouseEvent (const MouseEvent& e, bool scrollX, bool scrollY)
|
||||
{
|
||||
Viewport* const viewport = e.eventComponent->findParentComponentOfClass ((Viewport*) 0);
|
||||
Viewport* const viewport = e.eventComponent->findParentComponentOfClass<Viewport>();
|
||||
|
||||
if (viewport != nullptr)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2014,6 +2014,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -2034,6 +2035,7 @@
|
|||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
|
|
@ -1969,6 +1969,7 @@
|
|||
GENERATE_PKGINFO_FILE = YES;
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
EXCLUDED_SOURCE_FILE_NAMES = "$(EXCLUDED_SOURCE_FILE_NAMES_$(CURRENT_ARCH))";
|
||||
EXCLUDED_SOURCE_FILE_NAMES_x86_64 = "*Carbon*.cpp";
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
|
|
@ -1993,6 +1994,7 @@
|
|||
GENERATE_PKGINFO_FILE = YES;
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
EXCLUDED_SOURCE_FILE_NAMES = "$(EXCLUDED_SOURCE_FILE_NAMES_$(CURRENT_ARCH))";
|
||||
EXCLUDED_SOURCE_FILE_NAMES_x86_64 = "*Carbon*.cpp";
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
|
|
|
|||
|
|
@ -1935,6 +1935,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -1954,6 +1955,7 @@
|
|||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
|
|
@ -436,6 +436,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "/usr/bin";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -453,6 +454,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "/usr/bin";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
|
|
@ -1391,6 +1391,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -1408,6 +1409,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -4,14 +4,6 @@
|
|||
juceLinkage="none" bundleIdentifier="com.rawmaterialsoftware.juce"
|
||||
jucerVersion="3.0.0">
|
||||
<EXPORTFORMATS>
|
||||
<XCODE_MAC targetFolder="Builds/MacOSX" objCExtraSuffix="cbgo2s" juceFolder="../../../juce">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="jucedebug"
|
||||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"/>
|
||||
<CONFIGURATION name="Release" isDebug="0" optimisation="2" targetName="juce"
|
||||
osxSDK="default" osxCompatibility="default" osxArchitecture="default"/>
|
||||
</CONFIGURATIONS>
|
||||
</XCODE_MAC>
|
||||
<VS2008 targetFolder="Builds/VisualStudio2008" libraryType="1" juceFolder="../../../juce">
|
||||
<CONFIGURATIONS>
|
||||
<CONFIGURATION name="Debug" isDebug="1" optimisation="1" targetName="jucedebug"
|
||||
|
|
|
|||
|
|
@ -1654,6 +1654,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
|
|
@ -1671,6 +1672,7 @@
|
|||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Applications";
|
||||
MACOSX_DEPLOYMENT_TARGET_ppc = 10.4;
|
||||
SDKROOT_ppc = macosx10.5;
|
||||
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ struct Expression::Helpers
|
|||
throw EvaluationError ("Recursive symbol references");
|
||||
}
|
||||
|
||||
friend class Expression::Term; // (also only needed as a VC6 workaround)
|
||||
friend class Expression::Term;
|
||||
|
||||
//==============================================================================
|
||||
/** An exception that can be thrown by Expression::evaluate(). */
|
||||
|
|
|
|||
|
|
@ -228,8 +228,7 @@ ApplicationCommandTarget* ApplicationCommandManager::findTargetForComponent (Com
|
|||
ApplicationCommandTarget* target = dynamic_cast <ApplicationCommandTarget*> (c);
|
||||
|
||||
if (target == nullptr && c != nullptr)
|
||||
// (unable to use the syntax findParentComponentOfClass <ApplicationCommandTarget> () because of a VC6 compiler bug)
|
||||
target = c->findParentComponentOfClass ((ApplicationCommandTarget*) nullptr);
|
||||
target = c->findParentComponentOfClass<ApplicationCommandTarget>();
|
||||
|
||||
return target;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,8 +84,7 @@ ApplicationCommandTarget* ApplicationCommandTarget::findFirstTargetParentCompone
|
|||
Component* c = dynamic_cast <Component*> (this);
|
||||
|
||||
if (c != nullptr)
|
||||
// (unable to use the syntax findParentComponentOfClass <ApplicationCommandTarget> () because of a VC6 compiler bug)
|
||||
return c->findParentComponentOfClass ((ApplicationCommandTarget*) nullptr);
|
||||
return c->findParentComponentOfClass<ApplicationCommandTarget>();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,8 +74,7 @@ void MultiDocumentPanelWindow::updateOrder()
|
|||
|
||||
MultiDocumentPanel* MultiDocumentPanelWindow::getOwner() const noexcept
|
||||
{
|
||||
// (unable to use the syntax findParentComponentOfClass <MultiDocumentPanel> () because of a VC6 compiler bug)
|
||||
return findParentComponentOfClass ((MultiDocumentPanel*) nullptr);
|
||||
return findParentComponentOfClass<MultiDocumentPanel>();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -88,14 +87,9 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
~MDITabbedComponentInternal()
|
||||
{
|
||||
}
|
||||
|
||||
void currentTabChanged (int, const String&)
|
||||
{
|
||||
// (unable to use the syntax findParentComponentOfClass <MultiDocumentPanel> () because of a VC6 compiler bug)
|
||||
MultiDocumentPanel* const owner = findParentComponentOfClass ((MultiDocumentPanel*) nullptr);
|
||||
MultiDocumentPanel* const owner = findParentComponentOfClass<MultiDocumentPanel>();
|
||||
|
||||
if (owner != nullptr)
|
||||
owner->updateOrder();
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ private:
|
|||
PopupMenu::ItemComponent* itemUnderMouse = dynamic_cast <PopupMenu::ItemComponent*> (c);
|
||||
|
||||
if (itemUnderMouse == nullptr && c != nullptr)
|
||||
itemUnderMouse = c->findParentComponentOfClass ((PopupMenu::ItemComponent*) nullptr);
|
||||
itemUnderMouse = c->findParentComponentOfClass<PopupMenu::ItemComponent>();
|
||||
|
||||
if (itemUnderMouse != currentChild
|
||||
&& (isOver || (activeSubMenu == nullptr) || ! activeSubMenu->isVisible()))
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ String DragAndDropContainer::getCurrentDragDescription() const
|
|||
|
||||
DragAndDropContainer* DragAndDropContainer::findParentDragContainerFor (Component* c)
|
||||
{
|
||||
return c == nullptr ? nullptr : c->findParentComponentOfClass ((DragAndDropContainer*) nullptr);
|
||||
return c != nullptr ? c->findParentComponentOfClass<DragAndDropContainer>() : nullptr;
|
||||
}
|
||||
|
||||
bool DragAndDropContainer::shouldDropFilesWhenDraggedExternally (const DragAndDropTarget::SourceDetails&, StringArray&, bool&)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
for (int i = propertyComps.size(); --i >= 0;)
|
||||
propertyComps.getUnchecked(i)->setVisible (open);
|
||||
|
||||
PropertyPanel* const pp = findParentComponentOfClass ((PropertyPanel*) nullptr);
|
||||
PropertyPanel* const pp = findParentComponentOfClass<PropertyPanel>();
|
||||
|
||||
if (pp != nullptr)
|
||||
pp->resized();
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ void Toolbar::itemDragMove (const SourceDetails& dragSourceDetails)
|
|||
{
|
||||
if (tc->getEditingMode() == ToolbarItemComponent::editableOnPalette)
|
||||
{
|
||||
ToolbarItemPalette* const palette = tc->findParentComponentOfClass ((ToolbarItemPalette*) nullptr);
|
||||
ToolbarItemPalette* const palette = tc->findParentComponentOfClass<ToolbarItemPalette>();
|
||||
|
||||
if (palette != nullptr)
|
||||
palette->replaceComponent (tc);
|
||||
|
|
@ -789,7 +789,7 @@ private:
|
|||
{
|
||||
Colour background;
|
||||
|
||||
DialogWindow* const dw = findParentComponentOfClass ((DialogWindow*) nullptr);
|
||||
DialogWindow* const dw = findParentComponentOfClass<DialogWindow>();
|
||||
|
||||
if (dw != nullptr)
|
||||
background = dw->getBackgroundColour();
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ public:
|
|||
the DialogWindow that is created. To find a pointer to this window from your
|
||||
contentComponent, you can do something like this:
|
||||
@code
|
||||
Dialogwindow* dw = contentComponent->findParentComponentOfClass ((DialogWindow*) nullptr);
|
||||
Dialogwindow* dw = contentComponent->findParentComponentOfClass<DialogWindow>();
|
||||
|
||||
if (dw != nullptr)
|
||||
dw->exitModalState (1234);
|
||||
|
|
@ -130,7 +130,7 @@ public:
|
|||
the DialogWindow that is created. To find a pointer to this window from your
|
||||
contentComponent, you can do something like this:
|
||||
@code
|
||||
Dialogwindow* dw = contentComponent->findParentComponentOfClass ((DialogWindow*) nullptr);
|
||||
Dialogwindow* dw = contentComponent->findParentComponentOfClass<DialogWindow>();
|
||||
|
||||
if (dw != nullptr)
|
||||
dw->exitModalState (1234);
|
||||
|
|
|
|||
|
|
@ -55,8 +55,7 @@ public:
|
|||
TopLevelWindow* tlw = dynamic_cast <TopLevelWindow*> (c);
|
||||
|
||||
if (tlw == nullptr && c != nullptr)
|
||||
// (unable to use the syntax findParentComponentOfClass <TopLevelWindow> () because of a VC6 compiler bug)
|
||||
tlw = c->findParentComponentOfClass ((TopLevelWindow*) nullptr);
|
||||
tlw = c->findParentComponentOfClass<TopLevelWindow>();
|
||||
|
||||
if (tlw != nullptr)
|
||||
active = tlw;
|
||||
|
|
|
|||
|
|
@ -23,44 +23,67 @@
|
|||
==============================================================================
|
||||
*/
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
#define JUCE_DECLARE_GL_EXTENSION_FUNCTION(name, returnType, params, callparams) \
|
||||
typedef returnType (__stdcall *type_ ## name) params; static type_ ## name name = nullptr;
|
||||
#else
|
||||
#define JUCE_DECLARE_GL_EXTENSION_FUNCTION(name, returnType, params, callparams) \
|
||||
typedef returnType (*type_ ## name) params; static type_ ## name name = nullptr;
|
||||
#ifndef GL_CLAMP_TO_EDGE
|
||||
#define GL_CLAMP_TO_EDGE 0x812f
|
||||
#endif
|
||||
|
||||
#ifndef GL_NUM_EXTENSIONS
|
||||
#define GL_NUM_EXTENSIONS 0x821d
|
||||
#endif
|
||||
|
||||
#ifndef GL_BGRA_EXT
|
||||
#define GL_BGRA_EXT 0x80e1
|
||||
#endif
|
||||
|
||||
#ifndef GL_DEPTH24_STENCIL8
|
||||
#define GL_DEPTH24_STENCIL8 0x88F0
|
||||
#endif
|
||||
|
||||
#ifndef GL_RGBA8
|
||||
#define GL_RGBA8 GL_RGBA
|
||||
#endif
|
||||
|
||||
#if JUCE_ANDROID
|
||||
#define JUCE_RGBA_FORMAT GL_RGBA
|
||||
#else
|
||||
#define JUCE_RGBA_FORMAT GL_BGRA_EXT
|
||||
#endif
|
||||
|
||||
#ifndef GL_COLOR_ATTACHMENT0
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#endif
|
||||
|
||||
#ifndef GL_DEPTH_ATTACHMENT
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER_BINDING
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER_COMPLETE
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#endif
|
||||
|
||||
#ifndef GL_RENDERBUFFER
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#endif
|
||||
|
||||
#ifndef GL_RENDERBUFFER_DEPTH_SIZE
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#endif
|
||||
|
||||
#ifndef GL_STENCIL_ATTACHMENT
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#endif
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
namespace
|
||||
{
|
||||
#ifndef GL_BGRA_EXT
|
||||
enum { GL_BGRA_EXT = 0x80e1 };
|
||||
#endif
|
||||
|
||||
#ifndef GL_CLAMP_TO_EDGE
|
||||
enum { GL_CLAMP_TO_EDGE = 0x812f };
|
||||
#endif
|
||||
|
||||
#ifndef GL_NUM_EXTENSIONS
|
||||
enum { GL_NUM_EXTENSIONS = 0x821d };
|
||||
#endif
|
||||
|
||||
#ifndef GL_RGBA8
|
||||
#define GL_RGBA8 GL_RGBA
|
||||
#endif
|
||||
|
||||
#if (! defined (GL_DEPTH24_STENCIL8)) && ! JUCE_WINDOWS
|
||||
enum { GL_DEPTH24_STENCIL8 = 0x88F0 };
|
||||
#endif
|
||||
|
||||
#if JUCE_ANDROID
|
||||
enum { JUCE_RGBA_FORMAT = GL_RGBA };
|
||||
#else
|
||||
enum { JUCE_RGBA_FORMAT = GL_BGRA_EXT };
|
||||
#endif
|
||||
|
||||
|
||||
#if JUCE_WINDOWS
|
||||
enum
|
||||
{
|
||||
WGL_NUMBER_PIXEL_FORMATS_ARB = 0x2000,
|
||||
|
|
@ -107,7 +130,6 @@ namespace
|
|||
GL_SHADING_LANGUAGE_VERSION = 0x8B8C,
|
||||
GL_FRAGMENT_SHADER = 0x8B30,
|
||||
GL_VERTEX_SHADER = 0x8B31,
|
||||
GL_DEPTH24_STENCIL8 = 0x88F0,
|
||||
GL_ARRAY_BUFFER = 0x8892,
|
||||
GL_ELEMENT_ARRAY_BUFFER = 0x8893,
|
||||
GL_STATIC_DRAW = 0x88E4,
|
||||
|
|
@ -117,37 +139,5 @@ namespace
|
|||
typedef char GLchar;
|
||||
typedef pointer_sized_int GLsizeiptr;
|
||||
typedef pointer_sized_int GLintptr;
|
||||
#endif
|
||||
|
||||
#ifndef GL_COLOR_ATTACHMENT0
|
||||
#define GL_COLOR_ATTACHMENT0 0x8CE0
|
||||
#endif
|
||||
|
||||
#ifndef GL_DEPTH_ATTACHMENT
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER_BINDING
|
||||
#define GL_FRAMEBUFFER_BINDING 0x8CA6
|
||||
#endif
|
||||
|
||||
#ifndef GL_FRAMEBUFFER_COMPLETE
|
||||
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
|
||||
#endif
|
||||
|
||||
#ifndef GL_RENDERBUFFER
|
||||
#define GL_RENDERBUFFER 0x8D41
|
||||
#endif
|
||||
|
||||
#ifndef GL_RENDERBUFFER_DEPTH_SIZE
|
||||
#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
|
||||
#endif
|
||||
|
||||
#ifndef GL_STENCIL_ATTACHMENT
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -41,48 +41,22 @@ OpenGLPixelFormat::OpenGLPixelFormat (const int bitsPerRGBComponent,
|
|||
{
|
||||
}
|
||||
|
||||
OpenGLPixelFormat::OpenGLPixelFormat (const OpenGLPixelFormat& other) noexcept
|
||||
: redBits (other.redBits),
|
||||
greenBits (other.greenBits),
|
||||
blueBits (other.blueBits),
|
||||
alphaBits (other.alphaBits),
|
||||
depthBufferBits (other.depthBufferBits),
|
||||
stencilBufferBits (other.stencilBufferBits),
|
||||
accumulationBufferRedBits (other.accumulationBufferRedBits),
|
||||
accumulationBufferGreenBits (other.accumulationBufferGreenBits),
|
||||
accumulationBufferBlueBits (other.accumulationBufferBlueBits),
|
||||
accumulationBufferAlphaBits (other.accumulationBufferAlphaBits),
|
||||
multisamplingLevel (other.multisamplingLevel)
|
||||
{
|
||||
}
|
||||
|
||||
OpenGLPixelFormat& OpenGLPixelFormat::operator= (const OpenGLPixelFormat& other) noexcept
|
||||
{
|
||||
redBits = other.redBits;
|
||||
greenBits = other.greenBits;
|
||||
blueBits = other.blueBits;
|
||||
alphaBits = other.alphaBits;
|
||||
depthBufferBits = other.depthBufferBits;
|
||||
stencilBufferBits = other.stencilBufferBits;
|
||||
accumulationBufferRedBits = other.accumulationBufferRedBits;
|
||||
accumulationBufferGreenBits = other.accumulationBufferGreenBits;
|
||||
accumulationBufferBlueBits = other.accumulationBufferBlueBits;
|
||||
accumulationBufferAlphaBits = other.accumulationBufferAlphaBits;
|
||||
multisamplingLevel = other.multisamplingLevel;
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool OpenGLPixelFormat::operator== (const OpenGLPixelFormat& other) const noexcept
|
||||
{
|
||||
return redBits == other.redBits
|
||||
&& greenBits == other.greenBits
|
||||
&& blueBits == other.blueBits
|
||||
&& blueBits == other.blueBits
|
||||
&& alphaBits == other.alphaBits
|
||||
&& depthBufferBits == other.depthBufferBits
|
||||
&& stencilBufferBits == other.stencilBufferBits
|
||||
&& accumulationBufferRedBits == other.accumulationBufferRedBits
|
||||
&& accumulationBufferRedBits == other.accumulationBufferRedBits
|
||||
&& accumulationBufferGreenBits == other.accumulationBufferGreenBits
|
||||
&& accumulationBufferBlueBits == other.accumulationBufferBlueBits
|
||||
&& accumulationBufferBlueBits == other.accumulationBufferBlueBits
|
||||
&& accumulationBufferAlphaBits == other.accumulationBufferAlphaBits
|
||||
&& multisamplingLevel == other.multisamplingLevel;
|
||||
}
|
||||
|
||||
bool OpenGLPixelFormat::operator!= (const OpenGLPixelFormat& other) const noexcept
|
||||
{
|
||||
return ! operator== (other);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,9 +47,8 @@ public:
|
|||
int depthBufferBits = 16,
|
||||
int stencilBufferBits = 0) noexcept;
|
||||
|
||||
OpenGLPixelFormat (const OpenGLPixelFormat&) noexcept;
|
||||
OpenGLPixelFormat& operator= (const OpenGLPixelFormat&) noexcept;
|
||||
bool operator== (const OpenGLPixelFormat&) const noexcept;
|
||||
bool operator!= (const OpenGLPixelFormat&) const noexcept;
|
||||
|
||||
//==============================================================================
|
||||
int redBits; /**< The number of bits per pixel to use for the red channel. */
|
||||
|
|
@ -66,9 +65,6 @@ public:
|
|||
int accumulationBufferAlphaBits; /**< The number of bits per pixel to use for an accumulation buffer's alpha channel. */
|
||||
|
||||
uint8 multisamplingLevel; /**< The number of samples to use for full-scene multisampled anti-aliasing (if available). */
|
||||
|
||||
private:
|
||||
JUCE_LEAK_DETECTOR (OpenGLPixelFormat);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue