Browse Source

Minor clean-ups for GL, removed some old VC6 hacks.

tags/2021-05-28
jules 13 years ago
parent
commit
0e1b6061d5
27 changed files with 96 additions and 2098 deletions
  1. +2
    -0
      extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj
  2. +1
    -1
      extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp
  3. +2
    -2
      extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
  4. +3
    -3
      extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp
  5. +1
    -1
      extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp
  6. +1
    -1
      extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp
  7. +2
    -0
      extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj
  8. +2
    -0
      extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj
  9. +2
    -0
      extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj
  10. +2
    -0
      extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj
  11. +2
    -0
      extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj
  12. +0
    -1959
      extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj
  13. +0
    -8
      extras/static library/juce.jucer
  14. +2
    -0
      extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj
  15. +1
    -1
      modules/juce_core/maths/juce_Expression.cpp
  16. +1
    -2
      modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp
  17. +1
    -2
      modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp
  18. +2
    -8
      modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp
  19. +1
    -1
      modules/juce_gui_basics/menus/juce_PopupMenu.cpp
  20. +1
    -1
      modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp
  21. +1
    -1
      modules/juce_gui_basics/properties/juce_PropertyPanel.cpp
  22. +2
    -2
      modules/juce_gui_basics/widgets/juce_Toolbar.cpp
  23. +2
    -2
      modules/juce_gui_basics/windows/juce_DialogWindow.h
  24. +1
    -2
      modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp
  25. +52
    -62
      modules/juce_opengl/native/juce_MissingGLDefinitions.h
  26. +8
    -34
      modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp
  27. +1
    -5
      modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h

+ 2
- 0
extras/Introjucer/Builds/MacOSX/The Introjucer.xcodeproj/project.pbxproj View File

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


+ 1
- 1
extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp View File

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


+ 2
- 2
extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp View File

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


+ 3
- 3
extras/Introjucer/Source/Project/jucer_ProjectInformationComponent.cpp View File

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


+ 1
- 1
extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp View File

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


+ 1
- 1
extras/Introjucer/Source/Utility/jucer_MiscUtilities.cpp View File

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


+ 2
- 0
extras/JuceDemo/Builds/MacOSX/Juce Demo.xcodeproj/project.pbxproj View File

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


+ 2
- 0
extras/audio plugin demo/Builds/MacOSX/JuceDemoPlugin.xcodeproj/project.pbxproj View File

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


+ 2
- 0
extras/audio plugin host/Builds/MacOSX/Plugin Host.xcodeproj/project.pbxproj View File

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


+ 2
- 0
extras/binarybuilder/Builds/MacOSX/BinaryBuilder.xcodeproj/project.pbxproj View File

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


+ 2
- 0
extras/example projects/Builds/MacOSX/HelloWorld.xcodeproj/project.pbxproj View File

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


+ 0
- 1959
extras/static library/Builds/MacOSX/juce.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 0
- 8
extras/static library/juce.jucer View File

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


+ 2
- 0
extras/the jucer/Builds/MacOSX/Jucer.xcodeproj/project.pbxproj View File

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


+ 1
- 1
modules/juce_core/maths/juce_Expression.cpp View File

@@ -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(). */


+ 1
- 2
modules/juce_gui_basics/commands/juce_ApplicationCommandManager.cpp View File

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


+ 1
- 2
modules/juce_gui_basics/commands/juce_ApplicationCommandTarget.cpp View File

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


+ 2
- 8
modules/juce_gui_basics/layout/juce_MultiDocumentPanel.cpp View File

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


+ 1
- 1
modules/juce_gui_basics/menus/juce_PopupMenu.cpp View File

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


+ 1
- 1
modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp View File

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


+ 1
- 1
modules/juce_gui_basics/properties/juce_PropertyPanel.cpp View File

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


+ 2
- 2
modules/juce_gui_basics/widgets/juce_Toolbar.cpp View File

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


+ 2
- 2
modules/juce_gui_basics/windows/juce_DialogWindow.h View File

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


+ 1
- 2
modules/juce_gui_basics/windows/juce_TopLevelWindow.cpp View File

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


+ 52
- 62
modules/juce_opengl/native/juce_MissingGLDefinitions.h View File

@@ -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;
#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_DECLARE_GL_EXTENSION_FUNCTION(name, returnType, params, callparams) \
typedef returnType (*type_ ## name) params; static type_ ## name name = nullptr;
#define JUCE_RGBA_FORMAT GL_BGRA_EXT
#endif
namespace
{
#ifndef GL_BGRA_EXT
enum { GL_BGRA_EXT = 0x80e1 };
#endif
#ifndef GL_COLOR_ATTACHMENT0
#define GL_COLOR_ATTACHMENT0 0x8CE0
#endif
#ifndef GL_DEPTH_ATTACHMENT
#define GL_DEPTH_ATTACHMENT 0x8D00
#endif
#ifndef GL_CLAMP_TO_EDGE
enum { GL_CLAMP_TO_EDGE = 0x812f };
#endif
#ifndef GL_FRAMEBUFFER
#define GL_FRAMEBUFFER 0x8D40
#endif
#ifndef GL_NUM_EXTENSIONS
enum { GL_NUM_EXTENSIONS = 0x821d };
#endif
#ifndef GL_FRAMEBUFFER_BINDING
#define GL_FRAMEBUFFER_BINDING 0x8CA6
#endif
#ifndef GL_RGBA8
#define GL_RGBA8 GL_RGBA
#endif
#ifndef GL_FRAMEBUFFER_COMPLETE
#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
#endif
#if (! defined (GL_DEPTH24_STENCIL8)) && ! JUCE_WINDOWS
enum { GL_DEPTH24_STENCIL8 = 0x88F0 };
#endif
#ifndef GL_RENDERBUFFER
#define GL_RENDERBUFFER 0x8D41
#endif
#if JUCE_ANDROID
enum { JUCE_RGBA_FORMAT = GL_RGBA };
#else
enum { JUCE_RGBA_FORMAT = GL_BGRA_EXT };
#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
#if JUCE_WINDOWS
namespace
{
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

+ 8
- 34
modules/juce_opengl/opengl/juce_OpenGLPixelFormat.cpp View File

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

+ 1
- 5
modules/juce_opengl/opengl/juce_OpenGLPixelFormat.h View File

@@ -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…
Cancel
Save