[Vm-dev] [commit][3209] Add iOS platform.
commits at squeakvm.org
commits at squeakvm.org
Tue Jan 6 22:06:18 UTC 2015
Revision: 3209
Author: eliot
Date: 2015-01-06 14:06:13 -0800 (Tue, 06 Jan 2015)
Log Message:
-----------
Add iOS platform.
Set ignore propertirs on history dir.
Added Paths:
-----------
branches/Cog/platforms/iOS/
branches/Cog/platforms/iOS/plugins/
branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/
branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c
branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h
branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c
branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacUIConstants.h
branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/
branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h
branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m
branches/Cog/platforms/iOS/plugins/CroquetPlugin/
branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.c
branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/
branches/Cog/platforms/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist
branches/Cog/platforms/iOS/plugins/FT2Plugin/PkgInfo
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftheader.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftmodule.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftoption.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftstdlib.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/freetype.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftadvanc.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftbbox.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftbdf.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftbitmap.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftcache.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftchapters.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftcid.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/fterrdef.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/fterrors.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftgasp.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftglyph.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftgxval.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftgzip.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftimage.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftincrem.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftlcdfil.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftlist.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftlzw.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftmac.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftmm.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftmodapi.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftmoderr.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftotval.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftoutln.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftpfr.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftrender.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftsizes.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftsnames.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftstroke.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftsynth.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftsystem.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/fttrigon.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/fttypes.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftwinfnt.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ftxf86.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/t1tables.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ttnameid.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/tttables.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/tttags.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/ttunpat.h
branches/Cog/platforms/iOS/plugins/FT2Plugin/macFileNameBits.c
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Error_Handler.c
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Error_Handler.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Name_Lookup.c
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Name_Lookup.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.c
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Queue_Utilities.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Utilities.c
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Utilities.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Utilities_External.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/HID_Utilities_Internal.h
branches/Cog/platforms/iOS/plugins/JoystickTabletPlugin/sqMacJoystickAndTablet.c
branches/Cog/platforms/iOS/plugins/LocalePlugin/
branches/Cog/platforms/iOS/plugins/LocalePlugin/sqIOSLocale.c
branches/Cog/platforms/iOS/plugins/LocalePlugin/sqIOSLocale.h
branches/Cog/platforms/iOS/plugins/MIDIPlugin/
branches/Cog/platforms/iOS/plugins/MIDIPlugin/sqMacMIDI.m
branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/
branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.h
branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenuOS9ToOSX.m
branches/Cog/platforms/iOS/plugins/MacMenubarPlugin/MacMenubarPlugin.h
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBuffer.1.cs
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegBufferTest.1.cs
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/changesetsForInMemoryBuffer/JMMMpegPluginBuffer.1.cs
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/sqMacFileBits.c
branches/Cog/platforms/iOS/plugins/Mpeg3Plugin/sqMacFileBits.h
branches/Cog/platforms/iOS/plugins/SecurityPlugin/
branches/Cog/platforms/iOS/plugins/SecurityPlugin/sqMacSecurity.c
branches/Cog/platforms/iOS/plugins/SerialPlugin/
branches/Cog/platforms/iOS/plugins/SerialPlugin/sqMacSerialPort.c
branches/Cog/platforms/iOS/plugins/SoundPlugin/
branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.h
branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudio.m
branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.h
branches/Cog/platforms/iOS/plugins/SoundPlugin/sqSqueakSoundCoreAudioAPI.m
branches/Cog/platforms/iOS/plugins/SqueakFFIPrims/
branches/Cog/platforms/iOS/plugins/SqueakFFIPrims/dummyFFI.c
branches/Cog/platforms/iOS/plugins/SqueakFFIPrims/dummyFFI.h
branches/Cog/platforms/iOS/plugins/SqueakLocale/
branches/Cog/platforms/iOS/plugins/SqueakLocale/Info-SqueakLocalePlugin__Upgraded_.plist
branches/Cog/platforms/iOS/plugins/SqueakLocale/sqMacLocaleCocoa.h
branches/Cog/platforms/iOS/plugins/SqueakLocale/sqMacLocaleCocoa.m
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/Info.plist
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/PDColoredProgressView.h
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/PDColoredProgressView.m
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/SqueakObjectiveC.xcodeproj.zip
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/drawing.m
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.h
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakProxy.m
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakSUnitTester.h
branches/Cog/platforms/iOS/plugins/SqueakObjectiveC/squeakSUnitTester.m
branches/Cog/platforms/iOS/plugins/SqueakSSL/
branches/Cog/platforms/iOS/plugins/SqueakSSL/sqMacSSL.c
branches/Cog/platforms/iOS/plugins/UUIDPlugin/
branches/Cog/platforms/iOS/plugins/UUIDPlugin/sqMacUUID.c
branches/Cog/platforms/iOS/plugins/UnixOSProcessPlugin/
branches/Cog/platforms/iOS/plugins/UnixOSProcessPlugin/Info.plist
branches/Cog/platforms/iOS/plugins/UnixOSProcessPlugin/PkgInfo
branches/Cog/platforms/iOS/vm/
branches/Cog/platforms/iOS/vm/Common/
branches/Cog/platforms/iOS/vm/Common/Classes/
branches/Cog/platforms/iOS/vm/Common/Classes/Queue.h
branches/Cog/platforms/iOS/vm/Common/Classes/Queue.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqMacV2Time.c
branches/Cog/platforms/iOS/vm/Common/Classes/sqMacV2Time.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAppDelegate.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakAttributesAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakCursorAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakCursorAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakEventsAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakEventsAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakFileDirectoryInterface.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakInfoPlistInterface.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApp.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApp.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+attributes.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+cursor.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+cursor.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+events.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+imageReadWrite.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+screen.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+screen.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+sound.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+sound.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication+vmAndImagePath.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakMainApplication.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakScreenAndWindow.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakSoundAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakSoundAPI.m
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.h
branches/Cog/platforms/iOS/vm/Common/Classes/sqSqueakVmAndImagePathAPI.m
branches/Cog/platforms/iOS/vm/Common/main.m
branches/Cog/platforms/iOS/vm/OSX/
branches/Cog/platforms/iOS/vm/OSX/BitMapConversionLogicFromX11.c
branches/Cog/platforms/iOS/vm/OSX/BitMapConversionLogicFromX11.h
branches/Cog/platforms/iOS/vm/OSX/Credits.rtf
branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.h
branches/Cog/platforms/iOS/vm/OSX/SqViewBitmapConversion.m
branches/Cog/platforms/iOS/vm/OSX/SqViewClut.h
branches/Cog/platforms/iOS/vm/OSX/SqViewClut.m
branches/Cog/platforms/iOS/vm/OSX/Squeak.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakChanges.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakGeneric.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakImage.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.h
branches/Cog/platforms/iOS/vm/OSX/SqueakOSXAppDelegate.m
branches/Cog/platforms/iOS/vm/OSX/SqueakOSXApplication.h
branches/Cog/platforms/iOS/vm/OSX/SqueakOSXApplication.m
branches/Cog/platforms/iOS/vm/OSX/SqueakPlugin.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakProject.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakScript.icns
branches/Cog/platforms/iOS/vm/OSX/SqueakSources.icns
branches/Cog/platforms/iOS/vm/OSX/dtraceOperationsPerSecond.d
branches/Cog/platforms/iOS/vm/OSX/dtracedrawrecttiming.d
branches/Cog/platforms/iOS/vm/OSX/keyBoardStrokeDetails.h
branches/Cog/platforms/iOS/vm/OSX/keyBoardStrokeDetails.m
branches/Cog/platforms/iOS/vm/OSX/macintoshosxextra.c
branches/Cog/platforms/iOS/vm/OSX/macintoshosxextra.h
branches/Cog/platforms/iOS/vm/OSX/plugins/
branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/
branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.h
branches/Cog/platforms/iOS/vm/OSX/plugins/HostWindowPlugin/sqMacHostWindow.m
branches/Cog/platforms/iOS/vm/OSX/plugins/SoundPlugin/
branches/Cog/platforms/iOS/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.h
branches/Cog/platforms/iOS/vm/OSX/plugins/SoundPlugin/sqSqueakOSXSoundCoreAudio.m
branches/Cog/platforms/iOS/vm/OSX/sqMacUnixExternalPrims.m
branches/Cog/platforms/iOS/vm/OSX/sqMacV2Browser.h
branches/Cog/platforms/iOS/vm/OSX/sqMacV2Browser.m
branches/Cog/platforms/iOS/vm/OSX/sqMacV2Window.h
branches/Cog/platforms/iOS/vm/OSX/sqMacV2Window.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakMainApplication+screen.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakMainApplication+screen.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+attributes.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+clipboard.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+cursor.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+events.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication+imageReadWrite.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXApplication.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXCGView.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXClipboardAPI.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXClipboardAPI.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXDropAPI.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXFileDirectoryInterface.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXInfoPlistInterface.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXInfoPlistInterface.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXOpenGLView.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.h
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXScreenAndWindow.m
branches/Cog/platforms/iOS/vm/OSX/sqSqueakOSXView.h
branches/Cog/platforms/iOS/vm/iPhone/
branches/Cog/platforms/iOS/vm/iPhone/Classes/
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakNoOGLIPhoneAppDelegate.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIController.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIController.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIView.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIView.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIViewCALayer.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIViewCALayer.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIViewOpenGL.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIViewOpenGL.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/SqueakUIViewOpenGLAlternate.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+Network.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+attributes.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+clipboard.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+events.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+imageReadWrite.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication+sound.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneApplication.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneClipboardAPI.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneFileDirectoryInterface.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakIPhoneInfoPlistInterface.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqSqueakiPhoneApplication+sound.m
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqiPhoneScreenAndWindow.h
branches/Cog/platforms/iOS/vm/iPhone/Classes/sqiPhoneScreenAndWindow.m
branches/Cog/platforms/iOS/vm/iPhone/Info-iPhone.plist
branches/Cog/platforms/iOS/vm/iPhone/config.h
branches/Cog/platforms/iOS/vm/iPhone/macintoshextra.c
branches/Cog/platforms/iOS/vm/iPhone/macintoshextra.h
branches/Cog/platforms/iOS/vm/iPhone/osExports.c
branches/Cog/platforms/iOS/vm/iPhone/plugins/
branches/Cog/platforms/iOS/vm/iPhone/plugins/ClipboardExtended/
branches/Cog/platforms/iOS/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.h
branches/Cog/platforms/iOS/vm/iPhone/plugins/ClipboardExtended/sqMacExtendedClipboard.m
branches/Cog/platforms/iOS/vm/iPhone/plugins/HostWindowPlugin/
branches/Cog/platforms/iOS/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.h
branches/Cog/platforms/iOS/vm/iPhone/plugins/HostWindowPlugin/sqMacHostWindow.m
branches/Cog/platforms/iOS/vm/iPhone/plugins/IOSPlugin/
branches/Cog/platforms/iOS/vm/iPhone/plugins/IOSPlugin/sqTouch.m
branches/Cog/platforms/iOS/vm/iPhone/plugins/SqueakFFIPrims/
branches/Cog/platforms/iOS/vm/iPhone/plugins/SqueakFFIPrims/dummyFFI.c
branches/Cog/platforms/iOS/vm/iPhone/plugins/SqueakFFIPrims/dummyFFI.h
branches/Cog/platforms/iOS/vm/iPhone/sqConfig.h
branches/Cog/platforms/iOS/vm/iPhone/sqDummyaio.c
branches/Cog/platforms/iOS/vm/iPhone/sqDummyaio.h
branches/Cog/platforms/iOS/vm/iPhone/sqMacUnixExternalPrims.m
branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.c
branches/Cog/platforms/iOS/vm/iPhone/sqMacV2Memory.h
branches/Cog/platforms/iOS/vm/iPhone/sqPlatformSpecific.h
Property Changed:
----------------
branches/Cog/history/
Property changes on: branches/Cog/history
___________________________________________________________________
Added: svn:ignore
+ README.*
Added: branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c
===================================================================
--- branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c (rev 0)
+++ branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.c 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,725 @@
+/****************************************************************************
+* PROJECT: Squeak 3D accelerator
+* FILE: sqMacOpenGL.c
+* CONTENT: MacOS specific bindings for OpenGL
+*
+* AUTHOR: Andreas Raab (ar)
+* ADDRESS: Walt Disney Imagineering, Glendale, CA
+* EMAIL: Andreas.Raab at disney.com
+* RCSID: $Id: sqMacOpenGL.c 1367 2006-03-21 06:49:10Z johnmci $
+*
+* NOTES:
+*
+* Changes May 14th 2001 John M McIntosh Carbon support
+* Changes Jun 2001 JMM browser internal plugin support
+* Changes Jan 2002 JMM carbon cleanup
+* Feb 26th, 2002, JMM - use carbon get dominate device
+* Apr 3rd, 2003, JMM - use BROWSERPLUGIN
+*
+*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <Carbon/Carbon.h>
+#include <unistd.h>
+#include <AGL/agl.h>
+#ifdef MAC_OS_X_VERSION_10_7
+#include <OpenGL/gl.h>
+#define useTempMem (1L << 2) //This declaration is taken from old sdk definition.
+#else
+#include <AGL/gl.h>
+#endif
+#include <OpenGL/OpenGL.h>
+/* Do not include the entire sq.h file but just those parts needed. */
+/* The virtual machine proxy definition */
+#include "sqVirtualMachine.h"
+/* Configuration options */
+#include "sqConfig.h"
+/* Platform specific definitions */
+#include "sqPlatformSpecific.h"
+#include "sqMacUIConstants.h"
+#include "B3DAcceleratorPlugin.h"
+#include "sqMacOpenGL.h"
+#include "sqOpenGLRenderer.h"
+
+#define INTERNAL
+
+#ifdef BROWSERPLUGIN
+#include "npapi.h"
+#endif
+
+int printRendererInfo(void);
+int printFormatInfo(AGLPixelFormat info);
+
+static glRenderer *current = NULL;
+static glRenderer allRenderer[MAX_RENDERER];
+typedef int (*eventMessageHook)(EventRecord* event);
+
+#ifdef INTERNAL
+#ifdef BROWSERPLUGIN
+int gPortX,gPortY;
+extern NP_Port *getNP_Port(void);
+#endif
+void StartDraw(void);
+void EndDraw(void);
+extern WindowPtr getSTWindow(void);
+extern int setMessageHook(eventMessageHook theHook);
+extern int setPostMessageHook(eventMessageHook theHook);
+extern GDHandle getDominateDevice(WindowPtr theWindow,Rect *windRect);
+#else
+typedef WindowPtr (*getSTWindowFn)(void);
+getSTWindowFn getSTWindow = 0;
+eventMessageHook setMessageHook = 0;
+#endif
+
+
+/* Verbose level for debugging purposes:
+ 0 - print NO information ever
+ 1 - print critical debug errors
+ 2 - print debug warnings
+ 3 - print extra information
+ 4 - print extra warnings
+ 5 - print information about primitive execution
+
+ 10 - print information about each vertex and face
+*/
+extern int verboseLevel;
+/* define forceFlush if we should fflush() before closing file */
+#define forceFlush 1
+
+//#include "sqMacFileLogic.h"
+
+/* Note: Print this stuff into a file in case we lock up*/
+#undef DPRINTF3D
+# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\
+ char fileName[DOCUMENT_NAME_SIZE+1]; \
+ sqFilenameFromStringOpen(fileName,(sqInt) &"Squeak3D.log", strlen("Squeak3D.log")); \
+ FILE *fp = fopen(fileName, "at");\
+ if(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}
+
+/* Plugin refs */
+extern struct VirtualMachine *interpreterProxy;
+static float blackLight[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Mac event hook */
+/*****************************************************************************/
+/*****************************************************************************/
+
+static int macEventHook(EventRecord *event) {
+ AGLDrawable win;
+ int result;
+ int i,windowCode;
+ Boolean windowHasChanged=false;
+ WindowPtr checkMouseDown,checkMouseUp;
+ static WindowPtr oldWindow = NULL;
+
+#ifdef BROWSERPLUGIN
+ NP_Port *anNPPort;
+
+#endif
+
+ if (oldWindow == NULL)
+ oldWindow = getSTWindow();
+
+ result = 0;
+ switch(event->what) {
+ case osEvt:
+ if (((event->message>>24)& 0xFF) != suspendResumeMessage) return 0;
+ DPRINTF3D(5, (fp, "<Mac event: suspendResumeMessage>\n"));
+ break;
+ case activateEvt:
+ DPRINTF3D(5, (fp, "<Mac event: activateEvt>\n"));
+ break;
+ case updateEvt:
+ DPRINTF3D(5, (fp, "<Mac event: updateEvt>\n"));
+ break;
+ case mouseDown:
+ DPRINTF3D(5, (fp, "<Mac event: mouseDown>\n"));
+ windowCode = FindWindow(event->where, &checkMouseDown);
+ if (windowCode == inContent)
+ return 0;
+
+ break;
+ case mouseUp:
+ DPRINTF3D(5, (fp, "<Mac event: mouseUp>\n"));
+ windowCode = FindWindow(event->where, &checkMouseUp);
+ if (windowCode == inContent)
+ return 0;
+
+ break;
+ default:
+ #ifdef BROWSERPLUGIN
+ if (oldWindow != getSTWindow()) {
+ windowHasChanged = true;
+ }
+
+ anNPPort = getNP_Port();
+ if (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {
+ windowHasChanged = true;
+ }
+
+ if (windowHasChanged)
+ break;
+ #endif
+
+ return 0;
+
+ }
+ win = (AGLDrawable) getSTWindow();
+ if(!win) return 0;
+ for(i=0; i< MAX_RENDERER; i++) {
+ glRenderer *renderer = allRenderer+i;
+ if(renderer->used) {
+ if (renderer->drawable == win || (WindowPtr) renderer->drawable == oldWindow) {
+ int x,y,w,h;
+ Rect portRect;
+ GLint bufferRect[4];
+ CGrafPtr windowPort;
+
+ #ifdef BROWSERPLUGIN
+ StartDraw();
+ anNPPort = getNP_Port();
+ gPortX = anNPPort->portx;
+ gPortY = anNPPort->porty;
+ x = renderer->bufferRect[0] - gPortX;
+ y = renderer->bufferRect[1] - gPortY;
+ #else
+ x = renderer->bufferRect[0];
+ y = renderer->bufferRect[1];
+ #endif
+ w = renderer->bufferRect[2];
+ h = renderer->bufferRect[3];
+
+ windowPort = GetWindowPort((WindowPtr)win);
+ GetPortBounds(windowPort,&portRect);
+
+ bufferRect[0] = x;
+ bufferRect[1] = portRect.bottom - portRect.top - (y+h);
+ bufferRect[2] = w;
+ bufferRect[3] = h;
+
+ // aglSetDrawable(renderer->context,nil);
+ renderer->drawable = (AGLDrawable) win;
+ aglSetDrawable(renderer->context,windowPort);
+ aglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);
+ aglUpdateContext(renderer->context);
+ windowHasChanged = false;
+ #ifdef BROWSERPLUGIN
+ EndDraw();
+ #endif
+ }
+ }
+ }
+ oldWindow = getSTWindow();
+ return result;
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/* Renderer creation primitives */
+/*****************************************************************************/
+/*****************************************************************************/
+
+int glDestroyRenderer(int handle)
+{
+ glRenderer *renderer = glRendererFromHandle(handle);
+
+ if(!renderer) return 1; /* already destroyed */
+
+ /* Now really destroy the renderer */
+ if(renderer->drawable) {
+ /* was a direct drawable */
+ aglSetDrawable(renderer->context, NULL);
+ }
+ if(renderer == current)
+ glMakeCurrentRenderer(NULL);
+ aglDestroyContext(renderer->context);
+ if(renderer->gWorld) {
+ UnlockPixels(renderer->pixMap);
+ DisposeGWorld(renderer->gWorld);
+ }
+ renderer->context = (AGLContext) NULL;
+ renderer->drawable = (AGLDrawable) NULL;
+ renderer->gWorld = NULL;
+ renderer->used = 0;
+ return 1;
+}
+
+/*
+ * Is ARB_Multisample supported?
+ */
+static int glHasARBMultisampling () {
+
+ /* We need an open gl connection in which to test for extensions,
+ * so we setup a throwaway context.
+ */
+ GLint attrib[] = { AGL_RGBA, AGL_NONE};
+ AGLContext ctx;
+ AGLPixelFormat fmt = aglChoosePixelFormat(NULL, 0, attrib);
+
+ if (! fmt) { return 0; }
+ ctx = aglCreateContext(fmt, NULL);
+ aglDestroyPixelFormat(fmt);
+ if (! ctx) {
+ return 0;
+ }
+ aglSetCurrentContext(ctx);
+ int result = gluCheckExtension((const GLubyte*) "GL_ARB_multisample", glGetString(GL_EXTENSIONS));
+ aglDestroyContext(ctx);
+
+ return result;
+}
+
+
+int glCreateRendererFlags(int x, int y, int w, int h, int flags)
+{
+ int index, i, allowSoftware, allowHardware;
+ GLint hwAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_DOUBLEBUFFER, AGL_ACCELERATED, AGL_DEPTH_SIZE, 16,
+ AGL_SAMPLE_BUFFERS_ARB, 1, AGL_SAMPLES_ARB, 4, AGL_MULTISAMPLE, AGL_NO_RECOVERY, AGL_NONE};
+ /* Note - we honor antialiasing requests only for hardware renderers. */
+ GLint swAttrib[] = { AGL_STENCIL_SIZE, 0, AGL_RGBA, AGL_PIXEL_SIZE, 0, AGL_OFFSCREEN, AGL_DEPTH_SIZE, 16, AGL_NONE };
+ AGLPixelFormat fmt;
+ AGLContext ctx;
+ GLboolean ok;
+ GLenum err;
+ AGLDrawable win;
+ glRenderer *renderer;
+ char *string;
+ GDHandle tempGDH;
+ Rect ignore;
+ long swapInterval = 0;
+
+ #define SUPPORTED_FLAGS (B3D_HARDWARE_RENDERER | B3D_SOFTWARE_RENDERER | B3D_STENCIL_BUFFER | B3D_ANTIALIASING | B3D_STEREO | B3D_SYNCVBL)
+ if(flags & ~SUPPORTED_FLAGS) {
+ DPRINTF3D(1, (fp, "ERROR: Unsupported renderer flags (%d)\n", flags));
+ return -1;
+ }
+ #undef SUPPORTED_FLAGS
+
+ /* interpret renderer flags */
+ allowSoftware = (flags & B3D_SOFTWARE_RENDERER) != 0;
+ allowHardware = (flags & B3D_HARDWARE_RENDERER) != 0;
+ if(flags & B3D_STENCIL_BUFFER) {
+ hwAttrib[1] = 1;
+ swAttrib[1] = 1;
+ }
+
+ /* enable/disable stereo requests */
+ if(flags & B3D_STEREO) {
+ return -1; /* not supported for now */
+ }
+
+ /* Suppress the multisampling flags if antialiasing is not requested (or not supported.) */
+ if (! ((flags & B3D_ANTIALIASING) && glHasARBMultisampling())) {
+ hwAttrib[7] = AGL_NONE;
+ }
+
+ for(index=0; index < MAX_RENDERER; index++) {
+ if(allRenderer[index].used == 0) break;
+ }
+ if(index >= MAX_RENDERER) {
+ DPRINTF3D(1, (fp, "ERROR: Maximum number of renderers (%d) exceeded\n", MAX_RENDERER));
+ return 0;
+ }
+ renderer = allRenderer+index;
+ renderer->used = 0;
+ renderer->finished = 0;
+ renderer->context = NULL;
+ renderer->drawable = NULL;
+ renderer->gWorld = NULL;
+
+#ifdef INTERNAL
+ if (! getSTWindow()) {
+ return 0;
+ }
+ GetWindowGreatestAreaDevice(getSTWindow(),kWindowContentRgn,&tempGDH,&ignore);
+ if (tempGDH == nil)
+ return -1;
+ swAttrib[2] = (*(*tempGDH)->gdPMap)->pixelSize;
+#else
+ swAttrib[2] = (*(*GetMainDevice())->gdPMap)->pixelSize;
+#endif
+ if(swAttrib[2] < 16) swAttrib[2] = 16;
+
+ /* Choose an rgb pixel format */
+ for(i = 0; i<2; i++) {
+ if( (i == 0) && !allowHardware) continue;
+ if( (i == 1) && !allowSoftware) continue;
+ ctx = 0;
+ if(i == 0) {
+ DPRINTF3D(3, (fp, "### Attempting to find hardware renderer\n"));
+ win = (AGLDrawable) getSTWindow();
+ if(!win) {
+ DPRINTF3D(1, (fp, "ERROR: stWindow is invalid (NULL)\n"));
+ goto FAILED;
+ }
+ fmt = aglChoosePixelFormat(NULL, 0, hwAttrib);
+ } else {
+ DPRINTF3D(3, (fp, "### Attempting to find software renderer\n"));
+ win = NULL;
+ fmt = aglChoosePixelFormat(NULL, 0, swAttrib);
+ }
+ DPRINTF3D(3, (fp,"\tx: %d\n\ty: %d\n\tw: %d\n\th: %d\n", x, y, w, h));
+
+ if((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,"aglGetError - %s\n", aglErrorString(err)));
+ if(fmt == NULL) {
+ DPRINTF3D(1, (fp, "ERROR: aglChoosePixelFormat failed\n"));
+ goto FAILED;
+ }
+
+ printFormatInfo(fmt);
+
+ /* Create an AGL context */
+ ctx = aglCreateContext(fmt, NULL);
+ if((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,"aglGetError - %s\n", aglErrorString(err)));
+ /* The pixel format is no longer needed */
+ aglDestroyPixelFormat(fmt);
+ if(ctx == NULL) {
+ DPRINTF3D(1, (fp, "ERROR: aglCreateContext failed\n"));
+ goto FAILED;
+ }
+
+ if(i == 0) {
+ GLint bufferRect[4];
+ Rect portRect;
+
+#ifdef BROWSERPLUGIN
+
+ NP_Port *anNPPort;
+
+ StartDraw();
+ win = (AGLDrawable) getSTWindow();
+ anNPPort = getNP_Port();
+
+ GetPortBounds(GetWindowPort((WindowPtr)win),&portRect);
+ bufferRect[0] = x - anNPPort->portx;
+ bufferRect[1] = portRect.bottom - portRect.top - (y+h) + anNPPort->porty;
+ bufferRect[2] = w;
+ bufferRect[3] = h;
+ EndDraw();
+#else
+ GetPortBounds(GetWindowPort((WindowPtr)win),&portRect);
+ bufferRect[0] = x;
+ bufferRect[1] = portRect.bottom - portRect.top - (y+h);
+ bufferRect[2] = w;
+ bufferRect[3] = h;
+#endif
+
+ /* hardware renderer; attach buffer rect and window */
+ ok = aglEnable(ctx, AGL_BUFFER_RECT);
+ if((err = aglGetError()) != AGL_NO_ERROR)
+ DPRINTF3D(3,(fp,"aglEnable(AGL_BUFFER_RECT) failed: aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) goto FAILED;
+ ok = aglSetInteger(ctx, AGL_BUFFER_RECT, bufferRect);
+ if((err = aglGetError()) != AGL_NO_ERROR)
+ DPRINTF3D(3,(fp,"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) goto FAILED;
+ /* Attach the context to the target */
+ ok = aglSetDrawable(ctx,GetWindowPort( (WindowPtr)win));
+ if((err = aglGetError()) != AGL_NO_ERROR)
+ DPRINTF3D(3,(fp,"aglSetDrawable() failed: aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) goto FAILED;
+ renderer->drawable = (AGLDrawable) win;
+
+ /* Set VBL SYNC if requested */
+ if(flags & B3D_SYNCVBL) swapInterval = 1;
+ aglSetInteger(ctx, AGL_SWAP_INTERVAL, &swapInterval);
+
+ } else {
+ /* software renderer; attach offscreen buffer to context */
+ Rect rect;
+ QDErr qdErr;
+
+ renderer->depth = swAttrib[2];
+ /* Create the offscreen gworld */
+ SetRect(&rect, 0, 0, w, h);
+ qdErr = NewGWorld(&renderer->gWorld, (short) renderer->depth, &rect, NULL, NULL, useTempMem);
+ if(qdErr || !renderer->gWorld) {
+ DPRINTF3D(1,(fp,"ERROR: Failed to create new GWorld\n"));
+ renderer->gWorld = NULL;
+ goto FAILED;
+ }
+ renderer->pixMap = GetGWorldPixMap(renderer->gWorld);
+ LockPixels(renderer->pixMap);
+ renderer->pitch = (**(renderer->pixMap)).rowBytes & 0x7FFF;
+ renderer->bits = (unsigned char*) GetPixBaseAddr(renderer->pixMap);
+ ok = aglSetOffScreen(ctx, w, h, renderer->pitch, renderer->bits);
+ if((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,"aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) {
+ DPRINTF3D(1, (fp, "ERROR: aglSetOffScreen failed\n"));
+ goto FAILED;
+ }
+ }
+ renderer->context = ctx;
+ renderer->used = 1;
+ renderer->finished = 0;
+ renderer->bufferRect[0] = x;
+ renderer->bufferRect[1] = y;
+ renderer->bufferRect[2] = w;
+ renderer->bufferRect[3] = h;
+
+ /* Make the context the current context */
+ glMakeCurrentRenderer(renderer);
+
+ /* finally, try to enable multithreaded OpenGL */
+ if (0) /* disable it, because it's broken */
+ {
+ CGLContextObj cglContext = CGLGetCurrentContext();
+ CGLError cglErr = CGLEnable( cglContext, kCGLCEMPEngine);
+ if (cglErr != kCGLNoError ) {
+ DPRINTF3D(3,(fp,"CGLEnable(kCGLCEMPEngine) failed: cannot set multithreaded OpenGL\n"));
+ exit(0);
+ }
+ }
+
+ /* print some information about the context */
+ string = (char*) glGetString(GL_VENDOR);
+ DPRINTF3D(3,(fp, "\nOpenGL vendor: %s\n", string));
+ string = (char*) glGetString(GL_RENDERER);
+ DPRINTF3D(3,(fp, "OpenGL renderer: %s\n", string));
+ string = (char*) glGetString(GL_VERSION);
+ DPRINTF3D(3,(fp, "OpenGL version: %s\n", string));
+ string = (char*) glGetString(GL_EXTENSIONS);
+ DPRINTF3D(3,(fp, "OpenGL extensions: %s\n", string));
+ ERROR_CHECK;
+
+ DPRINTF3D(3, (fp,"### Renderer created! (id = %d)\n", index));
+ /* setup user context */
+ glDisable(GL_LIGHTING);
+ glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_BLEND);
+ glDisable(GL_ALPHA_TEST);
+ glEnable(GL_DITHER);
+ glEnable(GL_DEPTH_TEST);
+ glEnable(GL_NORMALIZE);
+ glDepthFunc(GL_LEQUAL);
+ glClearDepth(1.0);
+ glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+ glShadeModel(GL_SMOOTH);
+ glLightModelfv(GL_LIGHT_MODEL_AMBIENT, blackLight);
+ ERROR_CHECK;
+
+ return index;
+FAILED:
+ if(ctx) aglDestroyContext(ctx);
+ if(renderer->gWorld) DisposeGWorld(renderer->gWorld);
+ }
+ return -1;
+}
+
+/*****************************************************************************/
+/*****************************************************************************/
+
+int glGetIntPropertyOS(int handle, int prop)
+{
+ GLint v;
+ glRenderer *renderer = glRendererFromHandle(handle);
+ if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;
+
+ switch(prop) {
+ case -1: /* vertical blank synchronization */
+ aglGetInteger(renderer->context, AGL_SWAP_INTERVAL, &v);
+ return v;
+ }
+ return 0;
+}
+
+int glSetIntPropertyOS(int handle, int prop, int value)
+{
+ glRenderer *renderer = glRendererFromHandle(handle);
+ if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;
+
+ switch(prop) {
+ case -1: /* vertical blank synchronization */
+ aglSetInteger(renderer->context, AGL_SWAP_INTERVAL, (GLint*) &value);
+ return 1;
+ }
+ return 0;
+}
+
+
+glRenderer *glRendererFromHandle(int handle) {
+ DPRINTF3D(7, (fp, "Looking for renderer id: %d\n", handle));
+ if(handle < 0 || handle >= MAX_RENDERER) return NULL;
+ if(allRenderer[handle].used) return allRenderer+handle;
+ return NULL;
+}
+
+int glSwapBuffers(glRenderer *renderer) {
+ GLint err;
+
+ if(!renderer) return 0;
+ if(!renderer->used || !renderer->context) return 0;
+ if(renderer->drawable) {
+#ifdef BROWSERPLUGIN
+ NP_Port *anNPPort;
+
+ anNPPort = getNP_Port();
+ if (!(anNPPort->portx == gPortX && anNPPort->porty == gPortY)) {
+ return 0;
+ }
+#endif
+ aglSwapBuffers(renderer->context);
+ if((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,"ERROR (glSwapBuffers): aglGetError - %s\n", aglErrorString(err)));
+ ERROR_CHECK;
+ } else {
+ WindowPtr win;
+ Rect src, dst, portBounds;
+ GrafPtr oldPort,winPort;
+ Boolean portChanged;
+
+ /* ensure execution for offscreen contexts */
+ glFinish();
+ ERROR_CHECK;
+ /* Copy the image to the window */
+
+ win = getSTWindow();
+ if(!win) return 0;
+
+ winPort = (GrafPtr) GetWindowPort((WindowRef) win);
+#ifdef BROWSERPLUGIN
+ StartDraw();
+#else
+ portChanged = QDSwapPort(winPort, &oldPort);
+ GetPortBounds((CGrafPtr) winPort,&portBounds);
+
+// Draw into the new port here
+
+#endif
+ SetRect(&src, 0, 0, renderer->bufferRect[2], renderer->bufferRect[3]);
+ SetRect(&dst, renderer->bufferRect[0], renderer->bufferRect[1],
+ renderer->bufferRect[0] + renderer->bufferRect[2],
+ renderer->bufferRect[1] + renderer->bufferRect[3]);
+ CopyBits(GetPortBitMapForCopyBits(renderer->gWorld), GetPortBitMapForCopyBits((CGrafPtr) winPort), &src, &dst, srcCopy, NULL);
+#ifdef BROWSERPLUGIN
+ EndDraw();
+#else
+ if (portChanged)
+ QDSwapPort(oldPort, NULL);
+#endif
+ }
+ return 1;
+}
+
+int glMakeCurrentRenderer(glRenderer *renderer) {
+ GLboolean ok;
+ GLint err;
+
+ if(current == renderer) return 1;
+ if(renderer)
+ if(!renderer->used || !renderer->context) return 0;
+ // ERROR_CHECK;
+ ok = aglSetCurrentContext(renderer ? renderer->context : NULL);
+ if((err = aglGetError()) != AGL_NO_ERROR) DPRINTF3D(3,(fp,"ERROR (glMakeCurrentRenderer): aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) {
+ DPRINTF3D(1, (fp, "ERROR (glMakeCurrentRenderer): aglSetCurrentContext failed\n"));
+ return 0;
+ }
+ // ERROR_CHECK;
+ current = renderer;
+ return 1;
+}
+
+int glSetBufferRect(int handle, int x, int y, int w, int h) {
+ glRenderer *renderer = glRendererFromHandle(handle);
+ if(!renderer || !glMakeCurrentRenderer(renderer)) return 0;
+ if(renderer->drawable) {
+ /* hardware renderer */
+ GLboolean ok;
+ GLenum err;
+ GLint bufferRect[4];
+ Rect portRect;
+
+#ifdef BROWSERPLUGIN
+ AGLDrawable win;
+ NP_Port *anNPPort;
+
+ StartDraw();
+ win = (AGLDrawable) getSTWindow();
+ anNPPort = getNP_Port();
+
+ GetPortBounds(GetWindowPort((WindowPtr)win),&portRect);
+ bufferRect[0] = x - anNPPort->portx;
+ bufferRect[1] = portRect.bottom - portRect.top - (y+h) + anNPPort->porty;
+ bufferRect[2] = w;
+ bufferRect[3] = h;
+
+ EndDraw();
+#else
+ GetPortBounds(GetWindowPort((WindowPtr) renderer->drawable),&portRect);
+ bufferRect[0] = x;
+ bufferRect[1] = portRect.bottom - portRect.top - (y+h);
+ bufferRect[2] = w;
+ bufferRect[3] = h;
+#endif
+ ok = aglSetInteger(renderer->context, AGL_BUFFER_RECT, bufferRect);
+ if((err = aglGetError()) != AGL_NO_ERROR)
+ DPRINTF3D(3,(fp,"aglSetInteger(AGL_BUFFER_RECT) failed: aglGetError - %s\n", aglErrorString(err)));
+ if(!ok) return 0;
+ } else {
+ /* software renderer */
+ if(renderer->bufferRect[2] != w && renderer->bufferRect[3] != h) {
+ /* do not allow resizing the software renderer */
+ return 0;
+ }
+ }
+ renderer->bufferRect[0] = x;
+ renderer->bufferRect[1] = y;
+ renderer->bufferRect[2] = w;
+ renderer->bufferRect[3] = h;
+ return 1;
+}
+
+int glSetVerboseLevel(int level) {
+ verboseLevel = level;
+ return 1;
+}
+
+int glIsOverlayRenderer(int handle) {
+#pragma unused(handle)
+ /* we never use overlay renderers */
+ return 0;
+}
+
+/***************************************************************************
+ ***************************************************************************
+ Module initializers
+ ***************************************************************************
+ ***************************************************************************/
+
+int glInitialize(void)
+{
+ int i;
+ for(i = 0; i < MAX_RENDERER; i++) {
+ allRenderer[i].used = 0;
+ }
+#ifdef INTERNAL
+ setPostMessageHook(macEventHook);
+#else
+ getSTWindow = (getSTWindowFn) interpreterProxy->ioLoadFunctionFrom("getSTWindow", "");
+ if(!getSTWindow) {
+ DPRINTF3D(1,(fp,"ERROR: Failed to look up getSTWindow()\n"));
+ return 0;
+ }
+ setMessageHook = (eventMessageHook) interpreterProxy->ioLoadFunctionFrom("setPostMessageHook", "");
+ if(!setMessageHook) {
+ DPRINTF3D(1, (fp, "ERROR: Failed to look up setMessageHook()\n"));
+ return 0;
+ }
+ ((void (*)(void*))setMessageHook)(macEventHook);
+#endif
+ return 1;
+}
+
+int glShutdown(void)
+{
+ int i;
+ for(i=0; i< MAX_RENDERER; i++) {
+ if(allRenderer[i].used)
+ glDestroyRenderer(i);
+ }
+ return 1;
+}
+
Added: branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h
===================================================================
--- branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h (rev 0)
+++ branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGL.h 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,38 @@
+#ifndef SQ_MAC_OPENGL_H
+#define SQ_MAC_OPENGL_H
+
+#define MAX_RENDERER 16
+
+#if defined(__MWERKS__)
+#include <agl.h>
+#include <gl.h>
+#else
+#include <AGL/agl.h>
+#ifdef MAC_OS_X_VERSION_10_7
+#include <OpenGL/gl.h>
+#else
+#include <AGL/gl.h>
+#endif
+#endif
+typedef struct glRenderer {
+ GLint bufferRect[4];
+ GLint viewport[4];
+
+ int used;
+ int finished;
+ AGLContext context;
+
+ /* hardware attributes */
+ AGLDrawable drawable;
+
+ /* software attributes */
+ GWorldPtr gWorld;
+ PixMapHandle pixMap;
+ int depth;
+ int pitch;
+ unsigned char *bits;
+} glRenderer;
+
+#define GL_RENDERER_DEFINED 1
+
+#endif /* SQ_MAC_OPENGL_H */
Added: branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c
===================================================================
--- branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c (rev 0)
+++ branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacOpenGLInfo.c 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,343 @@
+/****************************************************************************
+* PROJECT: Squeak 3D accelerator
+* FILE: sqMacOpenGLInfo.c
+* CONTENT: MacOS specific bindings for OpenGL
+*
+* AUTHOR: Andreas Raab (ar)
+* ADDRESS: Walt Disney Imagineering, Glendale, CA
+* EMAIL: Andreas.Raab at disney.com
+* RCSID: $Id: sqMacOpenGLInfo.c 1708 2007-06-10 00:40:04Z johnmci $
+*
+* NOTES:
+*
+*****************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <Carbon/Carbon.h>
+#include <OpenGL/gl.h>
+#ifdef MAC_OS_X_VERSION_10_7
+#include <OpenGL/gl.h>
+#else
+#include <AGL/gl.h>
+#endif
+#include <AGL/agl.h>
+
+#include "sq.h"
+#include "sqVirtualMachine.h"
+#include "sqMacUIConstants.h"
+int printRendererInfo(void);
+int printFormatInfo(AGLPixelFormat info);
+
+/* Verbose level for debugging purposes:
+ 0 - print NO information ever
+ 1 - print critical debug errors
+ 2 - print debug warnings
+ 3 - print extra information
+ 4 - print extra warnings
+ 5 - print information about primitive execution
+
+ 10 - print information about each vertex and face
+*/
+int verboseLevel = 3;
+/* define forceFlush if we should fflush() before closing file */
+#define forceFlush 1
+
+//#include "sqMacFileLogic.h"
+
+/* Note: Print this stuff into a file in case we lock up*/
+/* Note: Print this stuff into a file in case we lock up*/
+#undef DPRINTF3D
+# define DPRINTF3D(vLevel, args) if(vLevel <= verboseLevel) {\
+ char fileName[DOCUMENT_NAME_SIZE+1]; \
+ sqFilenameFromStringOpen(fileName,(sqInt) &"Squeak3D.log", strlen("Squeak3D.log")); \
+ FILE *fp = fopen(fileName, "at");\
+ if(fp) { fprintf args; if(forceFlush) fflush(fp); fclose(fp); }}
+
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+/*****************************************************************************/
+
+static void PrintBufferModes(GLint v)
+{
+ if(v & AGL_MONOSCOPIC_BIT) DPRINTF3D(3,(fp," AGL_MONOSCOPIC_BIT\n"));
+ if(v & AGL_STEREOSCOPIC_BIT) DPRINTF3D(3,(fp," AGL_STEREOSCOPIC_BIT\n"));
+ if(v & AGL_SINGLEBUFFER_BIT) DPRINTF3D(3,(fp," AGL_SINGLEBUFFER_BIT\n"));
+ if(v & AGL_DOUBLEBUFFER_BIT) DPRINTF3D(3,(fp," AGL_DOUBLEBUFFER_BIT\n"));
+}
+
+static void PrintColorModes(GLint v)
+{
+ if(v & AGL_RGB8_BIT) DPRINTF3D(3,(fp," AGL_RGB8_BIT\n"));
+ if(v & AGL_RGB8_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB8_A8_BIT\n"));
+ if(v & AGL_BGR233_BIT) DPRINTF3D(3,(fp," AGL_BGR233_BIT\n"));
+ if(v & AGL_BGR233_A8_BIT) DPRINTF3D(3,(fp," AGL_BGR233_A8_BIT\n"));
+ if(v & AGL_RGB332_BIT) DPRINTF3D(3,(fp," AGL_RGB332_BIT\n"));
+ if(v & AGL_RGB332_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB332_A8_BIT\n"));
+ if(v & AGL_RGB444_BIT) DPRINTF3D(3,(fp," AGL_RGB444_BIT\n"));
+ if(v & AGL_ARGB4444_BIT) DPRINTF3D(3,(fp," AGL_ARGB4444_BIT\n"));
+ if(v & AGL_RGB444_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB444_A8_BIT\n"));
+ if(v & AGL_RGB555_BIT) DPRINTF3D(3,(fp," AGL_RGB555_BIT\n"));
+ if(v & AGL_ARGB1555_BIT) DPRINTF3D(3,(fp," AGL_ARGB1555_BIT\n"));
+ if(v & AGL_RGB555_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB555_A8_BIT\n"));
+ if(v & AGL_RGB565_BIT) DPRINTF3D(3,(fp," AGL_RGB565_BIT\n"));
+ if(v & AGL_RGB565_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB565_A8_BIT\n"));
+ if(v & AGL_RGB888_BIT) DPRINTF3D(3,(fp," AGL_RGB888_BIT\n"));
+ if(v & AGL_ARGB8888_BIT) DPRINTF3D(3,(fp," AGL_ARGB8888_BIT\n"));
+ if(v & AGL_RGB888_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB888_A8_BIT\n"));
+ if(v & AGL_RGB101010_BIT) DPRINTF3D(3,(fp," AGL_RGB101010_BIT\n"));
+ if(v & AGL_ARGB2101010_BIT) DPRINTF3D(3,(fp," AGL_ARGB2101010_BIT\n"));
+ if(v & AGL_RGB101010_A8_BIT) DPRINTF3D(3,(fp," AGL_RGB101010_A8_BIT\n"));
+ if(v & AGL_RGB121212_BIT) DPRINTF3D(3,(fp," AGL_RGB121212_BIT\n"));
+ if(v & AGL_ARGB12121212_BIT) DPRINTF3D(3,(fp," AGL_ARGB12121212_BIT\n"));
+ if(v & AGL_RGB161616_BIT) DPRINTF3D(3,(fp," AGL_RGB161616_BIT\n"));
+ if(v & AGL_ARGB16161616_BIT) DPRINTF3D(3,(fp," AGL_ARGB16161616_BIT\n"));
+ if(v & AGL_INDEX8_BIT) DPRINTF3D(3,(fp," AGL_INDEX8_BIT\n"));
+ if(v & AGL_INDEX16_BIT) DPRINTF3D(3,(fp," AGL_INDEX16_BIT\n"));
+}
+
+static void PrintBitModes(GLint v)
+{
+ if(v & AGL_0_BIT) DPRINTF3D(3,(fp," AGL_0_BIT\n"));
+ if(v & AGL_1_BIT) DPRINTF3D(3,(fp," AGL_1_BIT\n"));
+ if(v & AGL_2_BIT) DPRINTF3D(3,(fp," AGL_2_BIT\n"));
+ if(v & AGL_3_BIT) DPRINTF3D(3,(fp," AGL_3_BIT\n"));
+ if(v & AGL_4_BIT) DPRINTF3D(3,(fp," AGL_4_BIT\n"));
+ if(v & AGL_5_BIT) DPRINTF3D(3,(fp," AGL_5_BIT\n"));
+ if(v & AGL_6_BIT) DPRINTF3D(3,(fp," AGL_6_BIT\n"));
+ if(v & AGL_8_BIT) DPRINTF3D(3,(fp," AGL_8_BIT\n"));
+ if(v & AGL_10_BIT) DPRINTF3D(3,(fp," AGL_10_BIT\n"));
+ if(v & AGL_12_BIT) DPRINTF3D(3,(fp," AGL_12_BIT\n"));
+ if(v & AGL_16_BIT) DPRINTF3D(3,(fp," AGL_16_BIT\n"));
+ if(v & AGL_24_BIT) DPRINTF3D(3,(fp," AGL_24_BIT\n"));
+ if(v & AGL_32_BIT) DPRINTF3D(3,(fp," AGL_32_BIT\n"));
+ if(v & AGL_48_BIT) DPRINTF3D(3,(fp," AGL_48_BIT\n"));
+ if(v & AGL_64_BIT) DPRINTF3D(3,(fp," AGL_64_BIT\n"));
+ if(v & AGL_96_BIT) DPRINTF3D(3,(fp," AGL_96_BIT\n"));
+ if(v & AGL_128_BIT) DPRINTF3D(3,(fp," AGL_128_BIT\n"));
+}
+
+static void PrintInfoStats(AGLRendererInfo info)
+{
+ GLint rv;
+
+ aglDescribeRenderer(info, AGL_RENDERER_ID, &rv);
+ DPRINTF3D(3,(fp," AGL_RENDERER_ID : 0x%X\n", rv));
+
+ aglDescribeRenderer(info, AGL_OFFSCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_OFFSCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_FULLSCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_FULLSCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_WINDOW, &rv);
+ DPRINTF3D(3,(fp," AGL_WINDOW : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_ACCELERATED, &rv);
+ DPRINTF3D(3,(fp," AGL_ACCELERATED : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_ROBUST, &rv);
+ DPRINTF3D(3,(fp," AGL_ROBUST : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_BACKING_STORE, &rv);
+ DPRINTF3D(3,(fp," AGL_BACKING_STORE : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_MP_SAFE, &rv);
+ DPRINTF3D(3,(fp," AGL_MP_SAFE : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_COMPLIANT, &rv);
+ DPRINTF3D(3,(fp," AGL_COMPLIANT : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_MULTISCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_MULTISCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribeRenderer(info, AGL_BUFFER_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_BUFFER_MODES : 0x%X\n", rv));
+ PrintBufferModes(rv);
+
+ aglDescribeRenderer(info, AGL_MIN_LEVEL, &rv);
+ DPRINTF3D(3,(fp," AGL_MIN_LEVEL : %d\n", rv));
+
+ aglDescribeRenderer(info, AGL_MAX_LEVEL, &rv);
+ DPRINTF3D(3,(fp," AGL_MAX_LEVEL : %d\n", rv));
+
+ aglDescribeRenderer(info, AGL_COLOR_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_COLOR_MODES : 0x%X\n", rv));
+ PrintColorModes(rv);
+
+ aglDescribeRenderer(info, AGL_ACCUM_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_ACCUM_MODES : 0x%X\n", rv));
+ PrintColorModes(rv);
+
+ aglDescribeRenderer(info, AGL_DEPTH_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_DEPTH_MODES : 0x%X\n", rv));
+ PrintBitModes(rv);
+
+ aglDescribeRenderer(info, AGL_STENCIL_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_STENCIL_MODES : 0x%X\n", rv));
+ PrintBitModes(rv);
+
+ aglDescribeRenderer(info, AGL_MAX_AUX_BUFFERS, &rv);
+ DPRINTF3D(3,(fp," AGL_MAX_AUX_BUFFERS : %d\n", rv));
+
+ aglDescribeRenderer(info, AGL_VIDEO_MEMORY, &rv);
+ DPRINTF3D(3,(fp," AGL_VIDEO_MEMORY : %d\n", rv));
+
+ aglDescribeRenderer(info, AGL_TEXTURE_MEMORY, &rv);
+ DPRINTF3D(3,(fp," AGL_TEXTURE_MEMORY : %d\n", rv));
+}
+
+static void CheckGetRendererInfo(GDHandle device)
+{
+ AGLRendererInfo info, head_info;
+ GLint inum;
+
+ head_info = aglQueryRendererInfo(&device, 1);
+ if(!head_info)
+ {
+ DPRINTF3D(3,(fp,"aglQueryRendererInfo : Info Error\n"));
+ return;
+ }
+
+ info = head_info;
+ inum = 0;
+ while(info)
+ {
+ DPRINTF3D(3,(fp,"\n Renderer : %d\n", inum));
+ PrintInfoStats(info);
+ info = aglNextRendererInfo(info);
+ inum++;
+ }
+
+ aglDestroyRendererInfo(head_info);
+}
+
+int printRendererInfo(void)
+{
+ GLenum err;
+ GDHandle device;
+ GLuint dnum = 0;
+
+ device = GetDeviceList();
+ while(device)
+ {
+ DPRINTF3D(3,(fp,"\nDevice : %d\n", dnum));
+ CheckGetRendererInfo(device);
+ device = GetNextDevice(device);
+ dnum++;
+ }
+
+ err = aglGetError();
+ if(err != AGL_NO_ERROR) DPRINTF3D(3,(fp,"aglGetError - %s\n", aglErrorString(err)));
+
+ return 1;
+}
+
+int printFormatInfo(AGLPixelFormat info)
+{
+ GLint rv;
+
+ DPRINTF3D(3, (fp, "\n\nSelected pixel format:\n"));
+
+ aglDescribePixelFormat(info, AGL_RENDERER_ID, &rv);
+ DPRINTF3D(3,(fp," AGL_RENDERER_ID : 0x%X\n", rv));
+
+ aglDescribePixelFormat(info, AGL_OFFSCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_OFFSCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_FULLSCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_FULLSCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_WINDOW, &rv);
+ DPRINTF3D(3,(fp," AGL_WINDOW : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_ACCELERATED, &rv);
+ DPRINTF3D(3,(fp," AGL_ACCELERATED : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_ROBUST, &rv);
+ DPRINTF3D(3,(fp," AGL_ROBUST : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_BACKING_STORE, &rv);
+ DPRINTF3D(3,(fp," AGL_BACKING_STORE : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_MP_SAFE, &rv);
+ DPRINTF3D(3,(fp," AGL_MP_SAFE : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_COMPLIANT, &rv);
+ DPRINTF3D(3,(fp," AGL_COMPLIANT : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_MULTISCREEN, &rv);
+ DPRINTF3D(3,(fp," AGL_MULTISCREEN : %s\n", (rv ? "GL_TRUE" : "GL_FALSE")));
+
+ aglDescribePixelFormat(info, AGL_BUFFER_SIZE, &rv);
+ DPRINTF3D(3,(fp," AGL_BUFFER_SIZE : %d\n", rv));
+
+ aglDescribePixelFormat(info, AGL_LEVEL, &rv);
+ DPRINTF3D(3,(fp," AGL_LEVEL : %d\n", rv));
+
+ aglDescribePixelFormat(info, AGL_PIXEL_SIZE, &rv);
+ DPRINTF3D(3,(fp," AGL_PIXEL_SIZE : %d\n", rv));
+
+#if 0
+ aglDescribePixelFormat(info, AGL_ACCUM_MODES, &rv);
+ DPRINTF3D(3,(fp," AGL_ACCUM_MODES : 0x%X\n", rv));
+ PrintColorModes(rv);
+#endif
+ aglDescribePixelFormat(info, AGL_DEPTH_SIZE, &rv);
+ DPRINTF3D(3,(fp," AGL_DEPTH_SIZE : %d\n", rv));
+
+ aglDescribePixelFormat(info, AGL_STENCIL_SIZE, &rv);
+ DPRINTF3D(3,(fp," AGL_STENCIL_SIZE : %d\n", rv));
+ PrintBitModes(rv);
+
+ aglDescribePixelFormat(info, AGL_AUX_BUFFERS, &rv);
+ DPRINTF3D(3,(fp," AGL_AUX_BUFFERS : %d\n", rv));
+#if 0
+ aglDescribePixelFormat(info, AGL_VIDEO_MEMORY, &rv);
+ DPRINTF3D(3,(fp," AGL_VIDEO_MEMORY : %d\n", rv));
+
+ aglDescribePixelFormat(info, AGL_TEXTURE_MEMORY, &rv);
+ DPRINTF3D(3,(fp," AGL_TEXTURE_MEMORY : %d\n", rv));
+#endif
+
+#if 0
+ aglDescribePixelFormat(pix, AGL_BUFFER_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_BUFFER_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_LEVEL, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_LEVEL: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_RGBA, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_RGBA: %s\n", (rv == GL_TRUE ? "GL_TRUE" : "GL_FALSE")));
+ aglDescribePixelFormat(pix, AGL_DOUBLEBUFFER, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_DOUBLEBUFFER: %s\n", (rv == GL_TRUE ? "GL_TRUE" : "GL_FALSE")));
+ aglDescribePixelFormat(pix, AGL_STEREO, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_STEREO: %s\n", (rv == GL_TRUE ? "GL_TRUE" : "GL_FALSE")));
+ aglDescribePixelFormat(pix, AGL_AUX_BUFFERS, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_AUX_BUFFERS: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_PIXEL_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_PIXEL_SIZE: %d\n", rv));
+
+ aglDescribePixelFormat(pix, AGL_RED_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\n\tAGL_RED_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_GREEN_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_GREEN_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_BLUE_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_BLUE_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_ALPHA_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_ALPHA_SIZE: %d\n", rv));
+
+ aglDescribePixelFormat(pix, AGL_DEPTH_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\n\tAGL_DEPTH_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_STENCIL_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_STENCIL_SIZE: %d\n", rv));
+
+ aglDescribePixelFormat(pix, AGL_ACCUM_RED_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_ACCUM_RED_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_ACCUM_GREEN_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_ACCUM_GREEN_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_ACCUM_BLUE_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_ACCUM_BLUE_SIZE: %d\n", rv));
+ aglDescribePixelFormat(pix, AGL_ACCUM_ALPHA_SIZE, &rv);
+ DPRINTF3D(3, (fp, "\tAGL_ACCUM_ALPHA_SIZE: %d\n", rv));
+#endif
+ return 1;
+}
Added: branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacUIConstants.h
===================================================================
--- branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacUIConstants.h (rev 0)
+++ branches/Cog/platforms/iOS/plugins/B3DAcceleratorPlugin/sqMacUIConstants.h 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,24 @@
+/****************************************************************************
+* PROJECT: mac apple constants
+* FILE: sqMacUIConstants.h
+* CONTENT:
+*
+* AUTHOR: John McIntosh
+* ADDRESS:
+* EMAIL: johnmci at smalltalkconsulting.com
+* RCSID: $Id: sqMacUIConstants.h 1344 2006-03-05 21:07:15Z johnmci $
+*
+* NOTES:
+* 2011/04/01 WARNING: I'm usinf this file as is, copying it from platforms/Mac OS/vm because this plugin sources needs to be rewritten, and in the mean time there is
+* no good reason to pollute the other code.
+*/
+
+
+#define IMAGE_NAME_SIZE 1000
+#define SHORTIMAGE_NAME_SIZE 255
+#define DOCUMENT_NAME_SIZE 1000
+#define VMPATH_SIZE 1000
+
+ #define DELIMITER "/"
+ #define DELIMITERInt '/'
+
Added: branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h
===================================================================
--- branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h (rev 0)
+++ branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.h 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,38 @@
+/*
+ * sqMacExtendedClipboard.h
+ * SqueakClipboardExtendedxcodeproj
+ *
+ * Created by John Sterling Mcintosh on 4/21/06.
+ * Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+/* The virtual machine proxy definition */
+#include "sqVirtualMachine.h"
+
+void sqPasteboardClear( void * inPasteboard );
+sqInt sqPasteboardGetItemCount ( void *inPasteboard );
+sqInt sqPasteboardCopyItemFlavorsitemNumber ( void *inPasteboard, sqInt formatNumber );
+void * sqCreateClipboard( void );
+void sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength);
+sqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void* inPasteboard, char* format, sqInt formatLength);
Added: branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m
===================================================================
--- branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m (rev 0)
+++ branches/Cog/platforms/iOS/plugins/ClipboardExtendedPlugin/sqMacExtendedClipboard.m 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,113 @@
+/*
+ * sqMacExtendedClipboard.m
+ * SqueakClipboardExtendedxcodeproj
+ *
+ * Created by John Sterling Mcintosh on 4/21/06.
+ * Copyright 2006-2010 Corporate Smalltalk Consulting ltd. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#include "sqMacExtendedClipboard.h"
+#import <Cocoa/Cocoa.h>
+
+
+extern struct VirtualMachine* interpreterProxy;
+
+void sqPasteboardClear(void *inPasteboard )
+{
+ NSArray *arrayOfTypes = [[NSArray alloc] init];
+
+ [(NSPasteboard*) inPasteboard declareTypes: arrayOfTypes owner: nil];
+ [arrayOfTypes release];
+
+}
+
+sqInt sqPasteboardGetItemCount (void *inPasteboard )
+{
+ return [[(NSPasteboard *)inPasteboard types] count];
+}
+
+sqInt sqPasteboardCopyItemFlavorsitemNumber ( void *inPasteboard, sqInt formatNumber )
+{
+
+ sqInt formatTypeLength;
+ sqInt flavorCount;
+
+ flavorCount = [[(NSPasteboard *)inPasteboard types] count];
+ if (formatNumber > flavorCount) {
+ return interpreterProxy->nilObject();
+ }
+
+ NSString *formatType = [[(NSPasteboard *)inPasteboard types] objectAtIndex: formatNumber-1];
+
+ const char *utf8data = [formatType UTF8String];
+ formatTypeLength = strlen(utf8data);
+ sqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classString(), formatTypeLength);
+ unsigned char* formatConverted = interpreterProxy->firstIndexableField(outData);
+ memcpy(formatConverted,utf8data,formatTypeLength);
+
+ return outData;
+}
+
+void * sqCreateClipboard( void )
+{
+ return (void*) [NSPasteboard generalPasteboard];
+}
+
+void sqPasteboardPutItemFlavordatalengthformatTypeformatLength ( void *inPasteboard, char* inData, sqInt dataLength, char* format, sqInt formatLength)
+{
+ NSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding: NSUTF8StringEncoding];
+ NSData* data = [[NSData alloc ] initWithBytes: inData length: dataLength];
+ NSArray *arrayOfTypes = [[NSArray alloc] initWithObjects: formatType,nil];
+
+ [(NSPasteboard *)inPasteboard declareTypes: arrayOfTypes owner: nil];
+ [(NSPasteboard *)inPasteboard setData: data forType: formatType];
+
+ [arrayOfTypes release];
+ [data release];
+ [formatType release];
+}
+
+sqInt sqPasteboardCopyItemFlavorDataformatformatLength ( void *inPasteboard, char* format, sqInt formatLength)
+{
+ NSString *formatType = [[NSString alloc] initWithBytes: format length: formatLength encoding: NSUTF8StringEncoding];
+ NSArray *arrayOfTypes = [[NSArray alloc] initWithObjects: formatType,nil];
+ NSString *type= [(NSPasteboard *)inPasteboard availableTypeFromArray: arrayOfTypes];
+
+ if (type == NULL) {
+ [formatType release];
+ [arrayOfTypes release];
+ return interpreterProxy->nilObject();
+ }
+
+ NSData *dataBuffer = [(NSPasteboard *)inPasteboard dataForType: type];
+ sqInt dataLength = [dataBuffer length];
+ sqInt outData = interpreterProxy->instantiateClassindexableSize(interpreterProxy->classByteArray(), dataLength );
+ char *outDataPtr = (char *) interpreterProxy->firstIndexableField(outData);
+ [dataBuffer getBytes: outDataPtr];
+
+ [formatType release];
+ [arrayOfTypes release];
+ return outData;
+}
\ No newline at end of file
Added: branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.c
===================================================================
--- branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.c (rev 0)
+++ branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.c 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,37 @@
+/*
+ * sqMacCroquet.c
+ * SqueakCroquet
+ *
+ * Created by John M McIntosh on 04/04/06.
+ * Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.
+ * Licenced under the Squeak-L
+ * taken from Ian's unix example
+ *
+ */
+
+#include "sqMacCroquet.h"
+#include "sqMemoryAccess.h"
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+
+sqInt ioGatherEntropy(char *buffer, sqInt bufSize)
+{
+ int fd, count= 0;
+
+ if ((fd= open("/dev/urandom", O_RDONLY)) < 0)
+ return 0;
+
+ while (count < bufSize)
+ {
+ int n;
+ if ((n= read(fd, buffer + count, bufSize)) < 1)
+ break;
+ count += n;
+ }
+
+ close(fd);
+
+ return count == bufSize;
+}
Added: branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.h
===================================================================
--- branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.h (rev 0)
+++ branches/Cog/platforms/iOS/plugins/CroquetPlugin/sqMacCroquet.h 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,10 @@
+/*
+ * sqMacCroquet.h
+ * SqueakCroquet
+ *
+ * Created by John M McIntosh on 04/04/06.
+ * Copyright 2006 Corporate Smalltalk Consulting Ltd. All rights reserved.
+ * Licenced under the Squeak-L
+ *
+ */
+
Added: branches/Cog/platforms/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist
===================================================================
--- branches/Cog/platforms/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist (rev 0)
+++ branches/Cog/platforms/iOS/plugins/FT2Plugin/Info-FT2Plugin.plist 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>FT2Plugin</string>
+ <key>CFBundleGetInfoString</key>
+ <string>FT2Plugin V2.3.11 for Squeak</string>
+ <key>CFBundleIconFile</key>
+ <string>SqueakPlugin.icns</string>
+ <key>CFBundleIdentifier</key>
+ <string>de.impara.FT2Plugin</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>FT2Plugin V2.3.11 for Squeak</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>2.3.11</string>
+ <key>CFBundleSignature</key>
+ <string>FAST</string>
+ <key>CFBundleVersion</key>
+ <string>2.3.11</string>
+</dict>
+</plist>
Added: branches/Cog/platforms/iOS/plugins/FT2Plugin/PkgInfo
===================================================================
--- branches/Cog/platforms/iOS/plugins/FT2Plugin/PkgInfo (rev 0)
+++ branches/Cog/platforms/iOS/plugins/FT2Plugin/PkgInfo 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1 @@
+BNDLFAST
\ No newline at end of file
Added: branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h
===================================================================
--- branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h (rev 0)
+++ branches/Cog/platforms/iOS/plugins/FT2Plugin/freetype2/freetype/config/ftconfig.h 2015-01-06 22:06:13 UTC (rev 3209)
@@ -0,0 +1,493 @@
+/* ftconfig.h. Generated from ftconfig.in by configure. */
+/***************************************************************************/
+/* */
+/* ftconfig.in */
+/* */
+/* UNIX-specific configuration file (specification only). */
+/* */
+/* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2009 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list