mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 01:55:30 +00:00
Merge remote-tracking branch 'opentk/develop' into develop
This commit is contained in:
commit
3ac862693d
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
16
.github/PULL_REQUEST_TEMPLATE.md
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
### Purpose of this PR
|
||||
|
||||
* Description of feature/change.
|
||||
* Which part of OpenTK does this affect (Math, OpenGL, Platform, Input, etc).
|
||||
* Links to screenshots, design docs, user docs, etc.
|
||||
|
||||
### Testing status
|
||||
|
||||
* Explanation of what’s tested, how tested and existing or new automation tests.
|
||||
* Can include manual testing by self.
|
||||
* Specify test plans.
|
||||
* Rarely acceptable to have no testing.
|
||||
|
||||
### Comments
|
||||
|
||||
* Any other comments to help understand the change.
|
418
.gitignore
vendored
418
.gitignore
vendored
|
@ -1,31 +1,63 @@
|
|||
# =============================================
|
||||
# Visual Studio & Associated technologies
|
||||
# =============================================
|
||||
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# Xamarin Studio / monodevelop user-specific
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
*.dll.mdb
|
||||
*.exe.mdb
|
||||
|
||||
# Build results
|
||||
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
build/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# Benchmark Results
|
||||
BenchmarkDotNet.Artifacts/
|
||||
|
||||
# .NET Core
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
**/Properties/launchSettings.json
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
|
@ -45,24 +77,31 @@ build/
|
|||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.log
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# Other Visual Studio data
|
||||
.vs/
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
@ -70,6 +109,10 @@ ipch/
|
|||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
@ -77,9 +120,21 @@ _TeamCity*
|
|||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# Visual Studio code coverage results
|
||||
*.coverage
|
||||
*.coveragexml
|
||||
|
||||
# NCrunch
|
||||
*.ncrunch*
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
@ -98,57 +153,158 @@ DocProject/Help/html
|
|||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.Publish.xml
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Enable nuget.exe in the .nuget folder (though normally executables are not tracked)
|
||||
!.nuget/NuGet.exe
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# Windows Azure Build Output
|
||||
csx
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignorable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Windows Store app package directory
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
*.appx
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
sql/
|
||||
*.Cache
|
||||
ClientBin/
|
||||
[Ss]tyle[Cc]op.*
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.[Pp]ublish.xml
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file to a newer
|
||||
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
App_Data/*.mdf
|
||||
App_Data/*.ldf
|
||||
*.mdf
|
||||
*.ldf
|
||||
*.ndf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
#LightSwitch generated files
|
||||
GeneratedArtifacts/
|
||||
_Pvt_Extensions/
|
||||
ModelManifest.xml
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
node_modules/
|
||||
|
||||
# Typescript v1 declaration files
|
||||
typings/
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||
*.vbw
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
|
||||
# Cake - Uncomment if you are using it
|
||||
# tools/**
|
||||
# !tools/packages.config
|
||||
|
||||
# Tabs Studio
|
||||
*.tss
|
||||
|
||||
# Telerik's JustMock configuration file
|
||||
*.jmconfig
|
||||
|
||||
# BizTalk build output
|
||||
*.btp.cs
|
||||
*.btm.cs
|
||||
*.odx.cs
|
||||
*.xsd.cs
|
||||
|
||||
# =========================
|
||||
# Windows detritus
|
||||
# =========================
|
||||
|
||||
# Windows image file caches
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
Desktop.ini
|
||||
|
@ -156,8 +312,46 @@ Desktop.ini
|
|||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Mac desktop service store files
|
||||
.DS_Store
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# ===========
|
||||
# Macintosh
|
||||
# ===========
|
||||
|
||||
# General
|
||||
*.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# ===================================================
|
||||
# Exclude F# project specific directories and files
|
||||
|
@ -174,6 +368,8 @@ temp/
|
|||
|
||||
# Test results produced by build
|
||||
TestResults.xml
|
||||
output.mlpd
|
||||
coverage.xml
|
||||
|
||||
# Nuget outputs
|
||||
nuget/*.nupkg
|
||||
|
@ -187,3 +383,165 @@ docs/content/license.md
|
|||
docs/content/release-notes.md
|
||||
.fake
|
||||
docs/tools/FSharp.Formatting.svclog
|
||||
|
||||
# ===========
|
||||
# Covers JetBrains IDEs: Rider, IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
# ===========
|
||||
|
||||
# User-specific stuff:
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/dictionaries
|
||||
|
||||
# Sensitive or high-churn files:
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.xml
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
|
||||
# Gradle:
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# CMake
|
||||
cmake-build-debug/
|
||||
|
||||
# Mongo Explorer plugin:
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
## File-based project format:
|
||||
*.iws
|
||||
|
||||
## Plugin-specific files:
|
||||
|
||||
# IntelliJ
|
||||
/out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# ============
|
||||
# MonoDevelop
|
||||
# ============
|
||||
|
||||
#User Specific
|
||||
*.userprefs
|
||||
*.usertasks
|
||||
|
||||
#Mono Project Files
|
||||
*.pidb
|
||||
*.resources
|
||||
test-results/
|
||||
|
||||
# ================
|
||||
# Linux-specific
|
||||
# ================
|
||||
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
# ============
|
||||
# VS Code
|
||||
# ============
|
||||
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# ============
|
||||
# Emacs
|
||||
# ============
|
||||
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# ===========
|
||||
# Vim
|
||||
# ===========
|
||||
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-v][a-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
|
|
19
.travis.yml
19
.travis.yml
|
@ -1,9 +1,20 @@
|
|||
language: csharp
|
||||
|
||||
sudo: false # use the new container-based Travis infrastructure
|
||||
sudo: false # use the new container-based Travis infrastructure
|
||||
|
||||
before_install:
|
||||
- chmod +x build.sh
|
||||
|
||||
script:
|
||||
- ./build.sh NuGet
|
||||
|
||||
before_script:
|
||||
# Start a virtual framebuffer as described: https://docs.travis-ci.com/user/gui-and-headless-browsers/
|
||||
- "export DISPLAY=:99.0"
|
||||
- "sh -e /etc/init.d/xvfb start"
|
||||
- sleep 3 # give xvfb some time to start
|
||||
|
||||
script:
|
||||
- travis_wait ./build.sh NuGet
|
||||
|
||||
after_script:
|
||||
- mono --debug --profile=log:coverage,covfilter=+OpenTK,covfilter=-OpenTK.Tests,covfilter=-FSharp.Core,covfilter=-FsCheck,covfilter=-xunit.assert "packages/xunit.runner.console/tools/xunit.console.exe" "tests/OpenTK.Tests/bin/Release/OpenTK.Tests.dll" -parallel none
|
||||
- mprof-report --reports=coverage --coverage-out=coverage.xml output.mlpd
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
|
24
OpenTK.sln
24
OpenTK.sln
|
@ -21,8 +21,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.GLWidget", "src\Open
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{1857BB8E-1A35-4EBF-9F6D-685F11DC025B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Tests", "tests\OpenTK.Tests\OpenTK.Tests.csproj", "{930A780C-A67C-422F-9EED-DB38DAA47AB0}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.API.Desktop", "tests\Test.API.Desktop\Test.API.Desktop.csproj", "{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{F1A57014-71CE-4032-A652-01B7E35E14DB}"
|
||||
|
@ -38,6 +36,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{5EEE
|
|||
RELEASE_NOTES.md = RELEASE_NOTES.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "OpenTK.Tests", "tests\OpenTK.Tests\OpenTK.Tests.fsproj", "{6801C263-ADDA-4A7B-979D-649BCB5A1DF7}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "OpenTK.Tests.Integration", "tests\OpenTK.Tests.Integration\OpenTK.Tests.Integration.fsproj", "{522D9279-3ED6-475F-867A-6AE69A53C24A}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -76,23 +78,25 @@ Global
|
|||
{A625BE87-0000-0000-0000-000000000000}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A625BE87-0000-0000-0000-000000000000}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A625BE87-0000-0000-0000-000000000000}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{930A780C-A67C-422F-9EED-DB38DAA47AB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{930A780C-A67C-422F-9EED-DB38DAA47AB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{930A780C-A67C-422F-9EED-DB38DAA47AB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{930A780C-A67C-422F-9EED-DB38DAA47AB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6801C263-ADDA-4A7B-979D-649BCB5A1DF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6801C263-ADDA-4A7B-979D-649BCB5A1DF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6801C263-ADDA-4A7B-979D-649BCB5A1DF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6801C263-ADDA-4A7B-979D-649BCB5A1DF7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{522D9279-3ED6-475F-867A-6AE69A53C24A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{522D9279-3ED6-475F-867A-6AE69A53C24A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{522D9279-3ED6-475F-867A-6AE69A53C24A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{522D9279-3ED6-475F-867A-6AE69A53C24A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{930A780C-A67C-422F-9EED-DB38DAA47AB0} = {1857BB8E-1A35-4EBF-9F6D-685F11DC025B}
|
||||
{C4DDD20F-CB4E-43F4-A75C-4A3D668E1F99} = {1857BB8E-1A35-4EBF-9F6D-685F11DC025B}
|
||||
EndGlobalSection
|
||||
GlobalSection(MonoDevelopProperties) = preSolution
|
||||
StartupItem = Source\Examples\OpenTK.Examples.csproj
|
||||
{6801C263-ADDA-4A7B-979D-649BCB5A1DF7} = {1857BB8E-1A35-4EBF-9F6D-685F11DC025B}
|
||||
{522D9279-3ED6-475F-867A-6AE69A53C24A} = {1857BB8E-1A35-4EBF-9F6D-685F11DC025B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
22
README.md
22
README.md
|
@ -18,10 +18,19 @@ Project website: https://opentk.github.io/
|
|||
Official git repository: https://github.com/opentk/opentk
|
||||
|
||||
|
||||
Build Status
|
||||
========
|
||||
|
||||
| Platform | Status |
|
||||
| -------------- | -------------- |
|
||||
| Windows | [![Build status](https://ci.appveyor.com/api/projects/status/opentk/branch/develop?svg=true)](https://ci.appveyor.com/project/varon/opentk/branch/develop) |
|
||||
| Mono/Linux | [![Build status](https://travis-ci.org/opentk/opentk.svg?branch=develop)](https://travis-ci.org/opentk/opentk) |
|
||||
|
||||
|
||||
Features
|
||||
========
|
||||
|
||||
- Create cutting-edge graphics with OpenGL 4.4 and OpenGL ES 3.0
|
||||
- Create cutting-edge graphics with OpenGL 4.6 and OpenGL ES 3.0
|
||||
- Spice up your GUI with 3d acceleration
|
||||
- Improve your code flow with strong types and inline documentation
|
||||
- Write once run everywhere
|
||||
|
@ -35,6 +44,7 @@ Instructions
|
|||
============
|
||||
|
||||
The simplest way to use OpenTK in your project is to install the [NuGet package](http://www.nuget.org/packages/OpenTK/).
|
||||
If you want to try out the latest development build from the `develop` branch, we also have a [MyGet feed](https://www.myget.org/F/opentk-develop/api/v3/index.json).
|
||||
|
||||
Note what installing NuGet package will add reference to OpenTK.dll, but OpenTK.dll.config
|
||||
will not be copied to the project output directory automatically, so you need to add it to your project
|
||||
|
@ -54,6 +64,14 @@ cd opentk # Enter the source directory
|
|||
News
|
||||
====
|
||||
|
||||
### 2017-05-08
|
||||
|
||||
A pre-release package is available.
|
||||
|
||||
https://www.nuget.org/packages/OpenTK/3.0.0-pre
|
||||
|
||||
https://www.nuget.org/packages/OpenTK.GLControl/3.0.0-pre
|
||||
|
||||
### 2016-09-23
|
||||
|
||||
OpenTK 2.0.0 is now available for download from [Nuget](https://www.nuget.org/packages/OpenTK/2.0.0).
|
||||
|
@ -163,7 +181,7 @@ Requirements
|
|||
Documentation
|
||||
=============
|
||||
|
||||
Your favorite IDE will display inline documentation for all OpenTK APIs. Additional information can be found in the [OpenTK Manual](http://www.opentk.com/doc) and in the [opentk/Documentation/](https://github.com/opentk/opentk/tree/develop/Documentation) folder.
|
||||
Your favorite IDE will display inline documentation for all OpenTK APIs. Additional information can be found in the [OpenTK Manual](http://web.archive.org/web/20150325224427/http://www.opentk.com/doc).
|
||||
|
||||
Technical documentation about the implementation of OpenTK can be found in the [Technical Wiki](https://github.com/opentk/opentk/wiki).
|
||||
|
||||
|
|
|
@ -1,4 +1,22 @@
|
|||
### 2.0.0 - alpha
|
||||
### 3.0.0-pre
|
||||
* Support for OpenGL 4.6
|
||||
* Replaced JoystickButton enum with simple long. (breaking API change)
|
||||
* Increase available joystick buttons to 64.
|
||||
* Add support for OpenGL ES3 through Angle + DIrect3D.
|
||||
* Fix 2 crashes on android
|
||||
* Move to built-in System.Diagnostics.Debug for Android + iOS
|
||||
* Fix for certain joysticks returning invalid HID pages.
|
||||
* Fix for certain joysticks with negative axis range being inverted.
|
||||
* Fix Xbox controller D-pad on windows
|
||||
* Fix joystick hat position sticking on Linux
|
||||
* Enhance xbox button detection to include GUIDE button.
|
||||
* Fix iOS GL bindings issue introduced by 2ea8334
|
||||
* Fix crash on setting time to <= 0 for iOS + Android.
|
||||
* Several minor XML documentation fixes and enhancements
|
||||
* Fix for angle backbuffer size issue on window resize
|
||||
* Possible fix for broken GLControl package.
|
||||
|
||||
### 2.0.0
|
||||
* Moved to new FAKE/Paket based build system
|
||||
* Removed superfluous release configurations
|
||||
* Numerous other fixes and enhancements
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
image: Visual Studio 2017
|
||||
init:
|
||||
- git config --global core.autocrlf input
|
||||
build_script:
|
||||
|
|
12
build.cmd
12
build.cmd
|
@ -15,4 +15,14 @@ IF NOT EXIST build.fsx (
|
|||
.paket\paket.exe update
|
||||
packages\FAKE\tools\FAKE.exe init.fsx
|
||||
)
|
||||
packages\FAKE\tools\FAKE.exe build.fsx %*
|
||||
|
||||
SET BuildTarget=
|
||||
if "%BuildRunner%" == "MyGet" (
|
||||
SET BuildTarget=NuGet
|
||||
|
||||
:: Replace the existing release notes file with one for this build only
|
||||
echo ### %PackageVersion% > RELEASE_NOTES.md
|
||||
echo * git build >> RELEASE_NOTES.md
|
||||
)
|
||||
|
||||
packages\FAKE\tools\FAKE.exe build.fsx %* %BuildTarget%
|
31
build.fsx
31
build.fsx
|
@ -42,7 +42,7 @@ let tags = "OpenTK OpenGL OpenGLES GLES OpenAL C# F# VB .NET Mono Vector Math Ga
|
|||
|
||||
let copyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library."
|
||||
|
||||
// File system information
|
||||
// File system information
|
||||
let solutionFile = "OpenTK.sln"
|
||||
|
||||
// Pattern specifying assemblies to be tested using NUnit
|
||||
|
@ -50,7 +50,7 @@ let testAssemblies = "tests/**/bin/Release/*Tests*.dll"
|
|||
|
||||
// Git configuration (used for publishing documentation in gh-pages branch)
|
||||
// The profile where the project is posted
|
||||
let gitOwner = "opentk"
|
||||
let gitOwner = "opentk"
|
||||
let gitHome = "https://github.com/" + gitOwner
|
||||
|
||||
// The name of the project on GitHub
|
||||
|
@ -70,7 +70,7 @@ let isXamarinPlatform = false //EnvironmentHelper.isMacOS || Environment.OSVersi
|
|||
|
||||
|
||||
// Helper active pattern for project types
|
||||
let (|Fsproj|Csproj|Vbproj|) (projFileName:string) =
|
||||
let (|Fsproj|Csproj|Vbproj|) (projFileName:string) =
|
||||
match projFileName with
|
||||
| f when f.EndsWith "fsproj" -> Fsproj
|
||||
| f when f.EndsWith "csproj" -> Csproj
|
||||
|
@ -78,8 +78,8 @@ let (|Fsproj|Csproj|Vbproj|) (projFileName:string) =
|
|||
| _ -> failwith (sprintf "Project file %s not supported. Unknown project type." projFileName)
|
||||
|
||||
|
||||
let activeProjects =
|
||||
let xamarinFilter f =
|
||||
let activeProjects =
|
||||
let xamarinFilter f =
|
||||
if isXamarinPlatform then
|
||||
f
|
||||
else
|
||||
|
@ -88,13 +88,13 @@ let activeProjects =
|
|||
-- "**/OpenTK.iOS.csproj"
|
||||
|
||||
!! "src/**/*.??proj"
|
||||
-- "**/OpenTK.GLWidget.csproj"
|
||||
++ "tests/**/OpenTK.Tests*.fsproj"
|
||||
|> xamarinFilter
|
||||
|
||||
// Generate assembly info files with the right version & up-to-date information
|
||||
Target "AssemblyInfo" (fun _ ->
|
||||
let getAssemblyInfoAttributes (projectName:string) =
|
||||
let projectName =
|
||||
let projectName =
|
||||
if projectName.Contains(".iOS") || projectName.Contains(".Android") then
|
||||
projectName.Split('.').[0]
|
||||
else
|
||||
|
@ -105,11 +105,12 @@ Target "AssemblyInfo" (fun _ ->
|
|||
Attribute.Version release.AssemblyVersion
|
||||
Attribute.FileVersion release.AssemblyVersion
|
||||
Attribute.CLSCompliant true
|
||||
Attribute.Copyright copyright ]
|
||||
Attribute.Copyright copyright
|
||||
]
|
||||
|
||||
let getProjectDetails projectPath =
|
||||
let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath)
|
||||
( projectPath,
|
||||
( projectPath,
|
||||
projectName,
|
||||
System.IO.Path.GetDirectoryName(projectPath),
|
||||
(getAssemblyInfoAttributes projectName)
|
||||
|
@ -126,7 +127,7 @@ Target "AssemblyInfo" (fun _ ->
|
|||
)
|
||||
|
||||
// Copies binaries from default VS location to expected bin folder
|
||||
// But keeps a subdirectory structure for each project in the
|
||||
// But keeps a subdirectory structure for each project in the
|
||||
// src folder to support multiple project outputs
|
||||
Target "CopyBinaries" (fun _ ->
|
||||
activeProjects
|
||||
|
@ -146,7 +147,7 @@ Target "Clean" (fun _ ->
|
|||
|
||||
Target "Build" (fun _ ->
|
||||
activeProjects
|
||||
|> MSBuildRelease "" "Rebuild"
|
||||
|> MSBuildRelease "" "Build"
|
||||
|> ignore
|
||||
)
|
||||
|
||||
|
@ -174,10 +175,10 @@ Target "NuGet" (fun _ ->
|
|||
"OpenTK.iOS" ]
|
||||
|
||||
|
||||
Paket.Pack(fun p ->
|
||||
Paket.Pack(fun p ->
|
||||
{ p with
|
||||
OutputPath = "bin"
|
||||
ExcludedTemplates = "OpenTK.GLWidget" :: xamExcludes
|
||||
ExcludedTemplates = xamExcludes
|
||||
Version = release.NugetVersion
|
||||
ReleaseNotes = toLines release.Notes})
|
||||
)
|
||||
|
@ -194,10 +195,10 @@ Target "All" DoNothing
|
|||
==> "AssemblyInfo"
|
||||
==> "Build"
|
||||
==> "CopyBinaries"
|
||||
// ==> "RunTests"
|
||||
==> "RunTests"
|
||||
==> "All"
|
||||
|
||||
"All"
|
||||
"All"
|
||||
==> "NuGet"
|
||||
|
||||
|
||||
|
|
3
build.sh
3
build.sh
|
@ -33,5 +33,4 @@ run .paket/paket.exe restore
|
|||
|
||||
[ ! -e build.fsx ] && run .paket/paket.exe update
|
||||
[ ! -e build.fsx ] && run packages/FAKE/tools/FAKE.exe init.fsx
|
||||
run packages/FAKE/tools/FAKE.exe "$@" $FSIARGS build.fsx
|
||||
|
||||
run packages/FAKE/tools/FAKE.exe "$@" $FSIARGS build.fsx
|
|
@ -2,10 +2,13 @@ source https://nuget.org/api/v2
|
|||
|
||||
#Open packages
|
||||
|
||||
nuget CommandLineParser >= 2.1.1-beta
|
||||
nuget FSharp.Formatting
|
||||
nuget FsCheck
|
||||
nuget FsCheck.Xunit
|
||||
nuget StyleCop.Analyzers
|
||||
nuget xunit.runner.console
|
||||
nuget xunit.assert
|
||||
nuget FAKE
|
||||
nuget Mono.Cecil
|
||||
nuget GtkSharp
|
||||
nuget Mono.Cecil >= 0.10.0-beta6
|
||||
nuget gtk-sharp3
|
769
paket.lock
769
paket.lock
|
@ -1,165 +1,620 @@
|
|||
NUGET
|
||||
remote: https://www.nuget.org/api/v2
|
||||
FAKE (4.28)
|
||||
FsCheck (2.4)
|
||||
FSharp.Core (>= 3.1.2.5)
|
||||
FsCheck.Xunit (2.4)
|
||||
FsCheck (>= 2.4)
|
||||
xunit.extensibility.execution (>= 2.1 < 3.0)
|
||||
CommandLineParser (2.1.1-beta)
|
||||
System.Collections (>= 4.0.11-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Console (>= 4.0.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Diagnostics.Debug (>= 4.0.11-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Globalization (>= 4.0.11-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.IO (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Linq (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Linq.Expressions (>= 4.0.11-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Reflection (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Reflection.Extensions (>= 4.0.1-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Reflection.TypeExtensions (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Resources.ResourceManager (>= 4.0.1-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Runtime (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
System.Runtime.Extensions (>= 4.1.0-rc2-24027) - restriction: >= netstandard1.5
|
||||
FAKE (4.62.5)
|
||||
FsCheck (2.9)
|
||||
FSharp.Core (>= 4.1) - restriction: < netstandard1.6
|
||||
FSharp.Core (>= 4.1.17) - restriction: >= netstandard1.6
|
||||
NETStandard.Library (>= 1.6.1) - restriction: >= netstandard1.6
|
||||
FsCheck.Xunit (2.9)
|
||||
FsCheck (>= 2.9)
|
||||
FSharp.Core (>= 4.1.17) - restriction: >= netstandard1.6
|
||||
NETStandard.Library (>= 1.6.1) - restriction: >= netstandard1.6
|
||||
xunit.abstractions (>= 2.0.1) - restriction: >= netstandard1.6
|
||||
xunit.core (>= 2.2) - restriction: >= netstandard1.6
|
||||
xunit.extensibility.execution (>= 2.2 < 3.0) - restriction: < netstandard1.6
|
||||
FSharp.Compiler.Service (2.0.0.6)
|
||||
FSharp.Core (4.0.0.1)
|
||||
FSharp.Core (4.2.1)
|
||||
System.Collections (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.Console (>= 4.0) - restriction: >= netstandard1.6
|
||||
System.Diagnostics.Debug (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.Diagnostics.Tools (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Globalization (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.IO (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Linq (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Linq.Expressions (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Linq.Queryable (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Net.Requests (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.Reflection (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Reflection.Extensions (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Resources.ResourceManager (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Runtime (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Runtime.Extensions (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Runtime.Numerics (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Text.RegularExpressions (>= 4.1) - restriction: >= netstandard1.6
|
||||
System.Threading (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.Threading.Tasks (>= 4.0.11) - restriction: >= netstandard1.6
|
||||
System.Threading.Tasks.Parallel (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
System.Threading.Thread (>= 4.0) - restriction: >= netstandard1.6
|
||||
System.Threading.ThreadPool (>= 4.0.10) - restriction: >= netstandard1.6
|
||||
System.Threading.Timer (>= 4.0.1) - restriction: >= netstandard1.6
|
||||
FSharp.Formatting (2.14.4)
|
||||
FSharp.Compiler.Service (2.0.0.6)
|
||||
FSharpVSPowerTools.Core (>= 2.3 < 2.4)
|
||||
FSharpVSPowerTools.Core (2.3)
|
||||
FSharp.Compiler.Service (>= 2.0.0.3)
|
||||
GtkSharp (3.1.3)
|
||||
Mono.Cecil (0.9.6.1)
|
||||
System.Collections (4.0.10) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Threading (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Contracts (4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Globalization (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.IO (4.0.10) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Text.Encoding (>= 4.0) - framework: dnxcore50
|
||||
System.Text.Encoding (>= 4.0.10) - framework: dnxcore50
|
||||
System.Text.Encoding.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Threading (>= 4.0) - framework: dnxcore50
|
||||
System.Threading.Tasks (>= 4.0) - framework: dnxcore50
|
||||
System.Linq (4.0) - framework: dnxcore50
|
||||
System.Collections (>= 4.0.10) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0.10) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0.10) - framework: dnxcore50
|
||||
System.Linq.Expressions (4.0.10) - framework: dnxcore50
|
||||
System.Collections (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0) - framework: dnxcore50
|
||||
System.IO (>= 4.0) - framework: dnxcore50
|
||||
System.Linq (>= 4.0) - framework: dnxcore50
|
||||
System.ObjectModel (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Emit (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.TypeExtensions (>= 4.0) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Threading (>= 4.0) - framework: dnxcore50
|
||||
System.ObjectModel (4.0.10) - framework: dnxcore50
|
||||
System.Collections (>= 4.0.10) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0.10) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Threading (>= 4.0.10) - framework: dnxcore50
|
||||
System.Private.Uri (4.0) - framework: dnxcore50
|
||||
System.Reflection (4.0.10) - framework: dnxcore50
|
||||
System.IO (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Reflection.Emit (4.0) - framework: dnxcore50
|
||||
System.IO (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Emit.ILGeneration (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Emit.ILGeneration (4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Extensions (4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0.10) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0.10) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.TypeExtensions (>= 4.0) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0.10) - framework: dnxcore50
|
||||
System.Reflection.Primitives (4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Threading (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.TypeExtensions (4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Contracts (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0.10) - framework: dnxcore50
|
||||
System.Linq (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0.10) - framework: dnxcore50
|
||||
System.Reflection.Primitives (>= 4.0) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0.10) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (4.0) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime (4.0.20) - framework: dnxcore50
|
||||
System.Private.Uri (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime.Extensions (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Text.Encoding (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Text.Encoding.Extensions (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Text.Encoding (>= 4.0.10) - framework: dnxcore50
|
||||
System.Text.RegularExpressions (4.0.10) - framework: dnxcore50
|
||||
System.Collections (>= 4.0.10) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0.10) - framework: dnxcore50
|
||||
System.Resources.ResourceManager (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0.20) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0.10) - framework: dnxcore50
|
||||
System.Threading (>= 4.0.10) - framework: dnxcore50
|
||||
System.Threading (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Threading.Tasks (>= 4.0) - framework: dnxcore50
|
||||
System.Threading.Tasks (4.0.10) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
xunit.abstractions (2.0) - framework: >= net45, dnx451, dnxcore50, monoandroid, monotouch, xamarinios, winv4.5, wpv8.0, wpav8.1
|
||||
xunit.assert (2.1)
|
||||
System.Collections (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0) - framework: dnxcore50
|
||||
System.Linq (>= 4.0) - framework: dnxcore50
|
||||
System.ObjectModel (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Text.RegularExpressions (>= 4.0) - framework: dnxcore50
|
||||
System.Threading.Tasks (>= 4.0) - framework: dnxcore50
|
||||
xunit.extensibility.core (2.1) - framework: >= net45, dnx451, dnxcore50, monoandroid, monotouch, xamarinios, winv4.5, wpv8.0, wpav8.1
|
||||
xunit.abstractions (2.0)
|
||||
xunit.extensibility.execution (2.1)
|
||||
System.Collections (>= 4.0) - framework: dnxcore50
|
||||
System.Diagnostics.Debug (>= 4.0) - framework: dnxcore50
|
||||
System.Globalization (>= 4.0) - framework: dnxcore50
|
||||
System.IO (>= 4.0) - framework: dnxcore50
|
||||
System.Linq (>= 4.0) - framework: dnxcore50
|
||||
System.Linq.Expressions (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection (>= 4.0) - framework: dnxcore50
|
||||
System.Reflection.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime (>= 4.0) - framework: dnxcore50
|
||||
System.Runtime.Extensions (>= 4.0) - framework: dnxcore50
|
||||
System.Text.Encoding (>= 4.0) - framework: dnxcore50
|
||||
System.Threading (>= 4.0) - framework: dnxcore50
|
||||
System.Threading.Tasks (>= 4.0) - framework: dnxcore50
|
||||
xunit.abstractions (>= 2.0) - framework: dnxcore50
|
||||
xunit.extensibility.core (2.1) - framework: >= net45, dnx451, dnxcore50, monoandroid, monotouch, xamarinios, winv4.5, wpv8.0, wpav8.1
|
||||
xunit.runner.console (2.1)
|
||||
gtk-sharp3 (3.22)
|
||||
Microsoft.NETCore.Platforms (1.1) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net35) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net46) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.2)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Targets (1.1) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net35) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.2) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net46) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.2)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.1) (>= netstandard1.6) (< monoandroid)) (&& (< netstandard1.2) (>= netstandard1.6) (< monoandroid)) (&& (< netstandard1.3) (>= netstandard1.6) (< monoandroid)) (&& (< netstandard1.5) (>= netstandard1.6) (< monoandroid)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)) (>= netcore1.1)
|
||||
Microsoft.Win32.Primitives (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Mono.Cecil (0.10.0-beta6)
|
||||
System.Collections (>= 4.0.11) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.IO.FileSystem (>= 4.0.1) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.IO.FileSystem.Primitives (>= 4.0.1) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.Reflection (>= 4.1) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.Runtime.Extensions (>= 4.1) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.Security.Cryptography.Algorithms (>= 4.2) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.Security.Cryptography.Csp (>= 4.0) - restriction: && (< net35) (>= netstandard1.3)
|
||||
System.Threading (>= 4.0.11) - restriction: && (< net35) (>= netstandard1.3)
|
||||
NETStandard.Library (1.6.1) - restriction: || (&& (< net35) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: >= netstandard1.0
|
||||
Microsoft.Win32.Primitives (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.AppContext (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Collections (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Collections.Concurrent (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Console (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Diagnostics.Tools (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Globalization (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Globalization.Calendars (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.IO (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.IO.Compression (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.IO.Compression.ZipFile (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.IO.FileSystem (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.IO.FileSystem.Primitives (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Linq (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Linq.Expressions (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Net.Http (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Net.Primitives (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Net.Sockets (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.ObjectModel (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Reflection (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Reflection.Extensions (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Runtime (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Runtime.Handles (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Runtime.InteropServices.RuntimeInformation (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Runtime.Numerics (>= 4.3) - restriction: >= netstandard1.1
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Security.Cryptography.X509Certificates (>= 4.3) - restriction: >= netstandard1.3
|
||||
System.Text.Encoding (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Text.Encoding.Extensions (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Text.RegularExpressions (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Threading (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Threading.Tasks (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Threading.Timer (>= 4.3) - restriction: >= netstandard1.2
|
||||
System.Xml.ReaderWriter (>= 4.3) - restriction: >= netstandard1.0
|
||||
System.Xml.XDocument (>= 4.3) - restriction: >= netstandard1.0
|
||||
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.native.System (4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1)
|
||||
Microsoft.NETCore.Targets (>= 1.1)
|
||||
runtime.native.System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1)
|
||||
Microsoft.NETCore.Targets (>= 1.1)
|
||||
runtime.native.System.Net.Http (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Platforms (>= 1.1)
|
||||
Microsoft.NETCore.Targets (>= 1.1)
|
||||
runtime.native.System.Security.Cryptography.Apple (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (>= 4.3)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3.1)
|
||||
runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.1) - restriction: || (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
StyleCop.Analyzers (1.0.2)
|
||||
System.AppContext (4.3) - restriction: || (&& (< net452) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.6) (< monoandroid)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Buffers (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Threading (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Collections (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.3) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Collections.Concurrent (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (>= netstandard1.6)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Console (4.3) - restriction: || (&& (< net452) (>= netstandard1.3)) (>= netstandard1.5)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Diagnostics.Debug (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.DiagnosticSource (4.4) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac)
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac))
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netcore2.0) (< xamarinmac))
|
||||
System.Diagnostics.Tools (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Tracing (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Globalization (4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization.Calendars (4.3) - restriction: || (&& (< net452) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Globalization (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Globalization.Extensions (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Globalization (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (4.3) - restriction: || (&& (< net35) (>= net463)) (&& (< net35) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net35) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net35) (>= netstandard1.4) (< monoandroid)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.3) (>= netstandard1.6) (< monoandroid)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.IO.Compression (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
runtime.native.System (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
runtime.native.System.IO.Compression (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Buffers (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO.Compression.ZipFile (4.3) - restriction: || (&& (< net452) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
System.Buffers (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.Compression (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.FileSystem (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.FileSystem.Primitives (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.FileSystem (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (>= net46) (&& (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO.FileSystem.Primitives (4.3) - restriction: || (&& (< net35) (>= net46)) (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Linq (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.6) (< monoandroid) (< win8) (< wp8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.6) (< monoandroid) (< win8) (< wp8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Linq.Expressions (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.3) (>= netstandard1.6) (< monoandroid)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Collections (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Globalization (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.IO (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Linq (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.ObjectModel (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection.Emit (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection.Emit.ILGeneration (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection.Emit.Lightweight (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection.TypeExtensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Linq.Queryable (4.3) - restriction: >= netstandard1.6
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Linq (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Linq.Expressions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Net.Http (4.3.2) - restriction: || (&& (< net452) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.Win32.Primitives (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)
|
||||
runtime.native.System (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Net.Http (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.DiagnosticSource (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Globalization.Extensions (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.IO.Compression (>= 4.3) - restriction: && (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)
|
||||
System.IO.FileSystem (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Net.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.X509Certificates (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= net46) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Net.Primitives (4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Net.Requests (4.3) - restriction: >= netstandard1.6
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
System.Net.Http (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Net.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
System.Net.WebHeaderCollection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.0) (< netstandard1.1) (< monoandroid) (< win8) (< wp8))
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Net.Sockets (4.3) - restriction: || (&& (< net452) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Net.Primitives (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Net.WebHeaderCollection (4.3) - restriction: || (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Collections (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.ObjectModel (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.3) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monoandroid)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Reflection.Emit (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection.Emit.ILGeneration (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection.Emit.ILGeneration (4.3) - restriction: || (&& (>= dnxcore50) (>= netstandard1.5)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Reflection.Emit.Lightweight (4.3) - restriction: || (&& (>= dnxcore50) (>= netstandard1.5)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Reflection.Emit.ILGeneration (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< wp8)
|
||||
System.Reflection.Extensions (4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection.Primitives (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net35) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection.TypeExtensions (4.3) - restriction: || (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.5) (< monoandroid)) (&& (< net46) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= net462) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.5) (< monoandroid)) (&& (< net46) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (4.3) - restriction: || (&& (< net35) (>= net463)) (&& (< net35) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net35) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net35) (>= netstandard1.4) (< monoandroid)) (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.1) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (&& (< net452) (>= net462)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net452) (>= netstandard1.3) (< netstandard1.6) (< monoandroid)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net452) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (&& (>= net462) (>= netstandard1.6)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.2)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (< netstandard1.3) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monoandroid)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.2) (< monoandroid) (< win8) (< wp8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.2) (< monoandroid) (< win8) (< wp8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (>= netstandard1.5) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50)
|
||||
System.Runtime.Handles (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net452) (>= netstandard1.3)) (&& (< net452) (>= netstandard1.4) (< monoandroid)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.InteropServices (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50) (>= netcore1.1)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50) (>= netcore1.1)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50) (>= netcore1.1)
|
||||
System.Reflection.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50) (>= netcore1.1)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.2) (< monoandroid) (< win8)) (&& (< net45) (>= netstandard1.2) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= net462) (>= dnxcore50) (>= netcore1.1)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< netstandard1.5) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (>= dnxcore50) (>= netcore1.1)
|
||||
System.Runtime.InteropServices.RuntimeInformation (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
runtime.native.System (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: && (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Numerics (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Security.Cryptography.Algorithms (4.3) - restriction: || (&& (< net35) (>= net46)) (&& (< net35) (>= netstandard1.3)) (&& (< net452) (>= net46) (< netstandard1.4)) (&& (< net452) (>= net461)) (&& (< net452) (>= netstandard1.3)) (&& (< net452) (>= netstandard1.4) (< monoandroid)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.native.System.Security.Cryptography.Apple (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Collections (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= net463) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= net463) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Numerics (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (>= net463) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= net461) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Cng (4.3) - restriction: || (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: || (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< net46) (>= netstandard1.4)) (>= net461) (>= netstandard1.6)
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< net46) (>= netstandard1.4)) (>= net461) (>= netstandard1.6)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.4)) (>= netstandard1.6)
|
||||
System.Security.Cryptography.Csp (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Reflection (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: || (>= net46) (&& (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (>= net46) (&& (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< net35) (>= net463)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net452) (>= net46) (< netstandard1.4)) (&& (< net452) (>= net461)) (&& (< net452) (>= netstandard1.3)) (&& (< net452) (>= netstandard1.4) (< monoandroid)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Collections (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Collections.Concurrent (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Linq (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.OpenSsl (4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: || (>= net463) (>= netstandard1.6) (>= monoandroid)
|
||||
System.Collections (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Handles (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Numerics (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (>= net463) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< net35) (>= net46)) (&& (< net35) (>= net461)) (&& (< net35) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net35) (>= netstandard1.4) (< monoandroid)) (&& (< net452) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.3)) (>= netstandard1.6)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Globalization (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.IO (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.X509Certificates (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net452) (>= net46)) (&& (< net452) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
runtime.native.System (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Net.Http (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
runtime.native.System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Collections (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Globalization (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Globalization.Calendars (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.IO (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.IO.FileSystem (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.IO.FileSystem.Primitives (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Handles (>= 4.3) - restriction: || (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime.Numerics (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Algorithms (>= 4.3) - restriction: || (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= net461) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Cng (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.Csp (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (>= net46) (< netstandard1.4)) (&& (< net46) (>= netstandard1.3) (< netstandard1.4) (< monoandroid)) (&& (< net46) (>= netstandard1.4) (< netstandard1.6) (< monoandroid)) (>= net461) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Security.Cryptography.OpenSsl (>= 4.3) - restriction: && (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Text.Encoding (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net46) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding.Extensions (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.RegularExpressions (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
System.Collections (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< netcore1.1) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Globalization (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< netcore1.1) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< netcore1.1) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< netstandard1.6) (< monoandroid) (< win8) (< wpa81)) (>= dnxcore50) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac)) (>= netcore1.1)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< netcore1.1) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading (>= 4.3) - restriction: || (>= dnxcore50) (&& (>= netstandard1.6) (< netcore1.1) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Threading (4.3) - restriction: || (&& (< net35) (>= netstandard1.3)) (&& (< net45) (>= netstandard1.1) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (>= netstandard1.6)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (4.3) - restriction: || (&& (< net35) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net45) (< netstandard1.3) (>= netstandard1.5) (< monoandroid)) (&& (< net45) (>= netstandard1.5) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (< net452) (>= netstandard1.1)) (&& (< net452) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.3)) (&& (>= dnxcore50) (>= netstandard1.5)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks.Extensions (4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (>= dnxcore50) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarinios) (< xamarinmac))
|
||||
System.Collections (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)
|
||||
System.Runtime (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: && (< net45) (>= netstandard1.0) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wp8) (< wpa81)
|
||||
System.Threading.Tasks.Parallel (4.3) - restriction: >= netstandard1.6
|
||||
System.Collections.Concurrent (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Tracing (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Thread (4.3) - restriction: >= netstandard1.6
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading.ThreadPool (4.3) - restriction: >= netstandard1.6
|
||||
System.Runtime (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Runtime.Handles (>= 4.3) - restriction: && (< net46) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac)
|
||||
System.Threading.Timer (4.3) - restriction: || (&& (< net452) (>= netstandard1.2)) (>= netstandard1.6)
|
||||
Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (>= dnxcore50)
|
||||
Microsoft.NETCore.Targets (>= 1.1) - restriction: || (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net451) (>= netstandard1.2) (< monotouch) (< xamarinios) (< xamarinmac) (< win81) (< wpa81)) (>= dnxcore50)
|
||||
System.Xml.ReaderWriter (4.3) - restriction: || (&& (< net45) (>= netstandard1.1) (< netstandard1.3) (< monoandroid) (< win8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (&& (< net452) (>= netstandard1.1)) (&& (>= dnxcore50) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO.FileSystem (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO.FileSystem.Primitives (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.InteropServices (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.RegularExpressions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading.Tasks.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Xml.XDocument (4.3) - restriction: || (&& (< net452) (>= netstandard1.1)) (>= netstandard1.6)
|
||||
System.Collections (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Diagnostics.Tools (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Globalization (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.IO (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Reflection (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Resources.ResourceManager (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Runtime.Extensions (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Text.Encoding (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Threading (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
System.Xml.ReaderWriter (>= 4.3) - restriction: || (&& (< net45) (>= netstandard1.0) (< netstandard1.3) (< monoandroid) (< win8) (< wp8) (< wpa81)) (&& (< net45) (>= netstandard1.3) (< monotouch) (< xamarinios) (< xamarinmac) (< win8) (< wpa81)) (>= dnxcore50)
|
||||
xunit.abstractions (2.0.1) - restriction: >= netstandard1.1
|
||||
NETStandard.Library (>= 1.6) - restriction: && (< net35) (>= netstandard1.0)
|
||||
xunit.assert (2.2)
|
||||
NETStandard.Library (>= 1.6) - restriction: && (< net452) (>= netstandard1.1)
|
||||
xunit.core (2.2) - restriction: >= netstandard1.6
|
||||
xunit.extensibility.core (2.2)
|
||||
xunit.extensibility.execution (2.2)
|
||||
xunit.extensibility.core (2.2) - restriction: >= netstandard1.1
|
||||
NETStandard.Library (>= 1.6) - restriction: && (< net452) (>= netstandard1.1)
|
||||
xunit.abstractions (>= 2.0.1) - restriction: >= netstandard1.1
|
||||
xunit.extensibility.execution (2.2)
|
||||
NETStandard.Library (>= 1.6) - restriction: && (< net452) (>= netstandard1.1)
|
||||
xunit.extensibility.core (2.2) - restriction: >= netstandard1.1
|
||||
xunit.runner.console (2.2)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit Library
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -24,31 +23,25 @@
|
|||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text.RegularExpressions;
|
||||
using Bind.Structures;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind
|
||||
{
|
||||
enum WriteOptions
|
||||
internal enum WriteOptions
|
||||
{
|
||||
Default = 0,
|
||||
NoIndent = 1
|
||||
}
|
||||
|
||||
class BindStreamWriter : IDisposable
|
||||
internal class BindStreamWriter : IDisposable
|
||||
{
|
||||
static readonly string[] SplitStrings = new string[] { System.Environment.NewLine };
|
||||
readonly StreamWriter sw;
|
||||
private static readonly string[] SplitStrings = new string[] { System.Environment.NewLine };
|
||||
private readonly StreamWriter sw;
|
||||
public readonly string File;
|
||||
|
||||
bool newline = true;
|
||||
int indent_level = 0;
|
||||
private bool newline = true;
|
||||
private int indent_level = 0;
|
||||
|
||||
public BindStreamWriter(string file)
|
||||
{
|
||||
|
@ -64,9 +57,11 @@ namespace Bind
|
|||
public void Unindent()
|
||||
{
|
||||
if (indent_level > 0)
|
||||
{
|
||||
--indent_level;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void Write(WriteOptions options, string value)
|
||||
{
|
||||
var lines = value.Split(SplitStrings, StringSplitOptions.None);
|
||||
|
@ -143,12 +138,14 @@ namespace Bind
|
|||
sw.Close();
|
||||
}
|
||||
|
||||
void WriteIndentations(WriteOptions options)
|
||||
private void WriteIndentations(WriteOptions options)
|
||||
{
|
||||
if (options != WriteOptions.NoIndent)
|
||||
{
|
||||
for (int i = indent_level; i > 0; i--)
|
||||
{
|
||||
sw.Write(" ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.XPath;
|
||||
using Bind.GL2;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind.CL
|
||||
{
|
||||
class CLGenerator : ES.ESGenerator
|
||||
internal class CLGenerator : ES.ESGenerator
|
||||
{
|
||||
public CLGenerator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,7 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -39,12 +37,10 @@ namespace Bind
|
|||
using Enum = Bind.Structures.Enum;
|
||||
using Type = Bind.Structures.Type;
|
||||
|
||||
sealed class CSharpSpecWriter
|
||||
internal sealed class CSharpSpecWriter
|
||||
{
|
||||
IBind Generator { get; set; }
|
||||
Settings Settings { get { return Generator.Settings; } }
|
||||
|
||||
#region ISpecWriter Members
|
||||
private IBind Generator { get; set; }
|
||||
private Settings Settings { get { return Generator.Settings; } }
|
||||
|
||||
public void WriteBindings(IBind generator)
|
||||
{
|
||||
|
@ -52,28 +48,26 @@ namespace Bind
|
|||
WriteBindings(generator.Delegates, generator.Wrappers, generator.Enums);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
|
||||
private static void ConsoleRewrite(string text)
|
||||
{
|
||||
int left = Console.CursorLeft;
|
||||
int top = Console.CursorTop;
|
||||
Console.Write(text);
|
||||
for (int i = text.Length; i < 80; i++)
|
||||
{
|
||||
Console.Write(" ");
|
||||
}
|
||||
Console.WriteLine();
|
||||
Console.SetCursorPosition(left, top);
|
||||
}
|
||||
|
||||
#region WriteBindings
|
||||
|
||||
void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
||||
private void WriteBindings(DelegateCollection delegates, FunctionCollection wrappers, EnumCollection enums)
|
||||
{
|
||||
Console.WriteLine("Writing bindings to {0}", Settings.OutputPath);
|
||||
if (!Directory.Exists(Settings.OutputPath))
|
||||
{
|
||||
Directory.CreateDirectory(Settings.OutputPath);
|
||||
}
|
||||
|
||||
string temp_enums_file = Path.GetTempFileName();
|
||||
string temp_wrappers_file = Path.GetTempFileName();
|
||||
|
@ -94,7 +88,9 @@ namespace Bind
|
|||
sw.WriteLine("static partial class {0}", Settings.OutputClass);
|
||||
}
|
||||
else
|
||||
{
|
||||
sw.WriteLine("namespace {0}", Settings.EnumsOutput);
|
||||
}
|
||||
|
||||
sw.WriteLine("{");
|
||||
|
||||
|
@ -134,20 +130,28 @@ namespace Bind
|
|||
string output_core = Path.Combine(Settings.OutputPath, Settings.ImportsFile);
|
||||
string output_wrappers = Path.Combine(Settings.OutputPath, Settings.WrappersFile);
|
||||
|
||||
if (File.Exists(output_enums)) File.Delete(output_enums);
|
||||
if (File.Exists(output_delegates)) File.Delete(output_delegates);
|
||||
if (File.Exists(output_core)) File.Delete(output_core);
|
||||
if (File.Exists(output_wrappers)) File.Delete(output_wrappers);
|
||||
if (File.Exists(output_enums))
|
||||
{
|
||||
File.Delete(output_enums);
|
||||
}
|
||||
if (File.Exists(output_delegates))
|
||||
{
|
||||
File.Delete(output_delegates);
|
||||
}
|
||||
if (File.Exists(output_core))
|
||||
{
|
||||
File.Delete(output_core);
|
||||
}
|
||||
if (File.Exists(output_wrappers))
|
||||
{
|
||||
File.Delete(output_wrappers);
|
||||
}
|
||||
|
||||
File.Move(temp_enums_file, output_enums);
|
||||
File.Move(temp_wrappers_file, output_wrappers);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteWrappers
|
||||
|
||||
void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers,
|
||||
private void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers,
|
||||
DelegateCollection delegates, EnumCollection enums,
|
||||
IDictionary<string, string> CSTypes)
|
||||
{
|
||||
|
@ -163,7 +167,7 @@ namespace Bind
|
|||
sw.WriteLine("partial class {0}", Settings.OutputClass);
|
||||
sw.WriteLine("{");
|
||||
sw.Indent();
|
||||
|
||||
|
||||
// Write constructor
|
||||
sw.WriteLine("static {0}()", Settings.OutputClass);
|
||||
sw.WriteLine("{");
|
||||
|
@ -248,7 +252,7 @@ namespace Bind
|
|||
{
|
||||
sw.WriteLine("[Slot({0})]", d.Slot);
|
||||
sw.WriteLine("[DllImport(Library, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]");
|
||||
sw.WriteLine("static extern {0};", GetDeclarationString(d, false));
|
||||
sw.WriteLine("private static extern {0};", GetDeclarationString(d, false));
|
||||
current_signature++;
|
||||
}
|
||||
|
||||
|
@ -258,7 +262,7 @@ namespace Bind
|
|||
Console.WriteLine("Wrote {0} wrappers for {1} signatures", current_wrapper, current_signature);
|
||||
}
|
||||
|
||||
void WriteWrapper(BindStreamWriter sw, Function f, EnumCollection enums)
|
||||
private void WriteWrapper(BindStreamWriter sw, Function f, EnumCollection enums)
|
||||
{
|
||||
if ((Settings.Compatibility & Settings.Legacy.NoDocumentation) == 0)
|
||||
{
|
||||
|
@ -287,10 +291,10 @@ namespace Bind
|
|||
sw.WriteLine("[CLSCompliant(false)]");
|
||||
}
|
||||
|
||||
sw.WriteLine("public static {0} {{ throw new NotImplementedException(); }}", GetDeclarationString(f, Settings.Compatibility));
|
||||
sw.WriteLine("public static {0} {{ throw new BindingsNotRewrittenException(); }}", GetDeclarationString(f, Settings.Compatibility));
|
||||
}
|
||||
|
||||
void WriteDocumentation(BindStreamWriter sw, Function f)
|
||||
private void WriteDocumentation(BindStreamWriter sw, Function f)
|
||||
{
|
||||
var docs = f.Documentation;
|
||||
|
||||
|
@ -310,9 +314,13 @@ namespace Bind
|
|||
else if (!String.IsNullOrEmpty(f.Version))
|
||||
{
|
||||
if (f.Category.StartsWith("VERSION"))
|
||||
{
|
||||
category = String.Format("[requires: {0}]", "v" + f.Version);
|
||||
}
|
||||
else
|
||||
{
|
||||
category = String.Format("[requires: {0}]", "v" + f.Version + " or " + f.Category);
|
||||
}
|
||||
}
|
||||
|
||||
// Write function summary
|
||||
|
@ -372,7 +380,7 @@ namespace Bind
|
|||
}
|
||||
if (!String.IsNullOrEmpty(docparam.Documentation))
|
||||
{
|
||||
sw.WriteLine(WriteOptions.NoIndent, " ");
|
||||
sw.WriteLine(WriteOptions.NoIndent, "");
|
||||
sw.WriteLine("/// {0}", docparam.Documentation);
|
||||
sw.WriteLine("/// </param>");
|
||||
}
|
||||
|
@ -395,13 +403,9 @@ namespace Bind
|
|||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("[Warning] Error documenting function {0}: {1}", f.WrappedDelegate.Name, e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteTypes
|
||||
|
||||
public void WriteTypes(BindStreamWriter sw, Dictionary<string, string> CSTypes)
|
||||
{
|
||||
sw.WriteLine();
|
||||
|
@ -411,11 +415,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteConstants
|
||||
|
||||
void WriteConstants(BindStreamWriter sw, IEnumerable<Constant> constants)
|
||||
private void WriteConstants(BindStreamWriter sw, IEnumerable<Constant> constants)
|
||||
{
|
||||
// Make sure everything is sorted. This will avoid random changes between
|
||||
// consecutive runs of the program.
|
||||
|
@ -435,24 +435,26 @@ namespace Bind
|
|||
|
||||
sw.Write(str);
|
||||
if (!String.IsNullOrEmpty(str))
|
||||
{
|
||||
sw.WriteLine(",");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteEnums
|
||||
|
||||
void WriteEnums(BindStreamWriter sw, EnumCollection enums, FunctionCollection wrappers)
|
||||
private void WriteEnums(BindStreamWriter sw, EnumCollection enums, FunctionCollection wrappers)
|
||||
{
|
||||
//sw.WriteLine("#pragma warning disable 3019"); // CLSCompliant attribute
|
||||
//sw.WriteLine("#pragma warning disable 1591"); // Missing doc comments
|
||||
//sw.WriteLine();
|
||||
|
||||
if ((Settings.Compatibility & Settings.Legacy.NestedEnums) != Settings.Legacy.None)
|
||||
{
|
||||
Trace.WriteLine(String.Format("Writing enums to:\t{0}.{1}.{2}", Settings.OutputNamespace, Settings.OutputClass, Settings.NestedEnumsClass));
|
||||
}
|
||||
else
|
||||
{
|
||||
Trace.WriteLine(String.Format("Writing enums to:\t{0}", Settings.EnumsOutput));
|
||||
}
|
||||
|
||||
if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) == Settings.Legacy.None)
|
||||
{
|
||||
|
@ -506,11 +508,17 @@ namespace Bind
|
|||
}
|
||||
|
||||
if (@enum.IsObsolete)
|
||||
{
|
||||
sw.WriteLine("[Obsolete(\"{0}\")]", @enum.Obsolete);
|
||||
}
|
||||
if (!@enum.CLSCompliant)
|
||||
{
|
||||
sw.WriteLine("[CLSCompliant(false)]");
|
||||
}
|
||||
if (@enum.IsFlagCollection)
|
||||
{
|
||||
sw.WriteLine("[Flags]");
|
||||
}
|
||||
sw.WriteLine("public enum " + @enum.Name + " : " + @enum.Type);
|
||||
sw.WriteLine("{");
|
||||
sw.Indent();
|
||||
|
@ -548,29 +556,24 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WriteLicense
|
||||
|
||||
public void WriteLicense(BindStreamWriter sw)
|
||||
{
|
||||
sw.WriteLine(File.ReadAllText(Path.Combine(Settings.InputPath, Settings.LicenseFile)));
|
||||
sw.WriteLine();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// For example, if parameter foo has indirection level = 1, then it
|
||||
// is consumed as 'foo*' in the fixed_statements and the call string.
|
||||
readonly static string[] pointer_levels = new string[] { "", "*", "**", "***", "****" };
|
||||
readonly static string[] array_levels = new string[] { "", "[]", "[,]", "[,,]", "[,,,]" };
|
||||
private readonly static string[] pointer_levels = new string[] { "", "*", "**", "***", "****" };
|
||||
|
||||
static bool IsEnum(string s, EnumCollection enums)
|
||||
private readonly static string[] array_levels = new string[] { "", "[]", "[,]", "[,,]", "[,,,]" };
|
||||
|
||||
private static bool IsEnum(string s, EnumCollection enums)
|
||||
{
|
||||
return enums.ContainsKey(s);
|
||||
}
|
||||
|
||||
string GetDeclarationString(Constant c)
|
||||
private string GetDeclarationString(Constant c)
|
||||
{
|
||||
if (String.IsNullOrEmpty(c.Name))
|
||||
{
|
||||
|
@ -586,13 +589,15 @@ namespace Bind
|
|||
c.Value);
|
||||
}
|
||||
|
||||
string GetDeclarationString(Delegate d, bool is_delegate)
|
||||
private string GetDeclarationString(Delegate d, bool is_delegate)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb.Append(d.Unsafe ? "unsafe " : "");
|
||||
if (is_delegate)
|
||||
{
|
||||
sb.Append("delegate ");
|
||||
}
|
||||
sb.Append(GetDeclarationString(d.ReturnType, Settings.Legacy.ConstIntEnums));
|
||||
sb.Append(" ");
|
||||
sb.Append(Settings.FunctionPrefix);
|
||||
|
@ -602,7 +607,7 @@ namespace Bind
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
string GetDeclarationString(Enum e)
|
||||
private string GetDeclarationString(Enum e)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<Constant> constants = new List<Constant>(e.ConstantCollection.Values);
|
||||
|
@ -610,12 +615,16 @@ namespace Bind
|
|||
{
|
||||
int ret = String.Compare(c1.Value, c2.Value);
|
||||
if (ret == 0)
|
||||
{
|
||||
return String.Compare(c1.Name, c2.Name);
|
||||
}
|
||||
return ret;
|
||||
});
|
||||
|
||||
if (e.IsFlagCollection)
|
||||
{
|
||||
sb.AppendLine("[Flags]");
|
||||
}
|
||||
sb.Append("public enum ");
|
||||
sb.Append(e.Name);
|
||||
sb.Append(" : ");
|
||||
|
@ -628,14 +637,16 @@ namespace Bind
|
|||
sb.Append(" ");
|
||||
sb.Append(declaration);
|
||||
if (!String.IsNullOrEmpty(declaration))
|
||||
{
|
||||
sb.AppendLine(",");
|
||||
}
|
||||
}
|
||||
sb.Append("}");
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
string GetDeclarationString(Function f, Settings.Legacy settings)
|
||||
private string GetDeclarationString(Function f, Settings.Legacy settings)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
@ -651,15 +662,13 @@ namespace Bind
|
|||
if (f.Parameters.HasGenericParameters)
|
||||
{
|
||||
sb.Append("<");
|
||||
foreach (Parameter p in f.Parameters)
|
||||
foreach (Parameter p in f.Parameters.Where(p => p.Generic))
|
||||
{
|
||||
if (p.Generic)
|
||||
{
|
||||
sb.Append(p.CurrentType);
|
||||
sb.Append(",");
|
||||
}
|
||||
sb.Append(p.CurrentType);
|
||||
sb.Append(", ");
|
||||
}
|
||||
sb.Remove(sb.Length - 1, 1);
|
||||
|
||||
sb.Remove(sb.Length - 2, 2);
|
||||
sb.Append(">");
|
||||
}
|
||||
|
||||
|
@ -668,31 +677,70 @@ namespace Bind
|
|||
if (f.Parameters.HasGenericParameters)
|
||||
{
|
||||
sb.AppendLine();
|
||||
foreach (Parameter p in f.Parameters)
|
||||
foreach (Parameter p in f.Parameters.Where(p => p.Generic))
|
||||
{
|
||||
if (p.Generic)
|
||||
sb.AppendLine(String.Format(" where {0} : struct", p.CurrentType));
|
||||
sb.AppendLine(String.Format(" where {0} : struct", p.CurrentType));
|
||||
}
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
string GetDeclarationString(Parameter p, bool override_unsafe_setting, Settings.Legacy settings)
|
||||
private string GetDeclarationString(Parameter p, bool override_unsafe_setting, Settings.Legacy settings)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
List<string> attributes = new List<string>();
|
||||
if (p.Flow == FlowDirection.Out)
|
||||
sb.Append("[OutAttribute] ");
|
||||
{
|
||||
attributes.Add("OutAttribute");
|
||||
}
|
||||
else if (p.Flow == FlowDirection.Undefined)
|
||||
sb.Append("[InAttribute, OutAttribute] ");
|
||||
{
|
||||
attributes.Add("InAttribute");
|
||||
attributes.Add("OutAttribute");
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(p.ComputeSize))
|
||||
{
|
||||
int count;
|
||||
if (Int32.TryParse(p.ComputeSize, out count))
|
||||
{
|
||||
attributes.Add(String.Format("CountAttribute(Count = {0})", count));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (p.ComputeSize.StartsWith("COMPSIZE"))
|
||||
{
|
||||
//remove the compsize hint, just keep comma delimited param names
|
||||
var len = "COMPSIZE(".Length;
|
||||
var computed = p.ComputeSize.Substring(len, (p.ComputeSize.Length - len) - 1);
|
||||
attributes.Add(String.Format("CountAttribute(Computed = \"{0}\")", computed));
|
||||
}
|
||||
else
|
||||
{
|
||||
attributes.Add(String.Format("CountAttribute(Parameter = \"{0}\")", p.ComputeSize));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (attributes.Count != 0)
|
||||
{
|
||||
sb.Append("[");
|
||||
sb.Append(string.Join(", ", attributes));
|
||||
sb.Append("] ");
|
||||
}
|
||||
|
||||
if (p.Reference)
|
||||
{
|
||||
if (p.Flow == FlowDirection.Out)
|
||||
{
|
||||
sb.Append("out ");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("ref ");
|
||||
}
|
||||
}
|
||||
|
||||
if (!override_unsafe_setting && ((Settings.Compatibility & Settings.Legacy.NoPublicUnsafeFunctions) != Settings.Legacy.None))
|
||||
|
@ -719,7 +767,7 @@ namespace Bind
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
string GetDeclarationString(ParameterCollection parameters, Settings.Legacy settings)
|
||||
private string GetDeclarationString(ParameterCollection parameters, Settings.Legacy settings)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
|
@ -741,7 +789,7 @@ namespace Bind
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
string GetDeclarationString(Type type, Settings.Legacy settings)
|
||||
private string GetDeclarationString(Type type, Settings.Legacy settings)
|
||||
{
|
||||
var t = type.QualifiedType;
|
||||
if ((settings & Settings.Legacy.ConstIntEnums) != 0)
|
||||
|
@ -757,7 +805,5 @@ namespace Bind
|
|||
pointer_levels[type.Pointer],
|
||||
array_levels[type.Array]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,9 +3,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
|
||||
|
@ -13,32 +11,38 @@ using Bind.Structures;
|
|||
|
||||
namespace Bind
|
||||
{
|
||||
class DocProcessor
|
||||
internal class DocProcessor
|
||||
{
|
||||
static readonly char[] numbers = "0123456789".ToCharArray();
|
||||
static readonly Regex remove_mathml = new Regex(
|
||||
private static readonly char[] numbers = "0123456789".ToCharArray();
|
||||
|
||||
private static readonly Regex remove_mathml = new Regex(
|
||||
@"<(mml:math|inlineequation)[^>]*?>(?:.|\n)*?</\s*\1\s*>",
|
||||
RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace);
|
||||
static readonly Regex remove_doctype = new Regex(
|
||||
|
||||
private static readonly Regex remove_doctype = new Regex(
|
||||
@"<!DOCTYPE[^>\[]*(\[.*\])?>", RegexOptions.Compiled | RegexOptions.Multiline);
|
||||
static readonly Regex remove_xmlns = new Regex(
|
||||
|
||||
private static readonly Regex remove_xmlns = new Regex(
|
||||
"xmlns=\".+\"", RegexOptions.Compiled);
|
||||
|
||||
readonly Dictionary<string, string> DocumentationFiles =
|
||||
private readonly Dictionary<string, string> DocumentationFiles =
|
||||
new Dictionary<string, string>();
|
||||
readonly Dictionary<string, Documentation> DocumentationCache =
|
||||
|
||||
private readonly Dictionary<string, Documentation> DocumentationCache =
|
||||
new Dictionary<string, Documentation>();
|
||||
|
||||
Documentation Cached;
|
||||
string LastFile;
|
||||
private Documentation Cached;
|
||||
private string LastFile;
|
||||
|
||||
IBind Generator { get; set; }
|
||||
Settings Settings { get { return Generator.Settings; } }
|
||||
private IBind Generator { get; set; }
|
||||
private Settings Settings { get { return Generator.Settings; } }
|
||||
|
||||
public DocProcessor(IBind generator)
|
||||
{
|
||||
if (generator == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
Generator = generator;
|
||||
foreach (string file in Directory.GetFiles(Settings.DocPath).Concat(
|
||||
|
@ -64,9 +68,13 @@ namespace Bind
|
|||
{
|
||||
var file = Settings.FunctionPrefix + f.WrappedDelegate.Name + ".xml";
|
||||
if (!DocumentationFiles.ContainsKey(file))
|
||||
{
|
||||
file = Settings.FunctionPrefix + f.TrimmedName + ".xml";
|
||||
}
|
||||
if (!DocumentationFiles.ContainsKey(file))
|
||||
{
|
||||
file = Settings.FunctionPrefix + f.TrimmedName.TrimEnd(numbers) + ".xml";
|
||||
}
|
||||
|
||||
docs =
|
||||
(DocumentationFiles.ContainsKey(file) ? ProcessFile(DocumentationFiles[file], processor) : null) ??
|
||||
|
@ -87,12 +95,14 @@ namespace Bind
|
|||
// found in the <!-- eqn: :--> comments in the docs.
|
||||
// Todo: Some simple MathML tags do not include comments, find a solution.
|
||||
// Todo: Some files include more than 1 function - find a way to map these extra functions.
|
||||
Documentation ProcessFile(string file, EnumProcessor processor)
|
||||
private Documentation ProcessFile(string file, EnumProcessor processor)
|
||||
{
|
||||
string text;
|
||||
|
||||
if (LastFile == file)
|
||||
{
|
||||
return Cached;
|
||||
}
|
||||
|
||||
LastFile = file;
|
||||
text = File.ReadAllText(file);
|
||||
|
@ -148,10 +158,12 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
Documentation ToInlineDocs(XDocument doc, EnumProcessor enum_processor)
|
||||
private Documentation ToInlineDocs(XDocument doc, EnumProcessor enum_processor)
|
||||
{
|
||||
if (doc == null || enum_processor == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
var no_const_processing = Settings.Legacy.NoAdvancedEnumProcessing | Settings.Legacy.ConstIntEnums;
|
||||
if (!Generator.Settings.IsEnabled(no_const_processing))
|
||||
|
@ -190,8 +202,9 @@ namespace Bind
|
|||
return inline;
|
||||
}
|
||||
|
||||
static readonly char[] newline = new char[] { '\n' };
|
||||
static string Cleanup(string text)
|
||||
private static readonly char[] newline = new char[] { '\n' };
|
||||
|
||||
private static string Cleanup(string text)
|
||||
{
|
||||
return
|
||||
String.Join(" ", text
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using Bind.GL2;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind.ES
|
||||
{
|
||||
// Generation implementation for OpenGL ES 2.0 and 3.0
|
||||
class ES2Generator : Generator
|
||||
internal class ES2Generator : Generator
|
||||
{
|
||||
public ES2Generator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using Bind.GL2;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind.ES
|
||||
{
|
||||
// Generation implementation for OpenGL ES 3.1
|
||||
class ES31Generator : Generator
|
||||
internal class ES31Generator : Generator
|
||||
{
|
||||
public ES31Generator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using Bind.GL2;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind.ES
|
||||
{
|
||||
// Generation implementation for OpenGL ES 3.0
|
||||
class ES3Generator : Generator
|
||||
internal class ES3Generator : Generator
|
||||
{
|
||||
public ES3Generator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Xml.XPath;
|
||||
using System.IO;
|
||||
using Bind.GL2;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
|
||||
namespace Bind.ES
|
||||
{
|
||||
// Generator implementation for OpenGL ES 1.0 and 1.1
|
||||
class ESGenerator : Generator
|
||||
internal class ESGenerator : Generator
|
||||
{
|
||||
public ESGenerator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2010 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,12 +22,10 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.XPath;
|
||||
|
@ -37,19 +34,23 @@ using Enum = Bind.Structures.Enum;
|
|||
|
||||
namespace Bind
|
||||
{
|
||||
class EnumProcessor
|
||||
internal class EnumProcessor
|
||||
{
|
||||
readonly IEnumerable<string> Overrides;
|
||||
private readonly IEnumerable<string> Overrides;
|
||||
|
||||
IBind Generator { get; set; }
|
||||
Settings Settings { get { return Generator.Settings; } }
|
||||
private IBind Generator { get; set; }
|
||||
private Settings Settings { get { return Generator.Settings; } }
|
||||
|
||||
public EnumProcessor(IBind generator, IEnumerable<string> overrides)
|
||||
{
|
||||
if (generator == null)
|
||||
{
|
||||
throw new ArgumentNullException("generator");
|
||||
}
|
||||
if (overrides == null)
|
||||
{
|
||||
throw new ArgumentNullException("overrides");
|
||||
}
|
||||
|
||||
Generator = generator;
|
||||
Overrides = overrides;
|
||||
|
@ -71,7 +72,9 @@ namespace Bind
|
|||
public static string GetOverridesPath(string apiname, string enumeration)
|
||||
{
|
||||
if (enumeration == null)
|
||||
{
|
||||
throw new ArgumentNullException("enumeration");
|
||||
}
|
||||
|
||||
var path = new StringBuilder();
|
||||
path.Append("/signatures/replace");
|
||||
|
@ -87,9 +90,7 @@ namespace Bind
|
|||
return path.ToString();
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
EnumCollection ProcessNames(EnumCollection enums, XPathNavigator nav, string apiname)
|
||||
private EnumCollection ProcessNames(EnumCollection enums, XPathNavigator nav, string apiname)
|
||||
{
|
||||
EnumCollection processed_enums = new EnumCollection();
|
||||
foreach (var e in enums.Values)
|
||||
|
@ -125,7 +126,7 @@ namespace Bind
|
|||
return processed_enums;
|
||||
}
|
||||
|
||||
static string ReplaceName(XPathNavigator nav, string apiname, string name)
|
||||
private static string ReplaceName(XPathNavigator nav, string apiname, string name)
|
||||
{
|
||||
var enum_override = nav.SelectSingleNode(GetOverridesPath(apiname, name));
|
||||
if (enum_override != null)
|
||||
|
@ -139,7 +140,7 @@ namespace Bind
|
|||
return name;
|
||||
}
|
||||
|
||||
static bool IsAlreadyProcessed(string name)
|
||||
private static bool IsAlreadyProcessed(string name)
|
||||
{
|
||||
string extension = Utilities.GetExtension(name, true);
|
||||
bool unprocessed = false;
|
||||
|
@ -153,15 +154,21 @@ namespace Bind
|
|||
public string TranslateEnumName(string name)
|
||||
{
|
||||
if (String.IsNullOrEmpty(name))
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
if (Utilities.CSharpKeywords.Contains(name))
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
if (!IsAlreadyProcessed(name))
|
||||
{
|
||||
if (Char.IsDigit(name[0]))
|
||||
{
|
||||
name = Settings.ConstantPrefix + name;
|
||||
}
|
||||
|
||||
StringBuilder translator = new StringBuilder(name);
|
||||
|
||||
|
@ -198,11 +205,17 @@ namespace Bind
|
|||
}
|
||||
|
||||
if (is_after_underscore_or_number)
|
||||
{
|
||||
char_to_add = Char.ToUpper(c);
|
||||
}
|
||||
else if (is_previous_uppercase)
|
||||
{
|
||||
char_to_add = Char.ToLower(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
char_to_add = c;
|
||||
}
|
||||
|
||||
translator.Append(char_to_add);
|
||||
|
||||
|
@ -210,7 +223,7 @@ namespace Bind
|
|||
is_after_underscore_or_number = false;
|
||||
}
|
||||
|
||||
// First letter should always be uppercase in order
|
||||
// First letter should always be uppercase in order
|
||||
// to conform to .Net style guidelines.
|
||||
translator[0] = Char.ToUpper(translator[0]);
|
||||
|
||||
|
@ -223,13 +236,15 @@ namespace Bind
|
|||
|
||||
name = translator.ToString();
|
||||
if (name.StartsWith(Settings.EnumPrefix))
|
||||
{
|
||||
name = name.Substring(Settings.EnumPrefix.Length);
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
EnumCollection ProcessConstants(EnumCollection enums, XPathNavigator nav, string apiname)
|
||||
private EnumCollection ProcessConstants(EnumCollection enums, XPathNavigator nav, string apiname)
|
||||
{
|
||||
foreach (var e in enums.Values)
|
||||
{
|
||||
|
@ -262,7 +277,7 @@ namespace Bind
|
|||
return enums;
|
||||
}
|
||||
|
||||
static void ReplaceConstant(XPathNavigator enum_override, Constant c)
|
||||
private static void ReplaceConstant(XPathNavigator enum_override, Constant c)
|
||||
{
|
||||
if (enum_override != null)
|
||||
{
|
||||
|
@ -286,7 +301,9 @@ namespace Bind
|
|||
public string TranslateConstantName(string s, bool isValue)
|
||||
{
|
||||
if (String.IsNullOrEmpty(s))
|
||||
{
|
||||
return s;
|
||||
}
|
||||
|
||||
StringBuilder translator = new StringBuilder(s.Length);
|
||||
|
||||
|
@ -306,7 +323,9 @@ namespace Bind
|
|||
bool is_after_digit = false;
|
||||
|
||||
if (!isValue && Char.IsDigit(s[0]))
|
||||
{
|
||||
s = Settings.ConstantPrefix + s;
|
||||
}
|
||||
|
||||
foreach (char c in s)
|
||||
{
|
||||
|
@ -337,7 +356,9 @@ namespace Bind
|
|||
translator[0] = Char.ToUpper(translator[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
translator.Append(s);
|
||||
}
|
||||
}
|
||||
|
||||
return translator.ToString();
|
||||
|
@ -350,14 +371,20 @@ namespace Bind
|
|||
{
|
||||
// Trim the unsigned or long specifiers used in C constants ('u' or 'ull').
|
||||
if (value.ToLower().EndsWith("ull"))
|
||||
{
|
||||
value = value.Substring(0, value.Length - 3);
|
||||
}
|
||||
if (value.ToLower().EndsWith("u"))
|
||||
{
|
||||
value = value.Substring(0, value.Length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Strip the prefix, if any.
|
||||
if (value.StartsWith(Settings.ConstantPrefix))
|
||||
{
|
||||
value = value.Substring(Settings.ConstantPrefix.Length);
|
||||
}
|
||||
|
||||
return TranslateConstantName(value, IsValue(value));
|
||||
}
|
||||
|
@ -366,7 +393,7 @@ namespace Bind
|
|||
// (e.g. FOG_COORD_ARRAY_TYPE = GL_FOG_COORDINATE_ARRAY_TYPE)
|
||||
// In this case try searching all enums for the correct constant to alias (stupid opengl specs).
|
||||
// This turns every bare alias into a normal alias that is processed afterwards.
|
||||
static void ResolveBareAlias(Constant c, EnumCollection enums)
|
||||
private static void ResolveBareAlias(Constant c, EnumCollection enums)
|
||||
{
|
||||
// Constants are considered bare aliases when they don't have a reference and
|
||||
// their values are non-numeric.
|
||||
|
@ -387,7 +414,7 @@ namespace Bind
|
|||
// Resolve 'use' tokens by searching and replacing the correct
|
||||
// value from the enum collection.
|
||||
// Tokens that can't be resolved are removed.
|
||||
static void ResolveAliases(Enum e, EnumCollection enums)
|
||||
private static void ResolveAliases(Enum e, EnumCollection enums)
|
||||
{
|
||||
// Note that we have the removal must be a separate step, since
|
||||
// we cannot modify a collection while iterating with foreach.
|
||||
|
@ -401,7 +428,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
static bool IsValue(string test)
|
||||
private static bool IsValue(string test)
|
||||
{
|
||||
// Check if the result is a number.
|
||||
long number;
|
||||
|
@ -420,7 +447,5 @@ namespace Bind
|
|||
}
|
||||
return is_number;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,12 +22,10 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -38,33 +35,38 @@ using Delegate = Bind.Structures.Delegate;
|
|||
|
||||
namespace Bind
|
||||
{
|
||||
using Enum = Bind.Structures.Enum;
|
||||
using Type = Bind.Structures.Type;
|
||||
|
||||
class FuncProcessor
|
||||
internal class FuncProcessor
|
||||
{
|
||||
static readonly Regex Endings = new Regex(
|
||||
private static readonly Regex Endings = new Regex(
|
||||
@"([fd]v?|u?[isb](64)?v?|v|i_v|fi)$",
|
||||
RegexOptions.Compiled);
|
||||
static readonly Regex EndingsNotToTrim = new Regex(
|
||||
|
||||
private static readonly Regex EndingsNotToTrim = new Regex(
|
||||
"(sh|ib|[tdrey]s|[eE]n[vd]|bled" +
|
||||
"|Attrib|Access|Boolean|Coord|Depth|Feedbacks|Finish|Flag" +
|
||||
"|Groups|IDs|Indexed|Instanced|Pixels|Queries|Status|Tess|Through" +
|
||||
"|Uniforms|Varyings|Weight|Width)$",
|
||||
RegexOptions.Compiled);
|
||||
static readonly Regex EndingsAddV = new Regex("^0", RegexOptions.Compiled);
|
||||
|
||||
readonly IEnumerable<string> Overrides;
|
||||
private static readonly Regex EndingsAddV = new Regex("^0", RegexOptions.Compiled);
|
||||
|
||||
IBind Generator { get; set; }
|
||||
Settings Settings { get { return Generator.Settings; } }
|
||||
private readonly IEnumerable<string> Overrides;
|
||||
|
||||
private IBind Generator { get; set; }
|
||||
private Settings Settings { get { return Generator.Settings; } }
|
||||
|
||||
public FuncProcessor(IBind generator, IEnumerable<string> overrides)
|
||||
{
|
||||
if (generator == null)
|
||||
{
|
||||
throw new ArgumentNullException("generator");
|
||||
}
|
||||
if (overrides == null)
|
||||
{
|
||||
throw new ArgumentNullException("overrides");
|
||||
}
|
||||
|
||||
Generator = generator;
|
||||
Overrides = overrides;
|
||||
|
@ -141,9 +143,7 @@ namespace Bind
|
|||
return wrappers;
|
||||
}
|
||||
|
||||
#region Private Members
|
||||
|
||||
void GenerateDocumentation(FunctionCollection wrappers,
|
||||
private void GenerateDocumentation(FunctionCollection wrappers,
|
||||
EnumProcessor enum_processor, DocProcessor doc_processor)
|
||||
{
|
||||
foreach (var list in wrappers)
|
||||
|
@ -156,14 +156,14 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
void GenerateAddressTable(DelegateCollection delegates)
|
||||
private void GenerateAddressTable(DelegateCollection delegates)
|
||||
{
|
||||
// We allocate one slot per entry point. Rules:
|
||||
// - All extensions get a slot
|
||||
// - Core functions get a slot, unless UseDllImports is enabled
|
||||
// - On Windows, core functions with version > 1.1 must be treated as extensions.
|
||||
// This is controlled via the UseWindowsCompatibleGL setting.
|
||||
// Entry points without a slot are assigned the magic slot index -1.
|
||||
// Entry points without a slot are assigned the magic slot index -1.
|
||||
// Generator.Rewrite detects this and generates a static DllImport call
|
||||
// instead of a calli instruction for these functions.
|
||||
|
||||
|
@ -189,13 +189,13 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// When we have a list of overloaded delegates, make sure that
|
||||
// all generated wrappers use the first (original) delegate, not
|
||||
// the overloaded ones. This allows us to reduce the amount
|
||||
// of delegates we need to generate (1 per entry point instead
|
||||
// of 1 per overload), which improves loading times.
|
||||
static void RemoveOverloadedDelegates(DelegateCollection delegates, FunctionCollection wrappers)
|
||||
private static void RemoveOverloadedDelegates(DelegateCollection delegates, FunctionCollection wrappers)
|
||||
{
|
||||
foreach (var w in wrappers.Values.SelectMany(w => w))
|
||||
{
|
||||
|
@ -204,7 +204,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
static string GetPath(string apipath, string apiname, string apiversion, string function, string extension)
|
||||
private static string GetPath(string apipath, string apiname, string apiversion, string function, string extension)
|
||||
{
|
||||
var path = new StringBuilder();
|
||||
path.Append("/signatures/");
|
||||
|
@ -250,17 +250,17 @@ namespace Bind
|
|||
return path.ToString();
|
||||
}
|
||||
|
||||
static string GetOverloadsPath(string apiname, string apiversion, string function, string extension)
|
||||
private static string GetOverloadsPath(string apiname, string apiversion, string function, string extension)
|
||||
{
|
||||
return GetPath("overload", apiname, apiversion, function, extension);
|
||||
}
|
||||
|
||||
static string GetOverridesPath(string apiname, string apiversion, string function, string extension)
|
||||
private static string GetOverridesPath(string apiname, string apiversion, string function, string extension)
|
||||
{
|
||||
return GetPath("replace", apiname, apiversion, function, extension);
|
||||
}
|
||||
|
||||
void TranslateType(Bind.Structures.Type type,
|
||||
private void TranslateType(Bind.Structures.Type type,
|
||||
XPathNavigator function_override, XPathNavigator overrides,
|
||||
EnumProcessor enum_processor, EnumCollection enums,
|
||||
string category, string apiname)
|
||||
|
@ -353,15 +353,23 @@ namespace Bind
|
|||
{
|
||||
// For consistency - many overrides use string instead of String.
|
||||
if (enum_override.Value == "string")
|
||||
{
|
||||
type.QualifiedType = "String";
|
||||
}
|
||||
else if (enum_override.Value == "StringBuilder")
|
||||
type.QualifiedType = "StringBuilder";
|
||||
{
|
||||
throw new NotSupportedException("StringBuilder enum overrides are no longer supported");
|
||||
}
|
||||
else
|
||||
{
|
||||
type.CurrentType = enum_override.Value;
|
||||
}
|
||||
}
|
||||
|
||||
if (type.CurrentType == "IntPtr" && String.IsNullOrEmpty(type.PreviousType))
|
||||
{
|
||||
type.Pointer = 0;
|
||||
}
|
||||
|
||||
if (type.Pointer >= 3)
|
||||
{
|
||||
|
@ -379,7 +387,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
static string TranslateExtension(string extension)
|
||||
private static string TranslateExtension(string extension)
|
||||
{
|
||||
extension = extension.ToUpper();
|
||||
if (extension.Length > 2)
|
||||
|
@ -389,12 +397,12 @@ namespace Bind
|
|||
return extension;
|
||||
}
|
||||
|
||||
void TranslateExtension(Delegate d)
|
||||
private void TranslateExtension(Delegate d)
|
||||
{
|
||||
d.Extension = TranslateExtension(d.Extension);
|
||||
}
|
||||
|
||||
static string GetTrimmedExtension(string name, string extension)
|
||||
private static string GetTrimmedExtension(string name, string extension)
|
||||
{
|
||||
// Extensions are always uppercase
|
||||
int index = name.LastIndexOf(extension.ToUpper());
|
||||
|
@ -406,7 +414,7 @@ namespace Bind
|
|||
}
|
||||
|
||||
// Trims unecessary suffices from the specified OpenGL function name.
|
||||
static string GetTrimmedName(Delegate d)
|
||||
private static string GetTrimmedName(Delegate d)
|
||||
{
|
||||
string name = d.Name;
|
||||
string extension = d.Extension;
|
||||
|
@ -445,7 +453,7 @@ namespace Bind
|
|||
return trimmed_name;
|
||||
}
|
||||
|
||||
static XPathNodeIterator GetFuncOverload(XPathNavigator nav, Delegate d, string apiname, string apiversion)
|
||||
private static XPathNodeIterator GetFuncOverload(XPathNavigator nav, Delegate d, string apiname, string apiversion)
|
||||
{
|
||||
// Try a few different extension variations that appear in the overrides xml file
|
||||
string[] extensions = { d.Extension, TranslateExtension(d.Extension), d.Extension.ToUpper() };
|
||||
|
@ -457,18 +465,24 @@ namespace Bind
|
|||
string extensionless_name = GetTrimmedExtension(d.Name, ext);
|
||||
function_overload = nav.Select(GetOverloadsPath(apiname, apiversion, d.Name, ext));
|
||||
if (function_overload.Count != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
function_overload = nav.Select(GetOverloadsPath(apiname, apiversion, extensionless_name, ext));
|
||||
if (function_overload.Count != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
function_overload = nav.Select(GetOverloadsPath(apiname, apiversion, trimmed_name, ext));
|
||||
if (function_overload.Count != 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return function_overload;
|
||||
}
|
||||
|
||||
static XPathNavigator GetFuncOverride(XPathNavigator nav, Delegate d, string apiname, string apiversion)
|
||||
private static XPathNavigator GetFuncOverride(XPathNavigator nav, Delegate d, string apiname, string apiversion)
|
||||
{
|
||||
// Try a few different extension variations that appear in the overrides xml file
|
||||
string[] extensions = { d.Extension, TranslateExtension(d.Extension), d.Extension.ToUpper() };
|
||||
|
@ -491,12 +505,12 @@ namespace Bind
|
|||
return function_override;
|
||||
}
|
||||
|
||||
void TrimName(Function f)
|
||||
private void TrimName(Function f)
|
||||
{
|
||||
f.TrimmedName = GetTrimmedName(f);
|
||||
}
|
||||
|
||||
static void ApplyParameterReplacement(Delegate d, XPathNavigator function_override)
|
||||
private static void ApplyParameterReplacement(Delegate d, XPathNavigator function_override)
|
||||
{
|
||||
if (function_override != null)
|
||||
{
|
||||
|
@ -522,9 +536,16 @@ namespace Bind
|
|||
d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue);
|
||||
break;
|
||||
case "count":
|
||||
d.Parameters[i].ComputeSize = node.Value.Trim();
|
||||
int count;
|
||||
if (Int32.TryParse(node.Value, out count))
|
||||
if (Int32.TryParse(d.Parameters[i].ComputeSize, out count))
|
||||
{
|
||||
d.Parameters[i].ElementCount = count;
|
||||
}
|
||||
else
|
||||
{
|
||||
d.Parameters[i].ElementCount = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -533,7 +554,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
static void ApplyReturnTypeReplacement(Delegate d, XPathNavigator function_override)
|
||||
private static void ApplyReturnTypeReplacement(Delegate d, XPathNavigator function_override)
|
||||
{
|
||||
if (function_override != null)
|
||||
{
|
||||
|
@ -554,7 +575,7 @@ namespace Bind
|
|||
// 3) A generic object or void* (translates to IntPtr)
|
||||
// 4) A GLenum (translates to int on Legacy.Tao or GL.Enums.GLenum otherwise).
|
||||
// Return types must always be CLS-compliant, because .Net does not support overloading on return types.
|
||||
void TranslateReturnType(Delegate d,
|
||||
private void TranslateReturnType(Delegate d,
|
||||
XPathNavigator function_override, XPathNavigator nav,
|
||||
EnumProcessor enum_processor, EnumCollection enums,
|
||||
string apiname, string apiversion)
|
||||
|
@ -585,10 +606,14 @@ namespace Bind
|
|||
if (d.ReturnType.CurrentType.Contains("GLenum"))
|
||||
{
|
||||
if ((Settings.Compatibility & Settings.Legacy.ConstIntEnums) == Settings.Legacy.None)
|
||||
{
|
||||
d.ReturnType.QualifiedType = String.Format("{0}{1}{2}",
|
||||
Settings.EnumsOutput, Settings.NamespaceSeparator, Settings.CompleteEnumName);
|
||||
}
|
||||
else
|
||||
{
|
||||
d.ReturnType.QualifiedType = "int";
|
||||
}
|
||||
}
|
||||
|
||||
if (d.ReturnType.CurrentType.ToLower().Contains("bool"))
|
||||
|
@ -600,7 +625,7 @@ namespace Bind
|
|||
d.ReturnType.CurrentType = GetCLSCompliantType(d.ReturnType);
|
||||
}
|
||||
|
||||
Delegate GetCLSCompliantDelegate(Delegate d)
|
||||
private Delegate GetCLSCompliantDelegate(Delegate d)
|
||||
{
|
||||
Delegate f = new Delegate(d);
|
||||
|
||||
|
@ -614,7 +639,7 @@ namespace Bind
|
|||
return f;
|
||||
}
|
||||
|
||||
void TranslateParameters(Delegate d,
|
||||
private void TranslateParameters(Delegate d,
|
||||
XPathNavigator function_override, XPathNavigator nav,
|
||||
EnumProcessor enum_processor, EnumCollection enums,
|
||||
string apiname, string apiversion)
|
||||
|
@ -625,11 +650,29 @@ namespace Bind
|
|||
{
|
||||
TranslateParameter(d.Parameters[i], function_override, nav, enum_processor, enums, d.Category, apiname);
|
||||
if (d.Parameters[i].CurrentType == "UInt16" && d.Name.Contains("LineStipple"))
|
||||
{
|
||||
d.Parameters[i].WrapperType |= WrapperTypes.UncheckedParameter;
|
||||
}
|
||||
|
||||
if (function_override != null)
|
||||
{
|
||||
XPathNavigator param_override = function_override.SelectSingleNode(String.Format(
|
||||
"param[@name='{0}' or @index='{1}']",
|
||||
d.Parameters[i].RawName,
|
||||
i));
|
||||
if (param_override != null)
|
||||
{
|
||||
var legacyArrayParameter = param_override.GetAttribute("legacyArrayParameter", String.Empty);
|
||||
if (!String.IsNullOrEmpty(legacyArrayParameter))
|
||||
{
|
||||
d.Parameters[i].WrapperType |= WrapperTypes.LegacyArrayParameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TranslateParameter(Parameter p,
|
||||
private void TranslateParameter(Parameter p,
|
||||
XPathNavigator function_override, XPathNavigator overrides,
|
||||
EnumProcessor enum_processor, EnumCollection enums,
|
||||
string category, string apiname)
|
||||
|
@ -695,14 +738,16 @@ namespace Bind
|
|||
}
|
||||
|
||||
if (Utilities.CSharpKeywords.Contains(p.Name))
|
||||
{
|
||||
p.Name = Settings.KeywordEscapeCharacter + p.Name;
|
||||
}
|
||||
|
||||
// This causes problems with bool arrays
|
||||
//if (CurrentType.ToLower().Contains("bool"))
|
||||
// WrapperType = WrapperTypes.BoolParameter;
|
||||
}
|
||||
|
||||
void TranslateAttributes(Delegate d,
|
||||
private void TranslateAttributes(Delegate d,
|
||||
XPathNavigator function_override, XPathNavigator nav,
|
||||
string apiname, string apiversion)
|
||||
{
|
||||
|
@ -734,7 +779,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
FunctionCollection CreateWrappers(DelegateCollection delegates, EnumCollection enums)
|
||||
private FunctionCollection CreateWrappers(DelegateCollection delegates, EnumCollection enums)
|
||||
{
|
||||
var wrappers = new FunctionCollection();
|
||||
foreach (var d in delegates.Values.SelectMany(v => v))
|
||||
|
@ -769,7 +814,7 @@ namespace Bind
|
|||
return wrappers;
|
||||
}
|
||||
|
||||
FunctionCollection CreateCLSCompliantWrappers(FunctionCollection functions, EnumCollection enums)
|
||||
private FunctionCollection CreateCLSCompliantWrappers(FunctionCollection functions, EnumCollection enums)
|
||||
{
|
||||
// If the function is not CLS-compliant (e.g. it contains unsigned parameters)
|
||||
// we need to create a CLS-Compliant overload. However, we should only do this
|
||||
|
@ -795,7 +840,9 @@ namespace Bind
|
|||
{
|
||||
cls.Parameters[i].CurrentType = GetCLSCompliantType(cls.Parameters[i]);
|
||||
if (cls.Parameters[i].CurrentType != f.Parameters[i].CurrentType)
|
||||
{
|
||||
modified = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Only add a cls-compliant overload if we have
|
||||
|
@ -810,13 +857,13 @@ namespace Bind
|
|||
return wrappers;
|
||||
}
|
||||
|
||||
static FunctionCollection MarkCLSCompliance(FunctionCollection collection)
|
||||
private static FunctionCollection MarkCLSCompliance(FunctionCollection collection)
|
||||
{
|
||||
//foreach (var w in
|
||||
// (from list in collection
|
||||
// from w1 in list.Value
|
||||
// from w2 in list.Value
|
||||
// where
|
||||
// where
|
||||
// w1.TrimmedName == w2.TrimmedName &&
|
||||
// w1.Parameters.Count == w2.Parameters.Count &&
|
||||
// ParametersDifferOnlyInReference(w1.Parameters, w2.Parameters)
|
||||
|
@ -842,21 +889,33 @@ namespace Bind
|
|||
for (k = 0; k < wrappers[i].Parameters.Count; k++)
|
||||
{
|
||||
if (wrappers[i].Parameters[k].CurrentType != wrappers[j].Parameters[k].CurrentType)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (wrappers[i].Parameters[k].DiffersOnlyOnReference(wrappers[j].Parameters[k]))
|
||||
{
|
||||
if (wrappers[i].Parameters[k].Reference)
|
||||
{
|
||||
function_i_is_problematic = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
function_j_is_problematic = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (k == wrappers[i].Parameters.Count)
|
||||
{
|
||||
if (function_i_is_problematic)
|
||||
{
|
||||
must_remove.Add(i);
|
||||
}
|
||||
if (function_j_is_problematic)
|
||||
{
|
||||
must_remove.Add(j);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -876,12 +935,14 @@ namespace Bind
|
|||
return collection;
|
||||
}
|
||||
|
||||
string GetCLSCompliantType(Type type)
|
||||
private string GetCLSCompliantType(Type type)
|
||||
{
|
||||
if (!type.CLSCompliant)
|
||||
{
|
||||
if (type.Pointer != 0 && Settings.Compatibility == Settings.Legacy.Tao)
|
||||
{
|
||||
return "IntPtr";
|
||||
}
|
||||
|
||||
switch (type.CurrentType)
|
||||
{
|
||||
|
@ -905,7 +966,7 @@ namespace Bind
|
|||
return type.CurrentType;
|
||||
}
|
||||
|
||||
IEnumerable<Function> CreateNormalWrappers(Delegate d, EnumCollection enums)
|
||||
private IEnumerable<Function> CreateNormalWrappers(Delegate d, EnumCollection enums)
|
||||
{
|
||||
Function f = new Function(d);
|
||||
TrimName(f);
|
||||
|
@ -917,7 +978,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
IEnumerable<Function> CreateConvenienceOverloads(FunctionCollection wrappers)
|
||||
private IEnumerable<Function> CreateConvenienceOverloads(FunctionCollection wrappers)
|
||||
{
|
||||
var convenience_wrappers = new List<Function>();
|
||||
foreach (var d in wrappers.Values.SelectMany(w => w))
|
||||
|
@ -988,7 +1049,7 @@ namespace Bind
|
|||
return convenience_wrappers;
|
||||
}
|
||||
|
||||
static Function CreateReturnTypeConvenienceWrapper(Function d)
|
||||
private static Function CreateReturnTypeConvenienceWrapper(Function d)
|
||||
{
|
||||
var f = new Function(d);
|
||||
f.ReturnType = new Type(f.Parameters.Last());
|
||||
|
@ -1008,7 +1069,7 @@ namespace Bind
|
|||
return f;
|
||||
}
|
||||
|
||||
static Function CreateArrayReturnTypeConvenienceWrapper(Function d)
|
||||
private static Function CreateArrayReturnTypeConvenienceWrapper(Function d)
|
||||
{
|
||||
var f = new Function(d);
|
||||
var p_array = f.Parameters.Last();
|
||||
|
@ -1025,7 +1086,7 @@ namespace Bind
|
|||
return f;
|
||||
}
|
||||
|
||||
List<Function> GetWrapper(IDictionary<WrapperTypes, List<Function>> dictionary, WrapperTypes key, Function raw)
|
||||
private List<Function> GetWrapper(IDictionary<WrapperTypes, List<Function>> dictionary, WrapperTypes key, Function raw)
|
||||
{
|
||||
if (!dictionary.ContainsKey(key))
|
||||
{
|
||||
|
@ -1057,6 +1118,17 @@ namespace Bind
|
|||
// Generics are handled in a second pass.
|
||||
if ((parameter.WrapperType & WrapperTypes.GenericParameter) == 0)
|
||||
{
|
||||
if ((parameter.WrapperType & WrapperTypes.LegacyArrayParameter) != 0)
|
||||
{
|
||||
foreach (var wrapper in GetWrapper(wrappers, WrapperTypes.LegacyArrayParameter, func))
|
||||
{
|
||||
wrapper.Obsolete = "Use out overload instead";
|
||||
var p = wrapper.Parameters[i];
|
||||
p.Array++;
|
||||
p.Pointer--;
|
||||
}
|
||||
}
|
||||
|
||||
if ((parameter.WrapperType & WrapperTypes.ArrayParameter) != 0)
|
||||
{
|
||||
foreach (var wrapper in GetWrapper(wrappers, WrapperTypes.ArrayParameter, func))
|
||||
|
@ -1197,13 +1269,10 @@ namespace Bind
|
|||
var p = wrapper.Parameters[i];
|
||||
if ((p.WrapperType & WrapperTypes.StringParameter) != 0)
|
||||
{
|
||||
p.QualifiedType = "String";
|
||||
if (p.Flow == FlowDirection.Out)
|
||||
{
|
||||
p.QualifiedType = "StringBuilder";
|
||||
}
|
||||
else
|
||||
{
|
||||
p.QualifiedType = "String";
|
||||
p.Reference = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1230,7 +1299,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
static void WrapReturnType(Function func)
|
||||
private static void WrapReturnType(Function func)
|
||||
{
|
||||
if ((func.ReturnType.WrapperType & WrapperTypes.StringReturnType) != 0)
|
||||
{
|
||||
|
@ -1248,7 +1317,5 @@ namespace Bind
|
|||
func.ReturnType.QualifiedType = "bool";
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// GL2Generator.cs
|
||||
//
|
||||
|
@ -25,15 +24,12 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace Bind.GL2
|
||||
{
|
||||
|
||||
class GL2Generator : Generator
|
||||
internal class GL2Generator : Generator
|
||||
{
|
||||
public GL2Generator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,17 +22,12 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Bind.GL2
|
||||
{
|
||||
class GL4Generator : Generator
|
||||
internal class GL4Generator : Generator
|
||||
{
|
||||
public GL4Generator(Settings settings)
|
||||
: base(settings)
|
||||
|
|
|
@ -1,27 +1,18 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.XPath;
|
||||
using Bind.Structures;
|
||||
using Delegate=Bind.Structures.Delegate;
|
||||
using Enum=Bind.Structures.Enum;
|
||||
using Type=Bind.Structures.Type;
|
||||
|
||||
namespace Bind.GL2
|
||||
{
|
||||
abstract class Generator : IBind
|
||||
internal abstract class Generator : IBind
|
||||
{
|
||||
#region Fields
|
||||
|
||||
protected string glTypemap = "GL2/gl.tm";
|
||||
protected string csTypemap = "csharp.tm";
|
||||
protected string enumSpec = "GL2/enum.spec";
|
||||
|
@ -56,14 +47,12 @@ namespace Bind.GL2
|
|||
|
||||
public Settings Settings { get; protected set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public Generator(Settings settings)
|
||||
{
|
||||
if (settings == null)
|
||||
{
|
||||
throw new ArgumentNullException("settings");
|
||||
}
|
||||
|
||||
Settings = settings.Clone();
|
||||
|
||||
|
@ -86,11 +75,7 @@ namespace Bind.GL2
|
|||
SpecReader = new XmlSpecReader(Settings);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
|
||||
IEnumerable<string> GetFiles(string path)
|
||||
private IEnumerable<string> GetFiles(string path)
|
||||
{
|
||||
path = Path.Combine(Settings.InputPath, path);
|
||||
if ((File.GetAttributes(path) & FileAttributes.Directory) != 0)
|
||||
|
@ -107,10 +92,6 @@ namespace Bind.GL2
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IBind Members
|
||||
|
||||
public DelegateCollection Delegates { get; private set; }
|
||||
public EnumCollection Enums { get; private set; }
|
||||
public FunctionCollection Wrappers { get; private set; }
|
||||
|
@ -146,7 +127,5 @@ namespace Bind.GL2
|
|||
Wrappers = func_processor.Process(enum_processor, doc_processor,
|
||||
Delegates, Enums, Profile, Version);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
|
@ -40,12 +40,16 @@
|
|||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<Deterministic>true</Deterministic>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||
<DocumentationFile>bin\Debug\Bind.xml</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -53,7 +57,6 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
|
@ -61,13 +64,13 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;</DefineConstants>
|
||||
<DocumentationFile>bin\Release\Bind.xml</DocumentationFile>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -211,7 +214,9 @@
|
|||
</Compile>
|
||||
<Compile Include="GL2\GL2Generator.cs" />
|
||||
<Compile Include="Structures\Documentation.cs" />
|
||||
<None Include="Specifications\GL2\overrides.xml" />
|
||||
<None Include="Specifications\GL2\overrides.xml">
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Specifications\GL2\GL\4.5\ARB_direct_state_access.xml" />
|
||||
<None Include="Specifications\GL2\ES\3.1\KHR_compute_shader.xml" />
|
||||
<None Include="Specifications\GL2\ES\3.1\KHR_separate_shader_objects.xml" />
|
||||
|
@ -238,6 +243,14 @@
|
|||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.ruleset">
|
||||
<Link>stylecop.ruleset</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
|
@ -262,4 +275,12 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="Specifications\Docs\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,15 +1,13 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using Bind.Structures;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bind
|
||||
{
|
||||
interface IBind
|
||||
internal interface IBind
|
||||
{
|
||||
DelegateCollection Delegates { get; }
|
||||
EnumCollection Enums { get; }
|
||||
|
|
|
@ -1,16 +1,13 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Bind.Structures;
|
||||
|
||||
namespace Bind
|
||||
{
|
||||
interface ISpecReader
|
||||
internal interface ISpecReader
|
||||
{
|
||||
void ReadDelegates(string file, DelegateCollection delegates, string apiname, string apiversion);
|
||||
void ReadEnums(string file, EnumCollection enums, string apiname, string apiversion);
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Security;
|
||||
using System.Text.RegularExpressions;
|
||||
|
@ -18,7 +14,7 @@ using Bind.GL2;
|
|||
|
||||
namespace Bind
|
||||
{
|
||||
enum GeneratorMode
|
||||
internal enum GeneratorMode
|
||||
{
|
||||
All = 0,
|
||||
Default = All,
|
||||
|
@ -33,13 +29,13 @@ namespace Bind
|
|||
CL10,
|
||||
}
|
||||
|
||||
static class MainClass
|
||||
internal static class MainClass
|
||||
{
|
||||
static GeneratorMode mode = GeneratorMode.Default;
|
||||
private static GeneratorMode mode = GeneratorMode.Default;
|
||||
static internal List<IBind> Generators = new List<IBind>();
|
||||
static Settings Settings = new Settings();
|
||||
private static Settings Settings = new Settings();
|
||||
|
||||
static void Main(string[] arguments)
|
||||
private static void Main(string[] arguments)
|
||||
{
|
||||
Debug.Listeners.Clear();
|
||||
Debug.Listeners.Add(new TextWriterTraceListener(Console.Out));
|
||||
|
@ -52,7 +48,7 @@ namespace Bind
|
|||
Assembly.GetExecutingAssembly().GetName().Version.ToString());
|
||||
Console.WriteLine("For comments, bugs and suggestions visit http://github.com/opentk/opentk");
|
||||
Console.WriteLine();
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
var split = new Regex(@"-\w+", RegexOptions.Compiled);
|
||||
|
@ -101,7 +97,9 @@ namespace Bind
|
|||
val = val.ToLower();
|
||||
bool enable = !opt.StartsWith("-");
|
||||
if (val.StartsWith("+") || val.StartsWith("-"))
|
||||
{
|
||||
val = val.Substring(1);
|
||||
}
|
||||
|
||||
var settings = Settings.Legacy.None;
|
||||
switch (val)
|
||||
|
@ -172,11 +170,11 @@ namespace Bind
|
|||
case GeneratorMode.ES10:
|
||||
Generators.Add(new ESGenerator(Settings));
|
||||
break;
|
||||
|
||||
|
||||
case GeneratorMode.ES11:
|
||||
Generators.Add(new ESGenerator(Settings));
|
||||
break;
|
||||
|
||||
|
||||
case GeneratorMode.ES20:
|
||||
Generators.Add(new ES2Generator(Settings));
|
||||
break;
|
||||
|
@ -192,7 +190,7 @@ namespace Bind
|
|||
case GeneratorMode.CL10:
|
||||
Generators.Add(new CLGenerator(Settings));
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Console.WriteLine("Please specify a generator mode (use '-mode:gl2/gl4/es10/es11/es20/es30')");
|
||||
return;
|
||||
|
@ -212,7 +210,7 @@ namespace Bind
|
|||
Console.WriteLine();
|
||||
Console.WriteLine("Bindings generated in {0} seconds.", ticks / (double)10000000.0);
|
||||
}
|
||||
|
||||
|
||||
Console.WriteLine();
|
||||
if (Debugger.IsAttached)
|
||||
{
|
||||
|
@ -243,7 +241,7 @@ namespace Bind
|
|||
|
||||
case "gl3":
|
||||
case "gl4":
|
||||
mode = GeneratorMode.GL4;
|
||||
mode = GeneratorMode.GL4;
|
||||
break;
|
||||
|
||||
case "es10":
|
||||
|
|
|
@ -5,13 +5,18 @@ using System.Reflection;
|
|||
[assembly: AssemblyTitleAttribute("Generator.Bind")]
|
||||
[assembly: AssemblyProductAttribute("OpenTK")]
|
||||
[assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")]
|
||||
[assembly: AssemblyVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyVersionAttribute("3.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0")]
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.")]
|
||||
namespace System {
|
||||
internal static class AssemblyVersionInformation {
|
||||
internal const string Version = "2.0.0";
|
||||
internal const string InformationalVersion = "2.0.0";
|
||||
internal const System.String AssemblyTitle = "Generator.Bind";
|
||||
internal const System.String AssemblyProduct = "OpenTK";
|
||||
internal const System.String AssemblyDescription = "A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.";
|
||||
internal const System.String AssemblyVersion = "3.0.0";
|
||||
internal const System.String AssemblyFileVersion = "3.0.0";
|
||||
internal const System.Boolean CLSCompliant = true;
|
||||
internal const System.String AssemblyCopyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -13,18 +11,18 @@ using System.Runtime.Serialization.Formatters.Binary;
|
|||
namespace Bind
|
||||
{
|
||||
[Serializable]
|
||||
class Settings
|
||||
internal class Settings
|
||||
{
|
||||
public Settings()
|
||||
{
|
||||
OverridesFiles = new List<string>();
|
||||
}
|
||||
|
||||
public string DefaultInputPath = "../../../Source/Bind/Specifications";
|
||||
public string DefaultOutputPath = "../../../Source/OpenTK/Graphics/OpenGL";
|
||||
public string DefaultInputPath = "src/Generator.Bind/Specifications";
|
||||
public string DefaultOutputPath = "src/OpenTK/Graphics/OpenGL";
|
||||
public string DefaultOutputNamespace = "OpenTK.Graphics.OpenGL";
|
||||
public string DefaultDocPath = "../../../Source/Bind/Specifications/Docs";
|
||||
public string DefaultFallbackDocPath = "../../../Source/Bind/Specifications/Docs/GL";
|
||||
public string DefaultDocPath = "src/Generator.Bind/Specifications/Docs";
|
||||
public string DefaultFallbackDocPath = "src/Generator.Bind/Specifications/Docs/GL";
|
||||
public string DefaultLicenseFile = "License.txt";
|
||||
public string DefaultLanguageTypeMapFile = "csharp.tm";
|
||||
public string DefaultKeywordEscapeCharacter = "@";
|
||||
|
@ -34,10 +32,11 @@ namespace Bind
|
|||
public string DefaultWrappersFile = "GL.cs";
|
||||
public Legacy DefaultCompatibility = Legacy.NoDropMultipleTokens;
|
||||
|
||||
string inputPath, outputPath, outputNamespace, docPath, fallbackDocPath, licenseFile,
|
||||
private string inputPath, outputPath, outputNamespace, docPath, fallbackDocPath, licenseFile,
|
||||
languageTypeMapFile, keywordEscapeCharacter, importsFile, delegatesFile, enumsFile,
|
||||
wrappersFile;
|
||||
Nullable<Legacy> compatibility;
|
||||
|
||||
private Nullable<Legacy> compatibility;
|
||||
public string InputPath { get { return inputPath ?? DefaultInputPath; } set { inputPath = value; } }
|
||||
public string OutputPath { get { return outputPath ?? DefaultOutputPath; } set { outputPath = value; } }
|
||||
public string OutputNamespace { get { return outputNamespace ?? DefaultOutputNamespace; } set { outputNamespace = value; } }
|
||||
|
@ -74,8 +73,8 @@ namespace Bind
|
|||
normalEnumsClassOverride;
|
||||
}
|
||||
}
|
||||
|
||||
public string AuxEnumsClass
|
||||
|
||||
public string AuxEnumsClass
|
||||
{
|
||||
get { return GLClass + NamespaceSeparator + NestedEnumsClass; }
|
||||
}
|
||||
|
@ -85,9 +84,13 @@ namespace Bind
|
|||
get
|
||||
{
|
||||
if ((Compatibility & Legacy.NestedEnums) != Legacy.None)
|
||||
{
|
||||
return OutputNamespace + NamespaceSeparator + OutputClass + NamespaceSeparator + NestedEnumsClass;
|
||||
}
|
||||
else
|
||||
{
|
||||
return String.IsNullOrEmpty(EnumsNamespace) ? OutputNamespace : OutputNamespace + NamespaceSeparator + EnumsNamespace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,14 +99,18 @@ namespace Bind
|
|||
get
|
||||
{
|
||||
if ((Compatibility & Legacy.NestedEnums) != Legacy.None)
|
||||
{
|
||||
return OutputNamespace + NamespaceSeparator + GLClass + NamespaceSeparator + NestedEnumsClass;
|
||||
}
|
||||
else
|
||||
{
|
||||
return OutputNamespace + NamespaceSeparator + EnumsNamespace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// New enums namespace (don't use a nested class).
|
||||
public string EnumsNamespace = null;// = "Enums";
|
||||
public string EnumsNamespace = null; // = "Enums";
|
||||
|
||||
public string DelegatesClass = "Delegates";
|
||||
public string ImportsClass = "Core";
|
||||
|
@ -198,11 +205,19 @@ namespace Bind
|
|||
|
||||
/// <summary>True if multiple tokens should be dropped (e.g. FooARB, FooEXT and FooSGI).</summary>
|
||||
public bool DropMultipleTokens
|
||||
{
|
||||
get { return (Compatibility & Legacy.NoDropMultipleTokens) == Legacy.None; }
|
||||
set { if (value) Compatibility |= Legacy.NoDropMultipleTokens; else Compatibility &= ~Legacy.NoDropMultipleTokens; }
|
||||
{
|
||||
get { return (Compatibility & Legacy.NoDropMultipleTokens) == Legacy.None; }
|
||||
set { if (value)
|
||||
{
|
||||
Compatibility |= Legacy.NoDropMultipleTokens;
|
||||
}
|
||||
else
|
||||
{
|
||||
Compatibility &= ~Legacy.NoDropMultipleTokens;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string WindowsGDI = "OpenTK.Platform.Windows.API";
|
||||
|
||||
public Settings Clone()
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
|
|
@ -111,6 +111,14 @@ GLfixed, int
|
|||
GLeglImageOES, IntPtr
|
||||
|
||||
|
||||
# External egl buffer type added in OpenGL 4.6
|
||||
GLeglClientBufferEXT, IntPtr
|
||||
|
||||
|
||||
# nVidia vulkan entry point, added by NV_draw_vulkan_image extension
|
||||
GLVULKANPROCNV, IntPtr
|
||||
|
||||
|
||||
# OpenCL types.
|
||||
_cl_context, IntPtr
|
||||
_cl_event, IntPtr
|
||||
|
|
|
@ -1,40 +1,25 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an opengl constant in C# format. Both the constant name and value
|
||||
/// can be retrieved or set. The value can be either a number, another constant
|
||||
/// or an alias to a constant
|
||||
/// or an alias to a constant
|
||||
/// </summary>
|
||||
class Constant : IComparable<Constant>
|
||||
internal class Constant : IComparable<Constant>
|
||||
{
|
||||
#region PreviousName
|
||||
|
||||
string original_name;
|
||||
|
||||
// Gets the name prior to translation.
|
||||
public string OriginalName
|
||||
{
|
||||
get { return original_name; }
|
||||
private set { original_name = value; }
|
||||
}
|
||||
public string OriginalName { get; private set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string Name
|
||||
|
||||
string _name;
|
||||
private string _name;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the opengl constant (eg. GL_LINES).
|
||||
|
@ -43,23 +28,23 @@ namespace Bind.Structures
|
|||
public string Name
|
||||
{
|
||||
get { return _name; }
|
||||
set
|
||||
set
|
||||
{
|
||||
if (String.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
|
||||
if (OriginalName == null)
|
||||
{
|
||||
OriginalName = _name;
|
||||
}
|
||||
|
||||
_name = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string Value
|
||||
|
||||
string _value;
|
||||
private string _value;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the opengl constant (eg. 0x00000001).
|
||||
|
@ -73,34 +58,19 @@ namespace Bind.Structures
|
|||
set
|
||||
{
|
||||
if (String.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
}
|
||||
|
||||
_value = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string Reference
|
||||
|
||||
string _reference;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a string indicating the OpenGL enum reference by this constant.
|
||||
/// Can be null.
|
||||
/// </summary>
|
||||
public string Reference
|
||||
{
|
||||
get { return _reference; }
|
||||
set
|
||||
{
|
||||
_reference = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Unchecked
|
||||
public string Reference { get; set; }
|
||||
|
||||
public bool Unchecked
|
||||
{
|
||||
|
@ -111,14 +81,10 @@ namespace Bind.Structures
|
|||
string test = Value;
|
||||
return UInt64.TryParse(test.ToLower().Replace("0x", String.Empty),
|
||||
NumberStyles.AllowHexSpecifier, null, out number) &&
|
||||
number > Int32.MaxValue;
|
||||
number > Int32.MaxValue;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Creates an empty Constant.
|
||||
/// </summary>
|
||||
|
@ -137,21 +103,22 @@ namespace Bind.Structures
|
|||
Value = value;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Replces the Value of the given constant with the value referenced by the [c.Reference, c.Value] pair.
|
||||
/// </summary>
|
||||
/// <param name="c">The Constant to translate</param>
|
||||
/// <param name="enums">The list of enums to check.</param>
|
||||
/// <param name="auxEnums">The list of auxilliary enums to check.</param>
|
||||
/// <returns>True if the reference was found; false otherwise.</returns>
|
||||
public static bool TranslateConstantWithReference(Constant c, EnumCollection enums)
|
||||
{
|
||||
if (c == null)
|
||||
{
|
||||
throw new ArgumentNullException("c");
|
||||
}
|
||||
if (enums == null)
|
||||
{
|
||||
throw new ArgumentNullException("enums");
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(c.Reference))
|
||||
{
|
||||
|
@ -192,8 +159,6 @@ namespace Bind.Structures
|
|||
return true;
|
||||
}
|
||||
|
||||
#region ToString
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return
|
||||
|
@ -204,18 +169,14 @@ namespace Bind.Structures
|
|||
Value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable <Constant>Members
|
||||
|
||||
public int CompareTo(Constant other)
|
||||
{
|
||||
int ret = Value.CompareTo(other.Value);
|
||||
if (ret == 0)
|
||||
{
|
||||
return Name.CompareTo(other.Name);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,12 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
|
@ -19,22 +14,20 @@ namespace Bind.Structures
|
|||
/// Represents an opengl function.
|
||||
/// The return value, function name, function parameters and opengl version can be retrieved or set.
|
||||
/// </summary>
|
||||
class Delegate : IComparable<Delegate>, IEquatable<Delegate>
|
||||
internal class Delegate : IComparable<Delegate>, IEquatable<Delegate>
|
||||
{
|
||||
//internal static DelegateCollection Delegates;
|
||||
|
||||
bool? cls_compliance_overriden;
|
||||
private bool? cls_compliance_overriden;
|
||||
|
||||
protected static Regex endings = new Regex(@"((((d|f|fi)|u?[isb])_?v?)|v)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
||||
protected static Regex endingsNotToTrim = new Regex("(ib|[tdrey]s|[eE]n[vd]|bled|Flag|Tess|Status|Pixels|Instanced|Indexed|Varyings|Boolean|IDs)", RegexOptions.Compiled | RegexOptions.RightToLeft);
|
||||
|
||||
// Add a trailing v to functions matching this regex. Used to differntiate between overloads taking both
|
||||
// a 'type' and a 'ref type' (such overloads are not CLS Compliant).
|
||||
// The default Regex matches no functions. Create a new Regex in Bind.Generator classes to override the default behavior.
|
||||
// The default Regex matches no functions. Create a new Regex in Bind.Generator classes to override the default behavior.
|
||||
internal static Regex endingsAddV = new Regex("^0", RegexOptions.Compiled);
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
public Delegate()
|
||||
{
|
||||
Parameters = new ParameterCollection();
|
||||
|
@ -57,12 +50,6 @@ namespace Bind.Structures
|
|||
Slot = d.Slot;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Properties ---
|
||||
|
||||
#region public bool CLSCompliant
|
||||
|
||||
/// <summary>
|
||||
/// Gets the CLSCompliant property. True if the delegate is not CLSCompliant.
|
||||
/// </summary>
|
||||
|
@ -71,18 +58,26 @@ namespace Bind.Structures
|
|||
get
|
||||
{
|
||||
if (cls_compliance_overriden != null)
|
||||
{
|
||||
return (bool)cls_compliance_overriden;
|
||||
}
|
||||
|
||||
if (Unsafe)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ReturnType.CLSCompliant)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (Parameter p in Parameters)
|
||||
{
|
||||
if (!p.CLSCompliant)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -92,21 +87,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string Category
|
||||
|
||||
private string _category;
|
||||
|
||||
public string Category
|
||||
{
|
||||
get { return _category; }
|
||||
set { _category = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool NeedsWrapper
|
||||
public string Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value that indicates whether this function needs to be wrapped with a Marshaling function.
|
||||
|
@ -120,22 +101,22 @@ namespace Bind.Structures
|
|||
// TODO: Add special cases for (Get)ShaderSource.
|
||||
|
||||
if (ReturnType.WrapperType != WrapperTypes.None)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (Parameter p in Parameters)
|
||||
{
|
||||
if (p.WrapperType != WrapperTypes.None)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual bool Unsafe
|
||||
|
||||
/// <summary>
|
||||
/// True if the delegate must be declared as 'unsafe'.
|
||||
/// </summary>
|
||||
|
@ -149,7 +130,9 @@ namespace Bind.Structures
|
|||
// return false;
|
||||
|
||||
if (ReturnType.Pointer != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (Parameter p in Parameters)
|
||||
{
|
||||
|
@ -163,28 +146,12 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public Parameter ReturnType
|
||||
|
||||
Type _return_type = new Type();
|
||||
/// <summary>
|
||||
/// Gets or sets the return value of the opengl function.
|
||||
/// </summary>
|
||||
public Type ReturnType
|
||||
{
|
||||
get { return _return_type; }
|
||||
set
|
||||
{
|
||||
_return_type = value;
|
||||
}
|
||||
}
|
||||
public Type ReturnType { get; set; } = new Type();
|
||||
|
||||
#endregion
|
||||
|
||||
#region public virtual string Name
|
||||
|
||||
string _name;
|
||||
private string _name;
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the opengl function.
|
||||
/// </summary>
|
||||
|
@ -200,36 +167,12 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public ParameterCollection Parameters
|
||||
|
||||
ParameterCollection _parameters;
|
||||
|
||||
public ParameterCollection Parameters
|
||||
{
|
||||
get { return _parameters; }
|
||||
set { _parameters = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string Version
|
||||
|
||||
string _version;
|
||||
public ParameterCollection Parameters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Defines the opengl version that introduced this function.
|
||||
/// </summary>
|
||||
public string Version
|
||||
{
|
||||
get { return _version; }
|
||||
set { _version = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Extension
|
||||
public string Version { get; set; }
|
||||
|
||||
public string Extension
|
||||
{
|
||||
|
@ -237,8 +180,6 @@ namespace Bind.Structures
|
|||
set;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public bool Deprecated { get; set; }
|
||||
public string DeprecatedVersion { get; set; }
|
||||
public string EntryPoint { get; set; }
|
||||
|
@ -247,8 +188,6 @@ namespace Bind.Structures
|
|||
// Slot index in the address table
|
||||
public int Slot { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
// This method should only be used for debugging purposes, not for code generation!
|
||||
// Returns a string representing the full delegate declaration without decorations.
|
||||
// (ie "(unsafe) void delegate glXxxYyy(int a, float b, IntPtr c)"
|
||||
|
@ -266,22 +205,20 @@ namespace Bind.Structures
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
#region IComparable<Delegate> Members
|
||||
|
||||
public int CompareTo(Delegate other)
|
||||
{
|
||||
int ret = Name.CompareTo(other.Name);
|
||||
if (ret == 0)
|
||||
{
|
||||
ret = Parameters.CompareTo(other.Parameters);
|
||||
}
|
||||
if (ret == 0)
|
||||
{
|
||||
ret = ReturnType.CompareTo(other.ReturnType);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<Delegate> Members
|
||||
|
||||
public bool Equals(Delegate other)
|
||||
{
|
||||
return
|
||||
|
@ -289,15 +226,11 @@ namespace Bind.Structures
|
|||
Parameters.Equals(other.Parameters) &&
|
||||
ReturnType.Equals(other.ReturnType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region DelegateCollection
|
||||
|
||||
class DelegateCollection : IDictionary<string, List<Delegate>>
|
||||
internal class DelegateCollection : IDictionary<string, List<Delegate>>
|
||||
{
|
||||
readonly SortedDictionary<string, List<Delegate>> Delegates =
|
||||
private readonly SortedDictionary<string, List<Delegate>> Delegates =
|
||||
new SortedDictionary<string, List<Delegate>>();
|
||||
|
||||
public void Add(Delegate d)
|
||||
|
@ -348,8 +281,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#region IDictionary Members
|
||||
|
||||
public void Add(string key, List<Delegate> value)
|
||||
{
|
||||
Delegates.Add(key, value.ToList());
|
||||
|
@ -398,10 +329,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ICollection implementation
|
||||
|
||||
public void Add(KeyValuePair<string, List<Delegate>> item)
|
||||
{
|
||||
Delegates.Add(item.Key, item.Value.ToList());
|
||||
|
@ -443,26 +370,14 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEnumerable implementation
|
||||
|
||||
public IEnumerator<KeyValuePair<string, List<Delegate>>> GetEnumerator()
|
||||
{
|
||||
return Delegates.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEnumerable implementation
|
||||
|
||||
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
|
||||
{
|
||||
return Delegates.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// Documentation.cs
|
||||
//
|
||||
// Author:
|
||||
|
@ -25,20 +24,18 @@
|
|||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
class Documentation
|
||||
internal class Documentation
|
||||
{
|
||||
public string Summary { get; set; }
|
||||
public List<DocumentationParameter> Parameters { get; set; }
|
||||
}
|
||||
|
||||
class DocumentationParameter
|
||||
internal class DocumentationParameter
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Documentation { get; set; }
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
#region class Enum
|
||||
|
||||
class Enum
|
||||
internal class Enum
|
||||
{
|
||||
string _name, _type;
|
||||
private string _name, _type;
|
||||
|
||||
public Enum()
|
||||
{
|
||||
|
@ -43,7 +36,7 @@ namespace Bind.Structures
|
|||
set { _type = value; }
|
||||
}
|
||||
|
||||
SortedDictionary<string, Constant> _constant_collection = new SortedDictionary<string, Constant>();
|
||||
private SortedDictionary<string, Constant> _constant_collection = new SortedDictionary<string, Constant>();
|
||||
|
||||
public IDictionary<string, Constant> ConstantCollection
|
||||
{
|
||||
|
@ -51,8 +44,10 @@ namespace Bind.Structures
|
|||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException("value");
|
||||
|
||||
}
|
||||
|
||||
_constant_collection.Clear();
|
||||
foreach (var item in value)
|
||||
{
|
||||
|
@ -81,46 +76,50 @@ namespace Bind.Structures
|
|||
public bool CLSCompliant { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region class EnumCollection
|
||||
|
||||
class EnumCollection : IDictionary<string, Enum>
|
||||
internal class EnumCollection : IDictionary<string, Enum>
|
||||
{
|
||||
SortedDictionary<string, Enum> Enumerations = new SortedDictionary<string, Enum>();
|
||||
private SortedDictionary<string, Enum> Enumerations = new SortedDictionary<string, Enum>();
|
||||
|
||||
// Return -1 for ext1, 1 for ext2 or 0 if no preference.
|
||||
int OrderOfPreference(string ext1, string ext2)
|
||||
private int OrderOfPreference(string ext1, string ext2)
|
||||
{
|
||||
// If one is empty and the other not, prefer the empty one (empty == core)
|
||||
// Otherwise check for Arb and Ext. To reuse the logic for the
|
||||
// empty check, let's try to remove first Arb, then Ext from the strings.
|
||||
int ret = PreferEmpty(ext1, ext2);
|
||||
if (ret != 0)
|
||||
{
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
ext1 = ext1.Replace("Arb", ""); ext2 = ext2.Replace("Arb", "");
|
||||
ret = PreferEmpty(ext1, ext2);
|
||||
if (ret != 0)
|
||||
{
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
ext1 = ext1.Replace("Ext", ""); ext2 = ext2.Replace("Ext", "");
|
||||
return PreferEmpty(ext1, ext2);
|
||||
}
|
||||
|
||||
// Prefer the empty string over the non-empty.
|
||||
int PreferEmpty(string ext1, string ext2)
|
||||
private int PreferEmpty(string ext1, string ext2)
|
||||
{
|
||||
if (String.IsNullOrEmpty(ext1) && !String.IsNullOrEmpty(ext2))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
else if (String.IsNullOrEmpty(ext2) && !String.IsNullOrEmpty(ext1))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#region Public Members
|
||||
|
||||
public void Add(Enum e)
|
||||
{
|
||||
Add(e.Name, e);
|
||||
|
@ -134,10 +133,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDictionary<string, Enum> Members
|
||||
|
||||
public void Add(string key, Enum value)
|
||||
{
|
||||
if (ContainsKey(key))
|
||||
|
@ -235,9 +230,5 @@ namespace Bind.Structures
|
|||
{
|
||||
return Enumerations.GetEnumerator();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,18 +22,28 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumarates the possible flows of a parameter (ie. is this parameter
|
||||
/// used as input or as output?)
|
||||
/// </summary>
|
||||
public enum FlowDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// Enumarates the possible flows of a parameter (ie. is this parameter
|
||||
/// used as input or as output?)
|
||||
/// No defined flow.
|
||||
/// </summary>
|
||||
public enum FlowDirection
|
||||
{
|
||||
Undefined = 0,
|
||||
In,
|
||||
Out
|
||||
}
|
||||
Undefined = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Input parameter.
|
||||
/// </summary>
|
||||
In,
|
||||
|
||||
/// <summary>
|
||||
/// Output parameter, typically decorated with the out keyword.
|
||||
/// </summary>
|
||||
Out
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -12,16 +10,8 @@ using System.Text.RegularExpressions;
|
|||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
class Function : Delegate, IEquatable<Function>, IComparable<Function>
|
||||
internal class Function : Delegate, IEquatable<Function>, IComparable<Function>
|
||||
{
|
||||
#region Fields
|
||||
|
||||
Delegate wrapped_delegate;
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
public Function(Delegate d)
|
||||
: base(d)
|
||||
{
|
||||
|
@ -42,19 +32,7 @@ namespace Bind.Structures
|
|||
Body.AddRange(f.Body);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public Delegate WrappedDelegate
|
||||
|
||||
public Delegate WrappedDelegate
|
||||
{
|
||||
get { return wrapped_delegate; }
|
||||
set { wrapped_delegate = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public void TurnVoidPointersToIntPtr()
|
||||
public Delegate WrappedDelegate { get; set; }
|
||||
|
||||
public void TurnVoidPointersToIntPtr()
|
||||
{
|
||||
|
@ -68,10 +46,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public override bool Unsafe
|
||||
|
||||
public override bool Unsafe
|
||||
{
|
||||
get
|
||||
|
@ -80,34 +54,12 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public FunctionBody Body
|
||||
|
||||
FunctionBody _body;
|
||||
|
||||
public FunctionBody Body
|
||||
{
|
||||
get { return _body; }
|
||||
set { _body = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string TrimmedName
|
||||
public FunctionBody Body { get; set; }
|
||||
|
||||
public string TrimmedName { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Documentation
|
||||
|
||||
public Documentation Documentation { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToString
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0} {1}{2}",
|
||||
|
@ -116,10 +68,6 @@ namespace Bind.Structures
|
|||
Parameters);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<Function> Members
|
||||
|
||||
public bool Equals(Function other)
|
||||
{
|
||||
bool result =
|
||||
|
@ -129,31 +77,38 @@ namespace Bind.Structures
|
|||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable<Function> Members
|
||||
|
||||
public int CompareTo(Function other)
|
||||
{
|
||||
int ret = Name.CompareTo(other.Name);
|
||||
if (ret == 0)
|
||||
{
|
||||
ret = Parameters.CompareTo(other.Parameters);
|
||||
}
|
||||
if (ret == 0)
|
||||
{
|
||||
ret = ReturnType.CompareTo(other.ReturnType);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#region class FunctionBody : List<string>
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="FunctionBody"/> class acts as a wrapper around a block of source code that makes up the body
|
||||
/// of a function.
|
||||
/// </summary>
|
||||
public class FunctionBody : List<string>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes an empty <see cref="FunctionBody"/>.
|
||||
/// </summary>
|
||||
public FunctionBody()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a <see cref="FunctionBody"/> from an existing FunctionBody.
|
||||
/// </summary>
|
||||
/// <param name="fb">The body to copy from.</param>
|
||||
public FunctionBody(FunctionBody fb)
|
||||
{
|
||||
foreach (string s in fb)
|
||||
|
@ -164,24 +119,42 @@ namespace Bind.Structures
|
|||
|
||||
private string indent = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indents this <see cref="FunctionBody"/> another level.
|
||||
/// </summary>
|
||||
public void Indent()
|
||||
{
|
||||
indent += " ";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes a level of indentation from this <see cref="FunctionBody"/>.
|
||||
/// </summary>
|
||||
public void Unindent()
|
||||
{
|
||||
if (indent.Length > 4)
|
||||
{
|
||||
indent = indent.Substring(4);
|
||||
}
|
||||
else
|
||||
{
|
||||
indent = String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a line of source code to the body at the current indentation level.
|
||||
/// </summary>
|
||||
/// <param name="s">The line to add.</param>
|
||||
new public void Add(string s)
|
||||
{
|
||||
base.Add(indent + s.TrimEnd('\r', '\n'));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a range of source code lines to the body at the current indentation level.
|
||||
/// </summary>
|
||||
/// <param name="collection"></param>
|
||||
new public void AddRange(IEnumerable<string> collection)
|
||||
{
|
||||
foreach (string t in collection)
|
||||
|
@ -190,10 +163,16 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the contents of the function body into a string and encloses it with braces.
|
||||
/// </summary>
|
||||
/// <returns>The body, enclosed in braces.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
if (Count == 0)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder(Count);
|
||||
|
||||
|
@ -208,15 +187,11 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region class FunctionCollection : SortedDictionary<string, List<Function>>
|
||||
|
||||
class FunctionCollection : SortedDictionary<string, List<Function>>
|
||||
internal class FunctionCollection : SortedDictionary<string, List<Function>>
|
||||
{
|
||||
Regex unsignedFunctions = new Regex(@".+(u[dfisb]v?)", RegexOptions.Compiled);
|
||||
private Regex unsignedFunctions = new Regex(@".+(u[dfisb]v?)", RegexOptions.Compiled);
|
||||
|
||||
void Add(Function f)
|
||||
private void Add(Function f)
|
||||
{
|
||||
if (!ContainsKey(f.Extension))
|
||||
{
|
||||
|
@ -276,6 +251,4 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
|
|
@ -1,31 +1,25 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a single parameter of an opengl function.
|
||||
/// </summary>
|
||||
class Parameter : Type, IComparable<Parameter>, IEquatable<Parameter>
|
||||
internal class Parameter : Type, IComparable<Parameter>, IEquatable<Parameter>
|
||||
{
|
||||
string cache;
|
||||
|
||||
#region Constructors
|
||||
private string cache;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new Parameter without type and name.
|
||||
/// </summary>
|
||||
public Parameter()
|
||||
:base()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -37,7 +31,9 @@ namespace Bind.Structures
|
|||
: base(p)
|
||||
{
|
||||
if (p == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Name = p.Name;
|
||||
Unchecked = p.Unchecked;
|
||||
|
@ -49,10 +45,6 @@ namespace Bind.Structures
|
|||
//this.rebuild = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region RawName
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the raw name of the parameter.
|
||||
/// </summary>
|
||||
|
@ -62,10 +54,6 @@ namespace Bind.Structures
|
|||
private set;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Name
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the parameter. If the name matches a keyword of the current language,
|
||||
/// then it is escaped with <see cref="Settings.KeywordEscapeCharacter"/>.
|
||||
|
@ -90,11 +78,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region UnmanagedType
|
||||
|
||||
UnmanagedType _unmanaged_type;
|
||||
private UnmanagedType _unmanaged_type;
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the parameter.
|
||||
/// </summary>
|
||||
|
@ -110,11 +94,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public FlowDirection Flow
|
||||
|
||||
FlowDirection _flow;
|
||||
private FlowDirection _flow;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the flow of the parameter.
|
||||
|
@ -131,10 +111,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool NeedsPin
|
||||
|
||||
public bool NeedsPin
|
||||
{
|
||||
get
|
||||
|
@ -144,10 +120,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Unchecked
|
||||
|
||||
private bool _unchecked;
|
||||
|
||||
public bool Unchecked
|
||||
|
@ -162,20 +134,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Generic
|
||||
|
||||
bool generic;
|
||||
public bool Generic
|
||||
{
|
||||
get { return generic; }
|
||||
set { generic = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool DiffersOnlyOnReference
|
||||
public bool Generic { get; set; }
|
||||
|
||||
// Returns true if this parameter differs only on reference compared to another parameter, i.e:
|
||||
// returns true for 'int' & 'ref int'
|
||||
|
@ -191,20 +150,7 @@ namespace Bind.Structures
|
|||
other.Reference && !(Reference || Array > 0 || Pointer != 0));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public string ComputeSize
|
||||
|
||||
string computeSize;
|
||||
public string ComputeSize
|
||||
{
|
||||
get { return computeSize; }
|
||||
set { computeSize = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Static Members
|
||||
public string ComputeSize { get; set; }
|
||||
|
||||
// Returns the FlowDirection that matches the specified string
|
||||
// ("out" or "in", otherwise undefined).
|
||||
|
@ -212,37 +158,28 @@ namespace Bind.Structures
|
|||
{
|
||||
return direction == "out" ? FlowDirection.Out : direction == "in" ? FlowDirection.In : FlowDirection.Undefined;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable<Parameter> Members
|
||||
|
||||
public int CompareTo(Parameter other)
|
||||
{
|
||||
int result = base.CompareTo(other);
|
||||
if (result == 0)
|
||||
{
|
||||
result = Name.CompareTo(other.Name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToString
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{2}{0} {1}",
|
||||
base.ToString(),
|
||||
Name,
|
||||
Reference ?
|
||||
Reference ?
|
||||
Flow == FlowDirection.Out ? "out " : "ref " :
|
||||
String.Empty);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<Parameter> Members
|
||||
|
||||
public bool Equals(Parameter other)
|
||||
{
|
||||
bool result =
|
||||
|
@ -251,26 +188,22 @@ namespace Bind.Structures
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Holds the parameter list of an opengl function.
|
||||
/// </summary>
|
||||
class ParameterCollection : IList<Parameter>, IComparable<ParameterCollection>, IEquatable<ParameterCollection>
|
||||
internal class ParameterCollection : IList<Parameter>, IComparable<ParameterCollection>, IEquatable<ParameterCollection>
|
||||
{
|
||||
readonly List<Parameter> Parameters = new List<Parameter>();
|
||||
private readonly List<Parameter> Parameters = new List<Parameter>();
|
||||
|
||||
bool hasPointerParameters;
|
||||
bool hasReferenceParameters;
|
||||
bool hasUnsignedParameters;
|
||||
bool hasGenericParameters;
|
||||
private bool hasPointerParameters;
|
||||
private bool hasReferenceParameters;
|
||||
private bool hasUnsignedParameters;
|
||||
private bool hasGenericParameters;
|
||||
|
||||
public bool Rebuild { get; set; }
|
||||
Settings Settings { get; set; }
|
||||
|
||||
#region Constructors
|
||||
private Settings Settings { get; set; }
|
||||
|
||||
public ParameterCollection()
|
||||
{
|
||||
|
@ -287,23 +220,17 @@ namespace Bind.Structures
|
|||
public ParameterCollection(IEnumerable<Parameter> parameters)
|
||||
{
|
||||
foreach (Parameter p in parameters)
|
||||
{
|
||||
Add(new Parameter(p));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BuildCache
|
||||
|
||||
void BuildCache()
|
||||
private void BuildCache()
|
||||
{
|
||||
BuildReferenceAndPointerParametersCache();
|
||||
Rebuild = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool HasPointerParameters
|
||||
|
||||
public bool HasPointerParameters
|
||||
{
|
||||
get
|
||||
|
@ -317,10 +244,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool HasReferenceParameters
|
||||
|
||||
public bool HasReferenceParameters
|
||||
{
|
||||
get
|
||||
|
@ -334,10 +257,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool HasUnsignedParameters
|
||||
|
||||
public bool HasUnsignedParameters
|
||||
{
|
||||
get
|
||||
|
@ -351,10 +270,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool HasGenericParameters
|
||||
|
||||
public bool HasGenericParameters
|
||||
{
|
||||
get
|
||||
|
@ -367,33 +282,34 @@ namespace Bind.Structures
|
|||
return hasGenericParameters;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region void BuildReferenceAndPointerParametersCache()
|
||||
|
||||
void BuildReferenceAndPointerParametersCache()
|
||||
private void BuildReferenceAndPointerParametersCache()
|
||||
{
|
||||
foreach (Parameter p in this)
|
||||
{
|
||||
if (p.Pointer != 0 || p.CurrentType.Contains("IntPtr"))
|
||||
{
|
||||
hasPointerParameters = true;
|
||||
}
|
||||
|
||||
if (p.Reference)
|
||||
{
|
||||
hasReferenceParameters = true;
|
||||
}
|
||||
|
||||
if (p.Unsigned)
|
||||
{
|
||||
hasUnsignedParameters = true;
|
||||
}
|
||||
|
||||
if (p.Generic)
|
||||
{
|
||||
hasGenericParameters = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ToString
|
||||
|
||||
// Only use for debugging, not for code generation!
|
||||
public override string ToString()
|
||||
{
|
||||
|
@ -409,27 +325,25 @@ namespace Bind.Structures
|
|||
sb.Replace(", ", ")", sb.Length - 2, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append(")");
|
||||
}
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ContainsType
|
||||
|
||||
public bool ContainsType(string type)
|
||||
{
|
||||
foreach (Parameter p in this)
|
||||
{
|
||||
if (p.CurrentType == type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IList<Parameter> Members
|
||||
|
||||
public void Add(Parameter p)
|
||||
{
|
||||
Parameters.Add(p);
|
||||
|
@ -511,10 +425,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable<ParameterCollection> Members
|
||||
|
||||
public int CompareTo(ParameterCollection other)
|
||||
{
|
||||
if (Count < other.Count)
|
||||
|
@ -531,20 +441,20 @@ namespace Bind.Structures
|
|||
{
|
||||
int result = this[i].CompareTo(other[i]);
|
||||
if (result != 0)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<ParameterCollection> Members
|
||||
|
||||
public bool Equals(ParameterCollection other)
|
||||
{
|
||||
if (Count != other.Count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool result = true;
|
||||
for (int i = 0; i < Count && result; i++)
|
||||
|
@ -553,7 +463,5 @@ namespace Bind.Structures
|
|||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,23 +1,14 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Xml.XPath;
|
||||
|
||||
namespace Bind.Structures
|
||||
{
|
||||
class Type : IComparable<Type>, IEquatable<Type>
|
||||
internal class Type : IComparable<Type>, IEquatable<Type>
|
||||
{
|
||||
string current_qualifier = String.Empty;
|
||||
string previous_qualifier = String.Empty;
|
||||
|
||||
#region --- Constructors ---
|
||||
private string current_qualifier = String.Empty;
|
||||
|
||||
public Type()
|
||||
{
|
||||
|
@ -39,25 +30,13 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
|
||||
string CurrentQualifier
|
||||
private string CurrentQualifier
|
||||
{
|
||||
get { return current_qualifier; }
|
||||
set { PreviousQualifier = CurrentQualifier; current_qualifier = value; }
|
||||
}
|
||||
|
||||
string PreviousQualifier
|
||||
{
|
||||
get { return previous_qualifier; }
|
||||
set { previous_qualifier = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Public Members
|
||||
private string PreviousQualifier { get; set; } = String.Empty;
|
||||
|
||||
public string QualifiedType
|
||||
{
|
||||
|
@ -71,7 +50,9 @@ namespace Bind.Structures
|
|||
set
|
||||
{
|
||||
if (String.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
int qualifier_end = value.LastIndexOf('.');
|
||||
if (qualifier_end > -1)
|
||||
|
@ -87,9 +68,7 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#region public string CurrentType
|
||||
|
||||
string type;
|
||||
private string type;
|
||||
/// <summary>
|
||||
/// Gets the type of the parameter.
|
||||
/// </summary>
|
||||
|
@ -102,12 +81,18 @@ namespace Bind.Structures
|
|||
set
|
||||
{
|
||||
if (String.IsNullOrEmpty(value))
|
||||
{
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(type))
|
||||
{
|
||||
PreviousType = type;
|
||||
}
|
||||
if (!String.IsNullOrEmpty(value))
|
||||
{
|
||||
type = value.Trim();
|
||||
}
|
||||
|
||||
while (type.EndsWith("*"))
|
||||
{
|
||||
|
@ -117,35 +102,11 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public string PreviousType { get; private set; }
|
||||
|
||||
#region public string PreviousType
|
||||
public bool Reference { get; set; }
|
||||
|
||||
private string _previous_type;
|
||||
|
||||
public string PreviousType
|
||||
{
|
||||
get { return _previous_type; }
|
||||
private set { _previous_type = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Reference
|
||||
|
||||
bool reference;
|
||||
|
||||
public bool Reference
|
||||
{
|
||||
get { return reference; }
|
||||
set { reference = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public int Array
|
||||
|
||||
int array;
|
||||
private int array;
|
||||
|
||||
public int Array
|
||||
{
|
||||
|
@ -153,11 +114,7 @@ namespace Bind.Structures
|
|||
set { array = value > 0 ? value : 0; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public int ElementCount
|
||||
|
||||
int element_count;
|
||||
private int element_count;
|
||||
|
||||
// If the type is an array and ElementCount > 0, then ElemenCount defines the expected array length.
|
||||
public int ElementCount
|
||||
|
@ -166,11 +123,7 @@ namespace Bind.Structures
|
|||
set { element_count = value > 0 ? value : 0; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public int Pointer
|
||||
|
||||
int pointer;
|
||||
private int pointer;
|
||||
|
||||
public int Pointer
|
||||
{
|
||||
|
@ -178,12 +131,9 @@ namespace Bind.Structures
|
|||
set { pointer = value > 0 ? value : 0; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Set to true if parameter is an enum.
|
||||
public bool IsEnum { get; set; }
|
||||
|
||||
#region public bool CLSCompliant
|
||||
|
||||
|
||||
public bool CLSCompliant
|
||||
{
|
||||
|
@ -238,10 +188,6 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool Unsigned
|
||||
|
||||
public bool Unsigned
|
||||
{
|
||||
get
|
||||
|
@ -250,23 +196,9 @@ namespace Bind.Structures
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public WrapperTypes WrapperType { get; set; } = WrapperTypes.None;
|
||||
|
||||
#region public WrapperTypes WrapperType
|
||||
|
||||
private WrapperTypes _wrapper_type = WrapperTypes.None;
|
||||
|
||||
public WrapperTypes WrapperType
|
||||
{
|
||||
get { return _wrapper_type; }
|
||||
set { _wrapper_type = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public override string ToString()
|
||||
|
||||
static readonly string[] PointerLevels =
|
||||
private static readonly string[] PointerLevels =
|
||||
{
|
||||
"",
|
||||
"*",
|
||||
|
@ -275,7 +207,7 @@ namespace Bind.Structures
|
|||
"****"
|
||||
};
|
||||
|
||||
static readonly string[] ArrayLevels =
|
||||
private static readonly string[] ArrayLevels =
|
||||
{
|
||||
"",
|
||||
"[]",
|
||||
|
@ -292,12 +224,6 @@ namespace Bind.Structures
|
|||
ArrayLevels[Array]);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region IComparable<Type> Members
|
||||
|
||||
public int CompareTo(Type other)
|
||||
{
|
||||
// Make sure that Pointer parameters are sorted last to avoid bug [#1098].
|
||||
|
@ -306,26 +232,32 @@ namespace Bind.Structures
|
|||
// DelegateCollection.Add that depends on this fact.
|
||||
int result = this.CurrentType.CompareTo(other.CurrentType);
|
||||
if (result == 0)
|
||||
{
|
||||
result = Pointer.CompareTo(other.Pointer); // Must come after array/ref, see issue [#1098]
|
||||
}
|
||||
if (result == 0)
|
||||
{
|
||||
result = Reference.CompareTo(other.Reference);
|
||||
}
|
||||
if (result == 0)
|
||||
{
|
||||
result = Array.CompareTo(other.Array);
|
||||
}
|
||||
// Note: CLS-compliance and element counts
|
||||
// are used for comparison calculations, in order
|
||||
// to maintain a stable sorting order, even though
|
||||
// they are not used in equality calculations.
|
||||
if (result == 0)
|
||||
{
|
||||
result = CLSCompliant.CompareTo(other.CLSCompliant);
|
||||
}
|
||||
if (result == 0)
|
||||
{
|
||||
result = ElementCount.CompareTo(other.ElementCount);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IEquatable<Type> Members
|
||||
|
||||
public bool Equals(Type other)
|
||||
{
|
||||
bool result =
|
||||
|
@ -341,7 +273,5 @@ namespace Bind.Structures
|
|||
// redefinition errors in the generated bindings.
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#region --- License ---
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
/* Copyright (c) 2006, 2007 Stefanos Apostolopoulos
|
||||
* See license.txt for license info
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -15,8 +13,10 @@ using Enum=Bind.Structures.Enum;
|
|||
|
||||
namespace Bind
|
||||
{
|
||||
#region WrapperTypes enum
|
||||
|
||||
/// <summary>
|
||||
/// Defines different types of parameter wrapper identifiers, which are used for hinting at how the method
|
||||
/// signatures should be generated.
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum WrapperTypes
|
||||
{
|
||||
|
@ -94,11 +94,13 @@ namespace Bind
|
|||
/// Add an int32 overload for convenience.
|
||||
/// </summary>
|
||||
SizeParameter = 1 << 14,
|
||||
/// <summary>
|
||||
/// Function takes a ref but we emit a legacy array overload to maintain backwards compatability.
|
||||
/// </summary>
|
||||
LegacyArrayParameter = 1 << 15,
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
static class Utilities
|
||||
internal static class Utilities
|
||||
{
|
||||
public static readonly char[] Separators = { ' ', '\n', ',', '(', ')', ';', '#' };
|
||||
public static Regex Extensions { get; private set; }
|
||||
|
@ -109,9 +111,9 @@ namespace Bind
|
|||
// Note: REMOVING THESE WILL BREAK BINARY-COMPATIBILITY WITH OPENTK 1.0,
|
||||
// WRT THE ES 1.1 API.
|
||||
// You have been warned.
|
||||
static List<string> extension_names = new List<string>
|
||||
private static List<string> extension_names = new List<string>
|
||||
{
|
||||
"SGI", "SGIS", "SGIX", "IBM", "AMD", "INTEL",
|
||||
"SGI", "SGIS", "SGIX", "IBM", "AMD", "INTEL",
|
||||
};
|
||||
|
||||
public static void AddExtensions(IEnumerable<string> extensions)
|
||||
|
@ -149,12 +151,12 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
#region internal StreamReader OpenSpecFile(string file)
|
||||
|
||||
internal static StreamReader OpenSpecFile(string folder, string file)
|
||||
{
|
||||
if (String.IsNullOrEmpty(folder) || String.IsNullOrEmpty(file))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Console.WriteLine(folder);
|
||||
Console.WriteLine(file);
|
||||
|
@ -163,10 +165,6 @@ namespace Bind
|
|||
return new StreamReader(path);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Keywords
|
||||
|
||||
public static readonly List<string> CSharpKeywords = new List<string>(
|
||||
new string[]
|
||||
{
|
||||
|
@ -193,10 +191,6 @@ namespace Bind
|
|||
}
|
||||
);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Merge
|
||||
|
||||
// Merges the specified enum collections.
|
||||
internal static void Merge(EnumCollection enums, EnumCollection new_enums)
|
||||
{
|
||||
|
@ -245,7 +239,7 @@ namespace Bind
|
|||
else
|
||||
{
|
||||
// Tried to add a constant that already exists. If one constant
|
||||
// is like: 'Foo = 0x5' and the other like: 'Foo = Bar.Foo', then
|
||||
// is like: 'Foo = 0x5' and the other like: 'Foo = Bar.Foo', then
|
||||
// keep the first one.
|
||||
if (!String.IsNullOrEmpty(s.ConstantCollection[t.Name].Reference))
|
||||
{
|
||||
|
@ -256,10 +250,6 @@ namespace Bind
|
|||
return s;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal static string GetGL2Extension(string name)
|
||||
|
||||
internal static string GetGL2Extension(string name)
|
||||
{
|
||||
return GetExtension(name, false);
|
||||
|
@ -286,26 +276,16 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private static bool IsGL2Extension(string function)
|
||||
|
||||
private static bool IsGL2Extension(string function)
|
||||
{
|
||||
return !String.IsNullOrEmpty(GetGL2Extension(function));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal static string StripGL2Extension(string p)
|
||||
|
||||
internal static string StripGL2Extension(string p)
|
||||
{
|
||||
return p.Substring(0, p.Length - GetGL2Extension(p).Length);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static bool RequiresSlot(this Delegate d, Settings settings)
|
||||
{
|
||||
double version;
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos for the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,14 +22,10 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using System.Xml.XPath;
|
||||
using Bind.Structures;
|
||||
|
||||
|
@ -39,23 +34,19 @@ namespace Bind
|
|||
using Delegate = Bind.Structures.Delegate;
|
||||
using Enum = Bind.Structures.Enum;
|
||||
|
||||
class XmlSpecReader : ISpecReader
|
||||
internal class XmlSpecReader : ISpecReader
|
||||
{
|
||||
Settings Settings { get; set; }
|
||||
|
||||
#region Constructors
|
||||
private Settings Settings { get; set; }
|
||||
|
||||
public XmlSpecReader(Settings settings)
|
||||
{
|
||||
if (settings == null)
|
||||
{
|
||||
throw new ArgumentNullException("settings");
|
||||
}
|
||||
Settings = settings;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ISpecReader Members
|
||||
|
||||
public void ReadDelegates(string file, DelegateCollection delegates, string apiname, string apiversions)
|
||||
{
|
||||
var specs = new XPathDocument(file);
|
||||
|
@ -79,7 +70,9 @@ namespace Bind
|
|||
foreach (XPathNavigator nav in specs.CreateNavigator().Select(xpath_delete))
|
||||
{
|
||||
foreach (XPathNavigator node in nav.SelectChildren("function", String.Empty))
|
||||
{
|
||||
delegates.Remove(node.GetAttribute("name", String.Empty));
|
||||
}
|
||||
}
|
||||
foreach (XPathNavigator nav in specs.CreateNavigator().Select(xpath_add))
|
||||
{
|
||||
|
@ -113,7 +106,9 @@ namespace Bind
|
|||
foreach (XPathNavigator nav in specs.CreateNavigator().Select(xpath_delete))
|
||||
{
|
||||
foreach (XPathNavigator node in nav.SelectChildren("enum", String.Empty))
|
||||
{
|
||||
enums.Remove(node.GetAttribute("name", String.Empty));
|
||||
}
|
||||
}
|
||||
foreach (XPathNavigator nav in specs.CreateNavigator().Select(xpath_add))
|
||||
{
|
||||
|
@ -130,14 +125,18 @@ namespace Bind
|
|||
Dictionary<string, string> GLTypes = new Dictionary<string, string>();
|
||||
|
||||
if (sr == null)
|
||||
{
|
||||
return GLTypes;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
string line = sr.ReadLine();
|
||||
|
||||
if (String.IsNullOrEmpty(line) || line.StartsWith("#"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string[] words = line.Split(" ,*\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
|
@ -198,14 +197,20 @@ namespace Bind
|
|||
{
|
||||
string line = sr.ReadLine();
|
||||
if (String.IsNullOrEmpty(line) || line.StartsWith("#"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
string[] words = line.Split(" ,\t".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
if (words.Length < 2)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((Settings.Compatibility & Settings.Legacy.NoBoolParameters) != Settings.Legacy.None) && words[1] == "bool")
|
||||
{
|
||||
words[1] = "Int32";
|
||||
}
|
||||
|
||||
CSTypes.Add(words[0], words[1]);
|
||||
}
|
||||
|
@ -214,11 +219,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
|
||||
static void GetSignaturePaths(string apiname, string apiversion, out string xpath_add, out string xpath_delete)
|
||||
private static void GetSignaturePaths(string apiname, string apiversion, out string xpath_add, out string xpath_delete)
|
||||
{
|
||||
xpath_add = "/signatures/add";
|
||||
xpath_delete = "/signatures/delete";
|
||||
|
@ -230,7 +231,7 @@ namespace Bind
|
|||
"(contains(concat('|', @version, '|'), '|{1}|') or not(boolean(@version)))]",
|
||||
apiname,
|
||||
apiversion);
|
||||
xpath_add += match;
|
||||
xpath_add += match;
|
||||
xpath_delete += match;
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(apiname))
|
||||
|
@ -241,7 +242,7 @@ namespace Bind
|
|||
}
|
||||
}
|
||||
|
||||
string GetSpecVersion(XPathDocument specs)
|
||||
private string GetSpecVersion(XPathDocument specs)
|
||||
{
|
||||
var version =
|
||||
specs.CreateNavigator().SelectSingleNode("/signatures")
|
||||
|
@ -253,7 +254,7 @@ namespace Bind
|
|||
return version;
|
||||
}
|
||||
|
||||
DelegateCollection ReadDelegates(XPathNavigator specs, string apiversion)
|
||||
private DelegateCollection ReadDelegates(XPathNavigator specs, string apiversion)
|
||||
{
|
||||
DelegateCollection delegates = new DelegateCollection();
|
||||
var extensions = new List<string>();
|
||||
|
@ -269,7 +270,9 @@ namespace Bind
|
|||
// so we add them anyway (which is desirable).
|
||||
if (!String.IsNullOrEmpty(version) && !String.IsNullOrEmpty(apiversion) &&
|
||||
Decimal.Parse(version) > Decimal.Parse(apiversion))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check whether we are adding to an existing delegate or creating a new one.
|
||||
var d = new Delegate
|
||||
|
@ -284,7 +287,9 @@ namespace Bind
|
|||
Obsolete = node.GetAttribute("obsolete", String.Empty).Trim()
|
||||
};
|
||||
if (!extensions.Contains(d.Extension))
|
||||
{
|
||||
extensions.Add(d.Extension);
|
||||
}
|
||||
|
||||
foreach (XPathNavigator param in node.SelectChildren(XPathNodeType.Element))
|
||||
{
|
||||
|
@ -299,26 +304,12 @@ namespace Bind
|
|||
p.CurrentType = param.GetAttribute("type", String.Empty).Trim();
|
||||
p.Name = param.GetAttribute("name", String.Empty).Trim();
|
||||
|
||||
string element_count = param.GetAttribute("elementcount", String.Empty).Trim();
|
||||
if (String.IsNullOrEmpty(element_count))
|
||||
{
|
||||
element_count = param.GetAttribute("count", String.Empty).Trim();
|
||||
if (!String.IsNullOrEmpty(element_count))
|
||||
{
|
||||
int count;
|
||||
if (Int32.TryParse(element_count, out count))
|
||||
{
|
||||
p.ElementCount = count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
p.ComputeSize = param.GetAttribute("count", String.Empty).Trim();
|
||||
if (p.ComputeSize.StartsWith("COMPSIZE"))
|
||||
|
||||
int elementCount;
|
||||
if (Int32.TryParse(p.ComputeSize, out elementCount))
|
||||
{
|
||||
//remove the compsize hint, just keep comma delimited param names
|
||||
var len = "COMPSIZE(".Length;
|
||||
p.ComputeSize = p.ComputeSize.Substring(len, (p.ComputeSize.Length - len) - 1);
|
||||
p.ElementCount = elementCount;
|
||||
}
|
||||
|
||||
p.Flow = Parameter.GetFlowDirection(param.GetAttribute("flow", String.Empty).Trim());
|
||||
|
@ -335,7 +326,7 @@ namespace Bind
|
|||
return delegates;
|
||||
}
|
||||
|
||||
EnumCollection ReadEnums(XPathNavigator nav)
|
||||
private EnumCollection ReadEnums(XPathNavigator nav)
|
||||
{
|
||||
EnumCollection enums = new EnumCollection();
|
||||
Enum all = new Enum() { Name = Settings.CompleteEnumName };
|
||||
|
@ -356,7 +347,9 @@ namespace Bind
|
|||
e.Obsolete = node.GetAttribute("obsolete", String.Empty).Trim();
|
||||
|
||||
if (String.IsNullOrEmpty(e.Name))
|
||||
{
|
||||
throw new InvalidOperationException(String.Format("Empty name for enum element {0}", node.ToString()));
|
||||
}
|
||||
|
||||
// It seems that all flag collections contain "Mask" in their names.
|
||||
// This looks like a heuristic, but it holds 100% in practice
|
||||
|
@ -466,7 +459,5 @@ restart:
|
|||
Utilities.Merge(enums, all);
|
||||
return enums;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
StyleCop.Analyzers
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,7 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -34,7 +32,7 @@ using System.Xml.Linq;
|
|||
|
||||
namespace OpenTK.Convert
|
||||
{
|
||||
static class Extension
|
||||
internal static class Extension
|
||||
{
|
||||
public static string ValueOrDefault(this XAttribute a)
|
||||
{
|
||||
|
@ -42,13 +40,11 @@ namespace OpenTK.Convert
|
|||
}
|
||||
}
|
||||
|
||||
class GLXmlParser : Parser
|
||||
internal class GLXmlParser : XmlParser
|
||||
{
|
||||
static readonly Regex ExtensionRegex = new Regex(
|
||||
private static readonly Regex ExtensionRegex = new Regex(
|
||||
@"3DFX|(?!(?<=[1-4])D)[A-Z]{2,}$",
|
||||
RegexOptions.Compiled);
|
||||
string EnumPrefix { get { return Prefix.ToUpper() + "_"; } }
|
||||
string FuncPrefix { get { return Prefix; } }
|
||||
|
||||
public GLXmlParser()
|
||||
{
|
||||
|
@ -65,15 +61,19 @@ namespace OpenTK.Convert
|
|||
var version = (e.Attribute("version") ?? new XAttribute("version", String.Empty)).Value;
|
||||
var key = name + version;
|
||||
if (!elements.ContainsKey(key))
|
||||
{
|
||||
elements.Add(key, e);
|
||||
}
|
||||
else
|
||||
{
|
||||
elements[key].Add(e.Elements());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return elements.Values;
|
||||
}
|
||||
|
||||
static string[] GetApiNames(XElement feature)
|
||||
private static string[] GetApiNames(XElement feature)
|
||||
{
|
||||
string[] apinames = null;
|
||||
switch (feature.Name.LocalName)
|
||||
|
@ -111,7 +111,7 @@ namespace OpenTK.Convert
|
|||
return apinames;
|
||||
}
|
||||
|
||||
IEnumerable<XElement> ParseEnums(XDocument input)
|
||||
private IEnumerable<XElement> ParseEnums(XDocument input)
|
||||
{
|
||||
var features = input.Root.Elements("feature");
|
||||
var extensions = input.Root.Elements("extensions").Elements("extension");
|
||||
|
@ -128,7 +128,9 @@ namespace OpenTK.Convert
|
|||
{
|
||||
var api = (e.Attribute("api") ?? new XAttribute("api", "default")).Value;
|
||||
if (!enums.ContainsKey(api))
|
||||
{
|
||||
enums.Add(api, new SortedDictionary<string, string>());
|
||||
}
|
||||
|
||||
enums[api].Add(
|
||||
TrimName(e.Attribute("name").Value),
|
||||
|
@ -155,12 +157,14 @@ namespace OpenTK.Convert
|
|||
{
|
||||
var key = apiname + version;
|
||||
if (!APIs.ContainsKey(key))
|
||||
{
|
||||
APIs.Add(
|
||||
key,
|
||||
new XElement(
|
||||
"api",
|
||||
new XAttribute("name", apiname),
|
||||
String.IsNullOrEmpty(version) ? null : new XAttribute("version", version)));
|
||||
}
|
||||
var api = APIs[key];
|
||||
|
||||
var enum_name = TrimName(feature.Attribute("name").Value);
|
||||
|
@ -228,7 +232,7 @@ namespace OpenTK.Convert
|
|||
return APIs.Values;
|
||||
}
|
||||
|
||||
IEnumerable<XElement> ParseFunctions(XDocument input)
|
||||
private IEnumerable<XElement> ParseFunctions(XDocument input)
|
||||
{
|
||||
// Go through the list of commands and build OpenTK functions out of those.
|
||||
// Every function has a number of attributes that define which API version and
|
||||
|
@ -256,7 +260,7 @@ namespace OpenTK.Convert
|
|||
{
|
||||
var category = TrimName(feature.Attribute("name").Value);
|
||||
var apinames = GetApiNames(feature);
|
||||
|
||||
|
||||
var version =
|
||||
(feature.Attribute("number") != null ? feature.Attribute("number").Value : "")
|
||||
.Split('|');
|
||||
|
@ -271,12 +275,14 @@ namespace OpenTK.Convert
|
|||
|
||||
var key = apiname + cmd_version;
|
||||
if (!APIs.ContainsKey(key))
|
||||
{
|
||||
APIs.Add(
|
||||
key,
|
||||
new XElement(
|
||||
"api",
|
||||
new XAttribute("name", apiname),
|
||||
new XAttribute("version", cmd_version)));
|
||||
"api",
|
||||
new XAttribute("name", apiname),
|
||||
new XAttribute("version", cmd_version)));
|
||||
}
|
||||
var api = APIs[key];
|
||||
|
||||
foreach (var command in feature.Elements("require").Elements("command"))
|
||||
|
@ -286,13 +292,17 @@ namespace OpenTK.Convert
|
|||
ExtensionRegex.Match(cmd_name).Value ??
|
||||
(feature.Name == "extension" ? category.Substring(0, category.IndexOf("_")) : "Core");
|
||||
if (String.IsNullOrEmpty(cmd_extension))
|
||||
{
|
||||
cmd_extension = "Core";
|
||||
}
|
||||
|
||||
XElement function = TranslateCommand(commands[cmd_name]);
|
||||
function.Add(new XAttribute("category", cmd_category));
|
||||
function.Add(new XAttribute("extension", cmd_extension));
|
||||
if (!String.IsNullOrEmpty(cmd_version))
|
||||
{
|
||||
function.Add(new XAttribute("version", cmd_version));
|
||||
}
|
||||
|
||||
Merge(api, function);
|
||||
}
|
||||
|
@ -349,8 +359,9 @@ namespace OpenTK.Convert
|
|||
|
||||
// Sanity check: one function cannot belong to two different extensions
|
||||
if (f.Attribute("extension").Value != function.Attribute("extension").Value)
|
||||
{
|
||||
throw new InvalidOperationException("Different extensions for the same function");
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -408,19 +419,19 @@ namespace OpenTK.Convert
|
|||
return function;
|
||||
}
|
||||
|
||||
string FunctionName(XElement e)
|
||||
private string FunctionName(XElement e)
|
||||
{
|
||||
return TrimName(e.Element("proto").Element("name").Value);
|
||||
}
|
||||
|
||||
string FunctionParameterType(XElement e)
|
||||
private string FunctionParameterType(XElement e)
|
||||
{
|
||||
// Parse the C-like <proto> element. Possible instances:
|
||||
// Return types:
|
||||
// - <proto>void <name>glGetSharpenTexFuncSGIS</name></proto>
|
||||
// -> <returns>void</returns>
|
||||
// - <proto group="String">const <ptype>GLubyte</ptype> *<name>glGetString</name></proto>
|
||||
// -> <returns>String</returns>
|
||||
// -> <returns>String</returns>
|
||||
// Note: group attribute takes precedence if it exists. This matches the old .spec file format.
|
||||
// Parameter types:
|
||||
// - <param><ptype>GLenum</ptype> <name>shadertype</name></param>
|
||||
|
@ -438,9 +449,13 @@ namespace OpenTK.Convert
|
|||
{
|
||||
var words = ret.Split(" ".ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
|
||||
if (words[0] == "struct" || words[0] == "const")
|
||||
{
|
||||
words[1] = group.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
words[0] = group.Value;
|
||||
}
|
||||
|
||||
ret = String.Join(" ", words);
|
||||
}
|
||||
|
@ -448,29 +463,27 @@ namespace OpenTK.Convert
|
|||
return ret;
|
||||
}
|
||||
|
||||
string TrimName(string name)
|
||||
{
|
||||
if (name.StartsWith(EnumPrefix))
|
||||
return name.Remove(0, EnumPrefix.Length);
|
||||
else if (name.StartsWith(FuncPrefix))
|
||||
return name.Remove(0, FuncPrefix.Length);
|
||||
else
|
||||
return name;
|
||||
}
|
||||
|
||||
static string Join(string left, string right)
|
||||
private static string Join(string left, string right)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(left) && !String.IsNullOrEmpty(right))
|
||||
{
|
||||
return left + "|" + right;
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(left))
|
||||
{
|
||||
return left;
|
||||
}
|
||||
else if (!String.IsNullOrEmpty(right))
|
||||
{
|
||||
return right;
|
||||
}
|
||||
else
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
static XAttribute Lookup(IDictionary<string, XElement> categories, string cmd_name, string attribute)
|
||||
private static XAttribute Lookup(IDictionary<string, XElement> categories, string cmd_name, string attribute)
|
||||
{
|
||||
if (categories.ContainsKey(cmd_name))
|
||||
{
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
|
||||
<DefaultTargetSchema>IE50</DefaultTargetSchema>
|
||||
<DelaySign>false</DelaySign>
|
||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>
|
||||
</AppDesignerFolder>
|
||||
|
@ -39,12 +39,16 @@
|
|||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<Deterministic>true</Deterministic>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||
<DocumentationFile>bin\Debug\Convert.xml</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>False</Optimize>
|
||||
|
@ -52,7 +56,6 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>full</DebugType>
|
||||
<Commandlineparameters>-p:gl -v:4.5 -t:xml -o:../../../Source/Bind/Specifications/GL2/signatures.xml https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml</Commandlineparameters>
|
||||
</PropertyGroup>
|
||||
|
@ -61,13 +64,13 @@
|
|||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;</DefineConstants>
|
||||
<DocumentationFile>bin\Release\Convert.xml</DocumentationFile>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>none</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -94,10 +97,8 @@
|
|||
<Compile Include="Main.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Options.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Parser.cs">
|
||||
<Compile Include="Options.cs" />
|
||||
<Compile Include="XmlParser.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
|
@ -109,10 +110,17 @@
|
|||
<None Include="paket.references" />
|
||||
<None Include="XML schema notes.txt">
|
||||
</None>
|
||||
<None Include="Readme.txt">
|
||||
</None>
|
||||
<Content Include="README.md" />
|
||||
<Compile Include="GLXmlParser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.ruleset">
|
||||
<Link>stylecop.ruleset</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
|
@ -120,4 +128,600 @@
|
|||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3')">
|
||||
<ItemGroup>
|
||||
<Reference Include="CommandLine">
|
||||
<HintPath>..\..\packages\CommandLineParser\lib\net40\CommandLine.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="CommandLine">
|
||||
<HintPath>..\..\packages\CommandLineParser\lib\net45\CommandLine.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1')) Or ($(TargetFrameworkIdentifier) == 'MonoTouch') Or ($(TargetFrameworkIdentifier) == 'Xamarin.tvOS') Or ($(TargetFrameworkIdentifier) == 'Xamarin.watchOS') Or ($(TargetFrameworkIdentifier) == 'Xamarin.iOS') Or ($(TargetFrameworkIdentifier) == 'Xamarin.Mac')">
|
||||
<ItemGroup>
|
||||
<Reference Include="CommandLine">
|
||||
<HintPath>..\..\packages\CommandLineParser\lib\netstandard1.5\CommandLine.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
</ItemGroup>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Collections">
|
||||
<HintPath>..\..\packages\System.Collections\ref\netstandard1.0\System.Collections.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Collections">
|
||||
<HintPath>..\..\packages\System.Collections\ref\netstandard1.3\System.Collections.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="mscorlib">
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="System.Console">
|
||||
<HintPath>..\..\packages\System.Console\lib\net46\System.Console.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Console">
|
||||
<HintPath>..\..\packages\System.Console\ref\netstandard1.3\System.Console.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Diagnostics.Debug">
|
||||
<HintPath>..\..\packages\System.Diagnostics.Debug\ref\netstandard1.0\System.Diagnostics.Debug.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Diagnostics.Debug">
|
||||
<HintPath>..\..\packages\System.Diagnostics.Debug\ref\netstandard1.3\System.Diagnostics.Debug.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Globalization">
|
||||
<HintPath>..\..\packages\System.Globalization\ref\netstandard1.0\System.Globalization.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Globalization">
|
||||
<HintPath>..\..\packages\System.Globalization\ref\netstandard1.3\System.Globalization.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.IO">
|
||||
<HintPath>..\..\packages\System.IO\lib\net462\System.IO.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.IO">
|
||||
<HintPath>..\..\packages\System.IO\ref\netstandard1.0\System.IO.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.IO">
|
||||
<HintPath>..\..\packages\System.IO\ref\netstandard1.3\System.IO.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.IO">
|
||||
<HintPath>..\..\packages\System.IO\ref\netstandard1.5\System.IO.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq">
|
||||
<HintPath>..\..\packages\System.Linq\lib\net463\System.Linq.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2' Or $(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq">
|
||||
<HintPath>..\..\packages\System.Linq\ref\netstandard1.0\System.Linq.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq">
|
||||
<HintPath>..\..\packages\System.Linq\lib\netstandard1.6\System.Linq.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq">
|
||||
<HintPath>..\..\packages\System.Linq\ref\netstandard1.6\System.Linq.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq.Expressions">
|
||||
<HintPath>..\..\packages\System.Linq.Expressions\lib\net463\System.Linq.Expressions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq.Expressions">
|
||||
<HintPath>..\..\packages\System.Linq.Expressions\ref\netstandard1.0\System.Linq.Expressions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq.Expressions">
|
||||
<HintPath>..\..\packages\System.Linq.Expressions\ref\netstandard1.3\System.Linq.Expressions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq.Expressions">
|
||||
<HintPath>..\..\packages\System.Linq.Expressions\lib\netstandard1.6\System.Linq.Expressions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Linq.Expressions">
|
||||
<HintPath>..\..\packages\System.Linq.Expressions\ref\netstandard1.6\System.Linq.Expressions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ObjectModel">
|
||||
<HintPath>..\..\packages\System.ObjectModel\ref\netstandard1.0\System.ObjectModel.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ObjectModel">
|
||||
<HintPath>..\..\packages\System.ObjectModel\lib\netstandard1.3\System.ObjectModel.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ObjectModel">
|
||||
<HintPath>..\..\packages\System.ObjectModel\ref\netstandard1.3\System.ObjectModel.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection">
|
||||
<HintPath>..\..\packages\System.Reflection\lib\net462\System.Reflection.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection">
|
||||
<HintPath>..\..\packages\System.Reflection\ref\netstandard1.0\System.Reflection.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection">
|
||||
<HintPath>..\..\packages\System.Reflection\ref\netstandard1.3\System.Reflection.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection">
|
||||
<HintPath>..\..\packages\System.Reflection\ref\netstandard1.5\System.Reflection.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit\ref\netstandard1.1\System.Reflection.Emit.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit\lib\netstandard1.3\System.Reflection.Emit.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit.ILGeneration">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit.ILGeneration\ref\netstandard1.0\System.Reflection.Emit.ILGeneration.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit.ILGeneration">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit.ILGeneration\lib\netstandard1.3\System.Reflection.Emit.ILGeneration.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit.Lightweight">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit.Lightweight\ref\netstandard1.0\System.Reflection.Emit.Lightweight.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Emit.Lightweight">
|
||||
<HintPath>..\..\packages\System.Reflection.Emit.Lightweight\lib\netstandard1.3\System.Reflection.Emit.Lightweight.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2' Or $(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Extensions">
|
||||
<HintPath>..\..\packages\System.Reflection.Extensions\ref\netstandard1.0\System.Reflection.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2' Or $(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.Primitives">
|
||||
<HintPath>..\..\packages\System.Reflection.Primitives\ref\netstandard1.0\System.Reflection.Primitives.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.TypeExtensions">
|
||||
<HintPath>..\..\packages\System.Reflection.TypeExtensions\lib\net462\System.Reflection.TypeExtensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.TypeExtensions">
|
||||
<HintPath>..\..\packages\System.Reflection.TypeExtensions\lib\netstandard1.5\System.Reflection.TypeExtensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Reflection.TypeExtensions">
|
||||
<HintPath>..\..\packages\System.Reflection.TypeExtensions\ref\netstandard1.5\System.Reflection.TypeExtensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2' Or $(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Resources.ResourceManager">
|
||||
<HintPath>..\..\packages\System.Resources.ResourceManager\ref\netstandard1.0\System.Resources.ResourceManager.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ComponentModel.Composition">
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ComponentModel.Composition">
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime">
|
||||
<HintPath>..\..\packages\System.Runtime\lib\net462\System.Runtime.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v1.1'">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime">
|
||||
<HintPath>..\..\packages\System.Runtime\ref\netstandard1.0\System.Runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And $(TargetFrameworkVersion) == 'v1.2'">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime">
|
||||
<HintPath>..\..\packages\System.Runtime\ref\netstandard1.2\System.Runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime">
|
||||
<HintPath>..\..\packages\System.Runtime\ref\netstandard1.3\System.Runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime">
|
||||
<HintPath>..\..\packages\System.Runtime\ref\netstandard1.5\System.Runtime.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime.Extensions">
|
||||
<HintPath>..\..\packages\System.Runtime.Extensions\lib\net462\System.Runtime.Extensions.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime.Extensions">
|
||||
<HintPath>..\..\packages\System.Runtime.Extensions\ref\netstandard1.0\System.Runtime.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime.Extensions">
|
||||
<HintPath>..\..\packages\System.Runtime.Extensions\ref\netstandard1.3\System.Runtime.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Runtime.Extensions">
|
||||
<HintPath>..\..\packages\System.Runtime.Extensions\ref\netstandard1.5\System.Runtime.Extensions.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Text.Encoding">
|
||||
<HintPath>..\..\packages\System.Text.Encoding\ref\netstandard1.0\System.Text.Encoding.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Text.Encoding">
|
||||
<HintPath>..\..\packages\System.Text.Encoding\ref\netstandard1.3\System.Text.Encoding.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Threading">
|
||||
<HintPath>..\..\packages\System.Threading\ref\netstandard1.0\System.Threading.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == 'MonoAndroid' And ($(TargetFrameworkVersion) == 'v7.0' Or $(TargetFrameworkVersion) == 'v7.1'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Threading">
|
||||
<HintPath>..\..\packages\System.Threading\lib\netstandard1.3\System.Threading.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Threading">
|
||||
<HintPath>..\..\packages\System.Threading\ref\netstandard1.3\System.Threading.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v1.2')">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Threading.Tasks">
|
||||
<HintPath>..\..\packages\System.Threading.Tasks\ref\netstandard1.0\System.Threading.Tasks.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition="($(TargetFrameworkIdentifier) == '.NETStandard' And ($(TargetFrameworkVersion) == 'v1.3' Or $(TargetFrameworkVersion) == 'v1.4' Or $(TargetFrameworkVersion) == 'v1.5' Or $(TargetFrameworkVersion) == 'v1.6' Or $(TargetFrameworkVersion) == 'v2.0')) Or ($(TargetFrameworkIdentifier) == '.NETCoreApp' And ($(TargetFrameworkVersion) == 'v1.0' Or $(TargetFrameworkVersion) == 'v1.1' Or $(TargetFrameworkVersion) == 'v2.0'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Threading.Tasks">
|
||||
<HintPath>..\..\packages\System.Threading.Tasks\ref\netstandard1.3\System.Threading.Tasks.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
</Project>
|
|
@ -8,10 +8,10 @@
|
|||
// 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
|
||||
|
@ -28,11 +28,11 @@ using System.IO;
|
|||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using Mono.Options;
|
||||
using CommandLine;
|
||||
|
||||
namespace OpenTK.Convert
|
||||
{
|
||||
class EnumTokenComparer : IEqualityComparer<XNode>
|
||||
internal class EnumTokenComparer : IEqualityComparer<XNode>
|
||||
{
|
||||
public bool Equals(XNode a, XNode b)
|
||||
{
|
||||
|
@ -59,51 +59,22 @@ namespace OpenTK.Convert
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
class EntryPoint
|
||||
|
||||
internal class EntryPoint
|
||||
{
|
||||
static void Main(string[] args)
|
||||
private static Options CLIOptions;
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed(result => CLIOptions = result)
|
||||
.WithNotParsed(error => Environment.Exit(-1));
|
||||
|
||||
try
|
||||
{
|
||||
bool showHelp = false;
|
||||
string prefix = "gl";
|
||||
string version = null;
|
||||
string path = null;
|
||||
OptionSet opts = new OptionSet
|
||||
{
|
||||
{ "p=", "The {PREFIX} to remove from parsed functions and constants. " +
|
||||
"Defaults to \"" + prefix + "\".",
|
||||
v => prefix = v },
|
||||
{ "v:", "The {VERSION} of the specification being parsed.",
|
||||
v => version = v },
|
||||
{ "o:", "The {PATH} to the output file.",
|
||||
v => path = v },
|
||||
{ "?|h|help", "Show this message and exit.",
|
||||
v => showHelp = v != null },
|
||||
};
|
||||
var headers = opts.Parse(args);
|
||||
var app = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
|
||||
if (showHelp)
|
||||
{
|
||||
Console.WriteLine("usage: {0} -p:PREFIX -v:VERSION SPECIFICATIONS", app);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("Options:");
|
||||
opts.WriteOptionDescriptions(Console.Out);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("SPECIFICATIONS are the Khronos XML files to parse into OpenTK XML.");
|
||||
return;
|
||||
}
|
||||
if (prefix == null)
|
||||
{
|
||||
Console.WriteLine("{0}: missing required parameter -p.", app);
|
||||
Console.WriteLine("Use '{0} --help' for usage.", app);
|
||||
return;
|
||||
}
|
||||
XmlParser xmlParser = new GLXmlParser { Prefix = CLIOptions.Prefix };
|
||||
|
||||
Parser parser = new GLXmlParser { Prefix = prefix, Version = version };
|
||||
|
||||
var sigs = headers.Select(h => parser.Parse(h)).ToList();
|
||||
var sigs = CLIOptions.InputFiles.Select(h => xmlParser.Parse(h)).ToList();
|
||||
|
||||
// Merge any duplicate enum entries (in case an enum is declared
|
||||
// in multiple files with different entries in each file).
|
||||
|
@ -115,14 +86,14 @@ namespace OpenTK.Convert
|
|||
settings.Encoding = System.Text.Encoding.UTF8;
|
||||
|
||||
TextWriter out_stream = null;
|
||||
if (path == null)
|
||||
if (CLIOptions.OutputFile == null)
|
||||
{
|
||||
out_stream = Console.Out;
|
||||
Console.OutputEncoding = System.Text.Encoding.UTF8;
|
||||
}
|
||||
else
|
||||
{
|
||||
out_stream = new StreamWriter(path, false);
|
||||
out_stream = new StreamWriter(CLIOptions.OutputFile, false);
|
||||
}
|
||||
|
||||
using (var writer = XmlWriter.Create(out_stream, settings))
|
||||
|
@ -165,7 +136,9 @@ namespace OpenTK.Convert
|
|||
foreach (var e in entries)
|
||||
{
|
||||
if (e.Value.Name.LocalName != "enum")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
var tokens = e.Value.Elements()
|
||||
.OrderBy(t => (string)t.Attribute("name"))
|
||||
.ToList();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -5,13 +5,18 @@ using System.Reflection;
|
|||
[assembly: AssemblyTitleAttribute("Generator.Convert")]
|
||||
[assembly: AssemblyProductAttribute("OpenTK")]
|
||||
[assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")]
|
||||
[assembly: AssemblyVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyVersionAttribute("3.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0")]
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.")]
|
||||
namespace System {
|
||||
internal static class AssemblyVersionInformation {
|
||||
internal const string Version = "2.0.0";
|
||||
internal const string InformationalVersion = "2.0.0";
|
||||
internal const System.String AssemblyTitle = "Generator.Convert";
|
||||
internal const System.String AssemblyProduct = "OpenTK";
|
||||
internal const System.String AssemblyDescription = "A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.";
|
||||
internal const System.String AssemblyVersion = "3.0.0";
|
||||
internal const System.String AssemblyFileVersion = "3.0.0";
|
||||
internal const System.Boolean CLSCompliant = true;
|
||||
internal const System.String AssemblyCopyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.";
|
||||
}
|
||||
}
|
||||
|
|
24
src/Generator.Converter/README.md
Normal file
24
src/Generator.Converter/README.md
Normal file
|
@ -0,0 +1,24 @@
|
|||
### Introduction
|
||||
|
||||
This is a simple tool to convert Khronos XML to OpenTK XML files.
|
||||
|
||||
### Usage
|
||||
```
|
||||
Converting local files:
|
||||
Convert.exe --input-files gl.xml --output-file signatures.xml --prefix gl
|
||||
Converting latest remote specification:
|
||||
Convert.exe --input-files https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml --output-file signatures.xml --prefix gl
|
||||
|
||||
-p, --prefix Required. (Default: gl) The prefix to remove from parsed functions and constants.
|
||||
|
||||
-o, --output-file The path to the output file. Defaults to stdout if no path is provided.
|
||||
|
||||
-i, --input-files Required. A list of the Khronos XML files to parse into OpenTK XML. Remote resources in the form of URLs are supported.
|
||||
|
||||
--help Display this help screen.
|
||||
|
||||
--version Display version information.
|
||||
```
|
||||
### Support
|
||||
|
||||
If you encounter a bug, please file an issue report at the OpenTK [issue tracker](http://github.com/opentk/opentk/issues).
|
|
@ -1,24 +0,0 @@
|
|||
[Introduction]
|
||||
|
||||
This is a simple tool to convert Khronos XML to OpenTK XML files.
|
||||
|
||||
[Examples]
|
||||
|
||||
To download and convert the XML API registry from Khronos:
|
||||
Convert.exe -p:gl -o:../../../Source/Bind/Specifications/GL2/signatures.xml https://cvs.khronos.org/svn/repos/ogl/trunk/doc/registry/public/api/gl.xml
|
||||
|
||||
The line above will download the latest .xml files from the public Khronos repository and update signatures.xml for the binding generator.
|
||||
|
||||
[Usage]
|
||||
|
||||
Convert.exe -p:{PREFIX} -v:{VERSION} -t:{TYPE} -o:{OUT} {INPUT1} ... {INPUTn}
|
||||
{PREFIX} is a simple string that defines the a common prefix for functions and constants in this header. This prefix will be removed from the generated XML file.
|
||||
{VERSION} is a string that defines that version that will be used for functions in the generated XML file. Specific input files may override this setting.
|
||||
{OUT} is the output filename (optional). If no output file is specified, output will be directed to the console.
|
||||
{INPUT1..n} is a space-separated list of input files.
|
||||
|
||||
Despite what the help says, prefix and version parameters are necessary at the moment.
|
||||
|
||||
[Support]
|
||||
|
||||
If you encounter a bug, please file an issue report at http://github.com/opentk/opentk/issues
|
|
@ -8,10 +8,10 @@
|
|||
// 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
|
||||
|
@ -29,13 +29,12 @@ using System.Xml.Linq;
|
|||
namespace OpenTK.Convert
|
||||
{
|
||||
// The base class for a parser.
|
||||
abstract class Parser
|
||||
internal abstract class XmlParser
|
||||
{
|
||||
// Defines a prefix that should be removed from methods and tokens in the XML files, e.g. "gl", "cl", etc.
|
||||
public string Prefix { get; set; }
|
||||
|
||||
// Defines the version of the spec files (optional).
|
||||
public string Version { get; set; }
|
||||
public string EnumPrefix { get { return Prefix.ToUpper() + "_"; } }
|
||||
public string FuncPrefix { get { return Prefix; } }
|
||||
|
||||
// Implements the parsing logic for a specific input file.
|
||||
public abstract IEnumerable<XElement> Parse(string[] lines);
|
||||
|
@ -82,5 +81,21 @@ namespace OpenTK.Convert
|
|||
|
||||
return Parse(contents);
|
||||
}
|
||||
|
||||
public string TrimName(string name)
|
||||
{
|
||||
if (name.StartsWith(EnumPrefix))
|
||||
{
|
||||
return name.Remove(0, EnumPrefix.Length);
|
||||
}
|
||||
else if (name.StartsWith(FuncPrefix))
|
||||
{
|
||||
return name.Remove(0, FuncPrefix.Length);
|
||||
}
|
||||
else
|
||||
{
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
CommandLineParser
|
||||
StyleCop.Analyzers
|
10
src/Generator.Rewrite/CountAttribute.cs
Normal file
10
src/Generator.Rewrite/CountAttribute.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
|
||||
namespace OpenTK.Rewrite
|
||||
{
|
||||
internal class CountAttribute
|
||||
{
|
||||
public int Count;
|
||||
public string Parameter;
|
||||
public string Computed;
|
||||
}
|
||||
}
|
56
src/Generator.Rewrite/GeneratedVariableIdentifier.cs
Normal file
56
src/Generator.Rewrite/GeneratedVariableIdentifier.cs
Normal file
|
@ -0,0 +1,56 @@
|
|||
using System;
|
||||
using Mono.Cecil.Cil;
|
||||
|
||||
namespace OpenTK.Rewrite
|
||||
{
|
||||
/// <summary>
|
||||
/// Acts as a unique identifier for a generated named variable that can be passed between methods. Replaces uses of
|
||||
/// variable names from Mono.Cecil.
|
||||
/// </summary>
|
||||
internal sealed class GeneratedVariableIdentifier
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="MethodBody"/> which the variable is in.
|
||||
/// </summary>
|
||||
public MethodBody Body { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="VariableDefinition"/> which the variable idetifier maps to.
|
||||
/// </summary>
|
||||
public VariableDefinition Definition { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the generated variable.
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GeneratedVariableIdentifier"/> class.
|
||||
/// </summary>
|
||||
/// <param name="body">The method body which the variable is in.</param>
|
||||
/// <param name="definition">The definition of the generated variable.</param>
|
||||
/// <param name="name">The name of the generated variable.</param>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
public GeneratedVariableIdentifier(MethodBody body, VariableDefinition definition, string name)
|
||||
{
|
||||
if (body == null)
|
||||
{
|
||||
throw new ArgumentException("The body argument cannot be null.", nameof(body));
|
||||
}
|
||||
|
||||
if (definition == null)
|
||||
{
|
||||
throw new ArgumentException("The definition argument cannot be null.", nameof(definition));
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new ArgumentException("The name argument cannot be null or empty", nameof(name));
|
||||
}
|
||||
|
||||
this.Body = body;
|
||||
this.Definition = definition;
|
||||
this.Name = name;
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load diff
39
src/Generator.Rewrite/Options.cs
Normal file
39
src/Generator.Rewrite/Options.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using CommandLine;
|
||||
using CommandLine.Text;
|
||||
|
||||
namespace OpenTK.Rewrite
|
||||
{
|
||||
/// <summary>
|
||||
/// A container class used by <see cref="CommandLine.Parser"/> to parse command line arguments.
|
||||
/// </summary>
|
||||
public class Options
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the path to the target assembly that should be rewritten.
|
||||
/// </summary>
|
||||
[Option('a', "assembly", Required = true,
|
||||
HelpText = "The path to the target assembly that should be rewritten.")]
|
||||
public string TargetAssembly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Get or sets the path to the strong name key which should be used to sign or resign the assembly.
|
||||
/// </summary>
|
||||
[Option('k', "signing-key",
|
||||
HelpText = "The path to the strong name key which should be used to sign or resign the assembly.")]
|
||||
public string StrongNameKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether calls to GL.GetError() are wrapped around each native call.
|
||||
/// </summary>
|
||||
[Option('d', "debug", Default = false,
|
||||
HelpText = "Enable calls to GL.GetError(), wrapped around each native call.")]
|
||||
public bool EnableDebugCalls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether native calls are forced to use DllImport instead of GetProcAddress.
|
||||
/// </summary>
|
||||
[Option("dllimport", Default = false,
|
||||
HelpText = "Force native calls to use DllImport instead of GetProcAddress.")]
|
||||
public bool UseDLLImport { get; set; }
|
||||
}
|
||||
}
|
|
@ -18,8 +18,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using CommandLine;
|
||||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
using Mono.Cecil.Rocks;
|
||||
|
@ -28,69 +27,64 @@ namespace OpenTK.Rewrite
|
|||
{
|
||||
// Replaces OpenTK.InteropHelper method instances
|
||||
// with the s IL instructions.
|
||||
class Program
|
||||
internal class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
private static Options Options;
|
||||
|
||||
private static void Main(string[] args)
|
||||
{
|
||||
if (args.Length == 0)
|
||||
Parser.Default.ParseArguments<Options>(args)
|
||||
.WithParsed(result => Options = result)
|
||||
.WithNotParsed(error => Environment.Exit(-1));
|
||||
|
||||
// Argument error checking
|
||||
if (!File.Exists(Options.TargetAssembly))
|
||||
{
|
||||
Console.WriteLine("Usage: rewrite [file.dll] [file.snk] [options]");
|
||||
Console.WriteLine("[options] is:");
|
||||
Console.WriteLine(" -debug (enable calls to GL.GetError())");
|
||||
Console.WriteLine(" -dllimport (force calls to use DllImport instead of GetProcAddress)");
|
||||
return;
|
||||
Console.Error.WriteLine($"Target assembly not found. \n" +
|
||||
$"Please check the given path ({Options.TargetAssembly}).");
|
||||
}
|
||||
|
||||
if (!File.Exists(Path.ChangeExtension(Options.TargetAssembly, "pdb")))
|
||||
{
|
||||
Console.Error.WriteLine("Debugging symbols for target assembly not found. \n" +
|
||||
"Please make sure that debugging symbols are being generated.");
|
||||
}
|
||||
|
||||
var program = new Program();
|
||||
var file = args[0];
|
||||
var key = args[1];
|
||||
var options = args.Where(a => a.StartsWith("-") || a.StartsWith("/"));
|
||||
program.Rewrite(file, key, options);
|
||||
program.Rewrite();
|
||||
}
|
||||
|
||||
// mscorlib types
|
||||
static AssemblyDefinition mscorlib;
|
||||
static TypeDefinition TypeMarshal;
|
||||
static TypeDefinition TypeStringBuilder;
|
||||
static TypeDefinition TypeVoid;
|
||||
static TypeDefinition TypeIntPtr;
|
||||
static TypeDefinition TypeInt32;
|
||||
private static AssemblyDefinition mscorlib;
|
||||
|
||||
private static TypeDefinition TypeMarshal;
|
||||
private static TypeDefinition TypeVoid;
|
||||
private static TypeDefinition TypeIntPtr;
|
||||
private static TypeDefinition TypeInt32;
|
||||
|
||||
// OpenTK.BindingsBase
|
||||
static TypeDefinition TypeBindingsBase;
|
||||
private static TypeDefinition TypeBindingsBase;
|
||||
|
||||
static bool dllimport;
|
||||
|
||||
void Rewrite(string file, string keyfile, IEnumerable<string> options)
|
||||
private void Rewrite()
|
||||
{
|
||||
dllimport = options.Contains("-dllimport");
|
||||
|
||||
// Specify assembly read and write parameters
|
||||
// We want to keep a valid symbols file (pdb or mdb)
|
||||
var read_params = new ReaderParameters();
|
||||
var write_params = new WriterParameters();
|
||||
var pdb = Path.ChangeExtension(file, "pdb");
|
||||
var mdb = file + ".mdb";
|
||||
ISymbolReaderProvider provider = null;
|
||||
if (File.Exists(pdb))
|
||||
{
|
||||
provider = new Mono.Cecil.Pdb.PdbReaderProvider();
|
||||
}
|
||||
else if (File.Exists(mdb))
|
||||
{
|
||||
provider = new Mono.Cecil.Mdb.MdbReaderProvider();
|
||||
}
|
||||
read_params.SymbolReaderProvider = provider;
|
||||
|
||||
read_params.ReadSymbols = true;
|
||||
read_params.ReadWrite = true;
|
||||
write_params.WriteSymbols = true;
|
||||
|
||||
if (!String.IsNullOrEmpty(keyfile) && File.Exists(keyfile))
|
||||
if (!String.IsNullOrEmpty(Options.StrongNameKey) && File.Exists(Options.StrongNameKey))
|
||||
{
|
||||
keyfile = Path.GetFullPath(keyfile);
|
||||
var fs = new FileStream(keyfile, FileMode.Open, FileAccess.Read);
|
||||
var keypair = new System.Reflection.StrongNameKeyPair(fs);
|
||||
fs.Close();
|
||||
write_params.StrongNameKeyPair = keypair;
|
||||
string absoluteKeyFilePath = Path.GetFullPath(Options.StrongNameKey);
|
||||
|
||||
using (var fs = new FileStream(absoluteKeyFilePath, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
var keypair = new System.Reflection.StrongNameKeyPair(fs);
|
||||
write_params.StrongNameKeyPair = keypair;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -98,70 +92,79 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
|
||||
// Load assembly and process all modules
|
||||
var assembly = AssemblyDefinition.ReadAssembly(file, read_params);
|
||||
var rewritten = assembly.CustomAttributes.FirstOrDefault(a => a.AttributeType.Name == "RewrittenAttribute");
|
||||
if (rewritten == null)
|
||||
try
|
||||
{
|
||||
foreach (var module in assembly.Modules)
|
||||
using (AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(Options.TargetAssembly, read_params))
|
||||
{
|
||||
foreach (var reference in module.AssemblyReferences)
|
||||
var rewritten = assembly.CustomAttributes.FirstOrDefault(a => a.AttributeType.Name == "RewrittenAttribute");
|
||||
if (rewritten == null)
|
||||
{
|
||||
try
|
||||
foreach (var module in assembly.Modules)
|
||||
{
|
||||
var resolved = module.AssemblyResolver.Resolve(reference);
|
||||
if (reference.Name == "mscorlib")
|
||||
foreach (var reference in module.AssemblyReferences)
|
||||
{
|
||||
mscorlib = resolved;
|
||||
try
|
||||
{
|
||||
var resolved = module.AssemblyResolver.Resolve(reference);
|
||||
if (reference.Name == "mscorlib")
|
||||
{
|
||||
mscorlib = resolved;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.Error.WriteLine(e.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
if (mscorlib == null)
|
||||
{
|
||||
Console.Error.WriteLine(e.ToString());
|
||||
Console.Error.WriteLine("Failed to locate mscorlib");
|
||||
return;
|
||||
}
|
||||
TypeMarshal = mscorlib.MainModule.GetType("System.Runtime.InteropServices.Marshal");
|
||||
TypeVoid = mscorlib.MainModule.GetType("System.Void");
|
||||
TypeIntPtr = mscorlib.MainModule.GetType("System.IntPtr");
|
||||
TypeInt32 = mscorlib.MainModule.GetType("System.Int32");
|
||||
|
||||
TypeBindingsBase = assembly.Modules.Select(m => m.GetType("OpenTK.BindingsBase")).First();
|
||||
|
||||
foreach (var module in assembly.Modules)
|
||||
{
|
||||
foreach (var type in module.Types)
|
||||
{
|
||||
Rewrite(type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mscorlib == null)
|
||||
{
|
||||
Console.Error.WriteLine("Failed to locate mscorlib");
|
||||
return;
|
||||
}
|
||||
TypeMarshal = mscorlib.MainModule.GetType("System.Runtime.InteropServices.Marshal");
|
||||
TypeStringBuilder = mscorlib.MainModule.GetType("System.Text.StringBuilder");
|
||||
TypeVoid = mscorlib.MainModule.GetType("System.Void");
|
||||
TypeIntPtr = mscorlib.MainModule.GetType("System.IntPtr");
|
||||
TypeInt32 = mscorlib.MainModule.GetType("System.Int32");
|
||||
|
||||
TypeBindingsBase = assembly.Modules.Select(m => m.GetType("OpenTK.BindingsBase")).First();
|
||||
|
||||
foreach (var module in assembly.Modules)
|
||||
{
|
||||
foreach (var type in module.Types)
|
||||
else
|
||||
{
|
||||
Rewrite(type, options);
|
||||
Console.Error.WriteLine("Error: assembly has already been rewritten");
|
||||
}
|
||||
|
||||
// Save rewritten assembly
|
||||
assembly.Write(write_params);
|
||||
}
|
||||
}
|
||||
else
|
||||
catch (InvalidOperationException inex)
|
||||
{
|
||||
Console.Error.WriteLine("Error: assembly has already been rewritten");
|
||||
Console.WriteLine("Failed to load the assembly. It may already have been rewritten, and the debug symbols no longer match.");
|
||||
Console.WriteLine(inex);
|
||||
}
|
||||
|
||||
// Save rewritten assembly
|
||||
assembly.Write(file, write_params);
|
||||
}
|
||||
|
||||
void Rewrite(TypeDefinition type, IEnumerable<string> options)
|
||||
private void Rewrite(TypeDefinition type)
|
||||
{
|
||||
var entry_points = type.Fields.FirstOrDefault(f => f.Name == "EntryPoints");
|
||||
if (entry_points != null)
|
||||
{
|
||||
// Build list of entry point signatures (one per entry point)
|
||||
// Build list of entry point signatures (one per entry point)
|
||||
var entry_signatures = new List<MethodDefinition>();
|
||||
entry_signatures.AddRange(type.Methods
|
||||
.Where(t => t.CustomAttributes.Any(a => a.AttributeType.Name == "SlotAttribute")));
|
||||
|
||||
Rewrite(type, entry_points, entry_signatures, options);
|
||||
Rewrite(type, entry_points, entry_signatures);
|
||||
|
||||
RemoveNativeSignatures(type, entry_signatures);
|
||||
}
|
||||
|
@ -171,16 +174,18 @@ namespace OpenTK.Rewrite
|
|||
var rewritten_constructor = type.GetConstructors().First();
|
||||
var rewritten = new CustomAttribute(rewritten_constructor);
|
||||
rewritten.ConstructorArguments.Add(new CustomAttributeArgument(
|
||||
type.Module.Import(mscorlib.MainModule.GetType("System.Boolean")), true));
|
||||
type.Module.ImportReference(mscorlib.MainModule.GetType("System.Boolean")), true));
|
||||
type.Module.Assembly.CustomAttributes.Add(rewritten);
|
||||
}
|
||||
}
|
||||
|
||||
int GetSlot(MethodDefinition signature)
|
||||
private static int GetSlot(MethodDefinition signature)
|
||||
{
|
||||
// Pretend there is no slots if we want to force everything to work through DllImport (Android & iOS)
|
||||
if (dllimport)
|
||||
if (Options.UseDLLImport)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
var slot_attribute = signature.CustomAttributes
|
||||
.FirstOrDefault(a => a.AttributeType.Name == "SlotAttribute");
|
||||
|
@ -192,8 +197,8 @@ namespace OpenTK.Rewrite
|
|||
return slot;
|
||||
}
|
||||
|
||||
void Rewrite(TypeDefinition type, FieldDefinition entry_points,
|
||||
List<MethodDefinition> entry_signatures, IEnumerable<string> options)
|
||||
private void Rewrite(TypeDefinition type, FieldDefinition entry_points,
|
||||
List<MethodDefinition> entry_signatures)
|
||||
{
|
||||
// Rewrite all wrapper methods
|
||||
var wrapper_signatures = new List<MethodDefinition>();
|
||||
|
@ -203,15 +208,15 @@ namespace OpenTK.Rewrite
|
|||
foreach (var wrapper in wrapper_signatures)
|
||||
{
|
||||
var autogenerated = wrapper.CustomAttributes
|
||||
.Where(a => a.AttributeType.Name == "AutoGeneratedAttribute");
|
||||
if (autogenerated.Count() > 0)
|
||||
.Where(a => a.AttributeType.Name == "AutoGeneratedAttribute").ToList();
|
||||
if (autogenerated.Any())
|
||||
{
|
||||
var signature_name = (string)autogenerated.First()
|
||||
.Fields.First(f => f.Name == "EntryPoint").Argument.Value;
|
||||
var signature = entry_signatures.FirstOrDefault(s => s.Name == signature_name);
|
||||
int slot = GetSlot(signature);
|
||||
|
||||
ProcessMethod(wrapper, signature, slot, entry_points, options);
|
||||
ProcessMethod(wrapper, signature, slot, entry_points);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,12 +226,12 @@ namespace OpenTK.Rewrite
|
|||
{
|
||||
foreach (var nested_type in type.NestedTypes)
|
||||
{
|
||||
Rewrite(nested_type, entry_points, entry_signatures, options);
|
||||
Rewrite(nested_type, entry_points, entry_signatures);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RemoveNativeSignatures(TypeDefinition type, List<MethodDefinition> methods)
|
||||
private static void RemoveNativeSignatures(TypeDefinition type, IEnumerable<MethodDefinition> methods)
|
||||
{
|
||||
// Remove all DllImports for functions called through calli, since
|
||||
// their signatures are embedded directly into the calli callsite.
|
||||
|
@ -237,7 +242,7 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
}
|
||||
|
||||
void RemoveSupportingAttributes(TypeDefinition type)
|
||||
private static void RemoveSupportingAttributes(TypeDefinition type)
|
||||
{
|
||||
foreach (var method in type.Methods)
|
||||
{
|
||||
|
@ -250,12 +255,25 @@ namespace OpenTK.Rewrite
|
|||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var parameter in method.Parameters)
|
||||
{
|
||||
var pattr = parameter.CustomAttributes;
|
||||
for (int i = 0; i < pattr.Count; i++)
|
||||
{
|
||||
if (pattr[i].AttributeType.Name == "CountAttribute")
|
||||
{
|
||||
pattr.RemoveAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create body for method
|
||||
static void ProcessMethod(MethodDefinition wrapper, MethodDefinition native, int slot,
|
||||
FieldDefinition entry_points, IEnumerable<string> options)
|
||||
private static void ProcessMethod(MethodDefinition wrapper, MethodDefinition native, int slot,
|
||||
FieldDefinition entry_points)
|
||||
{
|
||||
var body = wrapper.Body;
|
||||
var il = body.GetILProcessor();
|
||||
|
@ -266,23 +284,29 @@ namespace OpenTK.Rewrite
|
|||
// and push each parameter on the stack
|
||||
|
||||
DebugVariables vars = null;
|
||||
if (options.Contains("-debug"))
|
||||
if (Options.EnableDebugCalls)
|
||||
{
|
||||
vars = EmitDebugPrologue(wrapper, il);
|
||||
}
|
||||
|
||||
// Patch convenience wrappers
|
||||
List<GeneratedVariableIdentifier> generatedVariables = new List<GeneratedVariableIdentifier>();
|
||||
if (wrapper.Parameters.Count == native.Parameters.Count)
|
||||
{
|
||||
EmitParameters(wrapper, native, body, il);
|
||||
generatedVariables = EmitParameters(wrapper, native, body, il);
|
||||
}
|
||||
else
|
||||
{
|
||||
int difference = native.Parameters.Count - wrapper.Parameters.Count;
|
||||
EmitConvenienceWrapper(wrapper, native, difference, body, il);
|
||||
generatedVariables = EmitConvenienceWrapper(wrapper, native, difference, body, il);
|
||||
}
|
||||
|
||||
if (slot != -1)
|
||||
if (slot == -1 || Options.UseDLLImport)
|
||||
{
|
||||
// issue DllImport call
|
||||
EmitCall(il, native);
|
||||
}
|
||||
else
|
||||
{
|
||||
// push the entry point address on the stack
|
||||
EmitEntryPoint(entry_points, il, slot);
|
||||
|
@ -290,20 +314,15 @@ namespace OpenTK.Rewrite
|
|||
// issue calli
|
||||
EmitCalli(il, native);
|
||||
}
|
||||
else
|
||||
{
|
||||
// issue DllImport call
|
||||
EmitCall(il, native);
|
||||
}
|
||||
|
||||
if (wrapper.ReturnType.Name != "Void")
|
||||
{
|
||||
EmitReturnTypeWrapper(wrapper, native, body, il);
|
||||
}
|
||||
|
||||
EmitParameterEpilogues(wrapper, native, body, il);
|
||||
EmitParameterEpilogues(wrapper, native, body, il, generatedVariables);
|
||||
|
||||
if (options.Contains("-debug"))
|
||||
if (Options.EnableDebugCalls)
|
||||
{
|
||||
EmitDebugEpilogue(wrapper, il, vars);
|
||||
}
|
||||
|
@ -320,7 +339,7 @@ namespace OpenTK.Rewrite
|
|||
body.OptimizeMacros();
|
||||
}
|
||||
|
||||
class DebugVariables
|
||||
private class DebugVariables
|
||||
{
|
||||
public TypeDefinition ErrorHelperType;
|
||||
public VariableDefinition ErrorHelperLocal;
|
||||
|
@ -329,17 +348,17 @@ namespace OpenTK.Rewrite
|
|||
public Instruction BeginTry;
|
||||
}
|
||||
|
||||
static DebugVariables EmitDebugPrologue(MethodDefinition wrapper, ILProcessor il)
|
||||
private static DebugVariables EmitDebugPrologue(MethodDefinition wrapper, ILProcessor il)
|
||||
{
|
||||
|
||||
DebugVariables vars = null;
|
||||
if (il.Body.Method.Name != "GetError")
|
||||
{
|
||||
// Pull out the namespace name, method fullname will look
|
||||
// Pull out the namespace name, method fullname will look
|
||||
// something like "type namespace.class::method(type arg)"
|
||||
var module = il.Body.Method.FullName;
|
||||
module = module.Substring(module.IndexOf(' ') + 1);
|
||||
module = module.Substring(0, module.IndexOf("::"));
|
||||
module = module.Substring(0, module.IndexOf("::", StringComparison.Ordinal));
|
||||
module = module.Substring(0, module.LastIndexOf('.'));
|
||||
|
||||
// Only works for Graphics modules due to hardcoded use of
|
||||
|
@ -413,7 +432,7 @@ namespace OpenTK.Rewrite
|
|||
return vars;
|
||||
}
|
||||
|
||||
static void EmitDebugEpilogue(MethodDefinition wrapper, ILProcessor il, DebugVariables vars)
|
||||
private static void EmitDebugEpilogue(MethodDefinition wrapper, ILProcessor il, DebugVariables vars)
|
||||
{
|
||||
if (vars != null)
|
||||
{
|
||||
|
@ -479,7 +498,7 @@ namespace OpenTK.Rewrite
|
|||
// String return-type wrapper
|
||||
// return new string((sbyte*)((void*)GetString()));
|
||||
|
||||
var intptr_to_voidpointer = wrapper.Module.Import(mscorlib.MainModule.GetType("System.IntPtr").GetMethods()
|
||||
var intptr_to_voidpointer = wrapper.Module.ImportReference(mscorlib.MainModule.GetType("System.IntPtr").GetMethods()
|
||||
.First(m =>
|
||||
{
|
||||
return
|
||||
|
@ -487,7 +506,7 @@ namespace OpenTK.Rewrite
|
|||
m.ReturnType.Name == "Void*";
|
||||
}));
|
||||
|
||||
var string_constructor = wrapper.Module.Import(mscorlib.MainModule.GetType("System.String").GetConstructors()
|
||||
var string_constructor = wrapper.Module.ImportReference(mscorlib.MainModule.GetType("System.String").GetConstructors()
|
||||
.First(m =>
|
||||
{
|
||||
var p = m.Parameters;
|
||||
|
@ -521,169 +540,233 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
}
|
||||
|
||||
static void EmitParameterEpilogues(MethodDefinition wrapper, MethodDefinition native, MethodBody body, ILProcessor il)
|
||||
private static void EmitParameterEpilogues(MethodDefinition wrapper, MethodDefinition native, MethodBody body, ILProcessor il,
|
||||
List<GeneratedVariableIdentifier> generatedVariables)
|
||||
{
|
||||
foreach (var p in wrapper.Parameters)
|
||||
{
|
||||
if (p.ParameterType.Name == "StringBuilder")
|
||||
if (!p.ParameterType.IsArray && p.ParameterType.Name == "String&")
|
||||
{
|
||||
EmitStringBuilderEpilogue(wrapper, native, p, body, il);
|
||||
EmitStringOutEpilogue(wrapper, native, p, body, il, GetGeneratedVariable(generatedVariables, p.Name + "_string_ptr", body));
|
||||
}
|
||||
|
||||
if (!p.ParameterType.IsArray && p.ParameterType.Name == "String")
|
||||
{
|
||||
EmitStringEpilogue(wrapper, p, body, il);
|
||||
EmitStringEpilogue(wrapper, p, body, il, GetGeneratedVariable(generatedVariables, p.Name + "_string_ptr", body));
|
||||
}
|
||||
|
||||
if (p.ParameterType.IsArray && p.ParameterType.GetElementType().Name == "String")
|
||||
{
|
||||
EmitStringArrayEpilogue(wrapper, p, body, il);
|
||||
EmitStringArrayEpilogue(wrapper, p, body, il, GetGeneratedVariable(generatedVariables, p.Name + "_string_array_ptr", body));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void EmitStringBuilderParameter(MethodDefinition method, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
/// <summary>
|
||||
/// Retrieves a generated variable by searching the given list by the variable's name and associated method body.
|
||||
/// </summary>
|
||||
/// <param name="variableIdentifiers"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="body"></param>
|
||||
/// <returns></returns>
|
||||
private static GeneratedVariableIdentifier GetGeneratedVariable(IEnumerable<GeneratedVariableIdentifier> variableIdentifiers, string name, MethodBody body)
|
||||
{
|
||||
var p = parameter.ParameterType;
|
||||
return variableIdentifiers.FirstOrDefault(v => v.Name == name && v.Body == body &&
|
||||
body.Variables.Contains(v.Definition));
|
||||
}
|
||||
|
||||
// void GetShaderInfoLog(..., StringBuilder foo)
|
||||
// IntPtr foo_sb_ptr;
|
||||
private static GeneratedVariableIdentifier EmitStringOutParameter(MethodDefinition method, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
{
|
||||
// void GetShaderInfoLog(..., out String foo)
|
||||
// IntPtr foo_string_ptr;
|
||||
// try {
|
||||
// foo_sb_ptr = Marshal.AllocHGlobal(sb.Capacity + 1);
|
||||
// glGetShaderInfoLog(..., foo_sb_ptr);
|
||||
// MarshalPtrToStringBuilder(foo_sb_ptr, sb);
|
||||
// foo_string_ptr = Marshal.AllocHGlobal(count + 1);
|
||||
// glGetShaderInfoLog(..., foo_string_ptr);
|
||||
// foo = MarshalPtrToString(foo_string_ptr);
|
||||
// }
|
||||
// finally {
|
||||
// Marshal.FreeHGlobal(sb_ptr);
|
||||
// Marshal.FreeHGlobal(foo_string_ptr);
|
||||
// }
|
||||
// Make sure we have imported StringBuilder::Capacity and Marshal::AllocHGlobal
|
||||
var sb_get_capacity = method.Module.Import(TypeStringBuilder.Methods.First(m => m.Name == "get_Capacity"));
|
||||
var alloc_hglobal = method.Module.Import(TypeMarshal.Methods.First(m => m.Name == "AllocHGlobal"));
|
||||
|
||||
// Pop off the string parameter that would of just been loaded
|
||||
il.Emit(OpCodes.Pop);
|
||||
|
||||
// Make sure we have imported Marshal::AllocHGlobal
|
||||
var alloc_hglobal = method.Module.ImportReference(TypeMarshal.Methods.First(m => m.Name == "AllocHGlobal"));
|
||||
|
||||
// IntPtr ptr;
|
||||
var variable_name = parameter.Name + " _sb_ptr";
|
||||
body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr));
|
||||
int index = body.Variables.Count - 1;
|
||||
var variableDefinition = new VariableDefinition(TypeIntPtr);
|
||||
body.Variables.Add(variableDefinition);
|
||||
int stringPtrIndex = body.Variables.Count - 1;
|
||||
|
||||
// ptr = Marshal.AllocHGlobal(sb.Capacity + 1);
|
||||
il.Emit(OpCodes.Callvirt, sb_get_capacity);
|
||||
GeneratedVariableIdentifier stringPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_string_ptr");
|
||||
|
||||
// ptr = Marshal.AllocHGlobal(count + 1);
|
||||
var count = GetCountAttribute(parameter);
|
||||
if (count == null)
|
||||
{
|
||||
// We need a count attribute so we know what size to make the
|
||||
// string buffer. Currently every string out parameter has a
|
||||
// count attribute but this check is in place to make things
|
||||
// clearer if this case is ever hit.
|
||||
throw new InvalidOperationException(string.Format("{0}({1}) doesn't have a count attribute", method.Name, parameter.Name));
|
||||
}
|
||||
|
||||
if (count.Count != 0)
|
||||
{
|
||||
// Fixed size
|
||||
il.Emit(OpCodes.Ldc_I4, count.Count);
|
||||
}
|
||||
else if (count.Parameter != null)
|
||||
{
|
||||
// Parameter sized
|
||||
var countVariable = EmitCountVariable(method, body, il, count.Parameter);
|
||||
il.Emit(OpCodes.Ldloc, countVariable.Index);
|
||||
}
|
||||
else if (count.Computed != null)
|
||||
{
|
||||
if (method.Name == "GetActiveVarying")
|
||||
{
|
||||
// GetActiveVaryingNV's name parameter has a count of "COMPSIZE(program,index,bufSize)" but really it should be bufSize.
|
||||
var countVariable = EmitCountVariable(method, body, il, "bufSize");
|
||||
il.Emit(OpCodes.Ldloc, countVariable.Index);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Computed counts are hard and require manual reading of the specification for each one.
|
||||
throw new NotSupportedException(string.Format("{0}({1}) requires a computed count: {2}", method.Name, parameter.Name, count.Computed));
|
||||
}
|
||||
}
|
||||
|
||||
il.Emit(OpCodes.Ldc_I4, 1);
|
||||
il.Emit(OpCodes.Add);
|
||||
il.Emit(OpCodes.Call, alloc_hglobal);
|
||||
il.Emit(OpCodes.Stloc, index);
|
||||
il.Emit(OpCodes.Ldloc, index);
|
||||
il.Emit(OpCodes.Stloc, stringPtrIndex);
|
||||
il.Emit(OpCodes.Ldloc, stringPtrIndex);
|
||||
|
||||
// We'll emit the try-finally block in the epilogue implementation,
|
||||
// because we haven't yet emitted all necessary instructions here.
|
||||
|
||||
return stringPtrVar;
|
||||
}
|
||||
|
||||
static void EmitStringBuilderEpilogue(MethodDefinition wrapper, MethodDefinition native, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
private static void EmitStringOutEpilogue(MethodDefinition wrapper, MethodDefinition native,
|
||||
ParameterDefinition parameter, MethodBody body, ILProcessor il, GeneratedVariableIdentifier generatedPtrVar)
|
||||
{
|
||||
var p = parameter.ParameterType;
|
||||
if (p.Name == "StringBuilder")
|
||||
if (generatedPtrVar == null)
|
||||
{
|
||||
// void GetShaderInfoLog(..., StringBuilder foo)
|
||||
// try {
|
||||
// foo_sb_ptr = Marshal.AllocHGlobal(sb.Capacity + 1); -- already emitted
|
||||
// glGetShaderInfoLog(..., foo_sb_ptr); -- already emitted
|
||||
// MarshalPtrToStringBuilder(foo_sb_ptr, foo);
|
||||
// }
|
||||
// finally {
|
||||
// Marshal.FreeHGlobal(foo_sb_ptr);
|
||||
// }
|
||||
|
||||
// Make sure we have imported BindingsBase::MasrhalPtrToStringBuilder and Marshal::FreeHGlobal
|
||||
var ptr_to_sb = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalPtrToStringBuilder"));
|
||||
var free_hglobal = wrapper.Module.Import(TypeMarshal.Methods.First(m => m.Name == "FreeHGlobal"));
|
||||
|
||||
var block = new ExceptionHandler(ExceptionHandlerType.Finally);
|
||||
block.TryStart = body.Instructions[0];
|
||||
|
||||
var variable_name = parameter.Name + " _sb_ptr";
|
||||
var v = body.Variables.First(m => m.Name == variable_name);
|
||||
il.Emit(OpCodes.Ldloc, v.Index);
|
||||
il.Emit(OpCodes.Ldarg, parameter.Index);
|
||||
il.Emit(OpCodes.Call, ptr_to_sb);
|
||||
|
||||
block.TryEnd = body.Instructions.Last();
|
||||
block.HandlerStart = body.Instructions.Last();
|
||||
|
||||
il.Emit(OpCodes.Ldloc, v.Index);
|
||||
il.Emit(OpCodes.Call, free_hglobal);
|
||||
|
||||
block.HandlerEnd = body.Instructions.Last();
|
||||
throw new ArgumentNullException(nameof(generatedPtrVar));
|
||||
}
|
||||
|
||||
// void GetShaderInfoLog(..., out String foo)
|
||||
// IntPtr foo_string_ptr;
|
||||
// try {
|
||||
// foo_string_ptr = Marshal.AllocHGlobal(count + 1);
|
||||
// glGetShaderInfoLog(..., foo_string_ptr);
|
||||
// foo = MarshalPtrToString(foo_string_ptr);
|
||||
// }
|
||||
// finally {
|
||||
// Marshal.FreeHGlobal(foo_string_ptr);
|
||||
// }
|
||||
|
||||
// Make sure we have imported BindingsBase::MasrhalPtrToString and Marshal::FreeHGlobal
|
||||
var ptr_to_str = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalPtrToString"));
|
||||
var free_hglobal = wrapper.Module.ImportReference(TypeMarshal.Methods.First(m => m.Name == "FreeHGlobal"));
|
||||
|
||||
var block = new ExceptionHandler(ExceptionHandlerType.Finally);
|
||||
block.TryStart = body.Instructions[0];
|
||||
|
||||
il.Emit(OpCodes.Ldarg, parameter.Index);
|
||||
il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index);
|
||||
il.Emit(OpCodes.Call, ptr_to_str);
|
||||
il.Emit(OpCodes.Stind_Ref);
|
||||
|
||||
block.TryEnd = body.Instructions.Last();
|
||||
block.HandlerStart = body.Instructions.Last();
|
||||
|
||||
il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index);
|
||||
il.Emit(OpCodes.Call, free_hglobal);
|
||||
|
||||
block.HandlerEnd = body.Instructions.Last();
|
||||
}
|
||||
|
||||
static void EmitStringParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
private static GeneratedVariableIdentifier EmitStringParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body,
|
||||
ILProcessor il)
|
||||
{
|
||||
var p = parameter.ParameterType;
|
||||
|
||||
// string marshaling:
|
||||
// IntPtr ptr = MarshalStringToPtr(str);
|
||||
// try { calli }
|
||||
// finally { Marshal.FreeHGlobal(ptr); }
|
||||
var marshal_str_to_ptr = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringToPtr"));
|
||||
var marshal_str_to_ptr = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringToPtr"));
|
||||
|
||||
// IntPtr ptr;
|
||||
var variable_name = parameter.Name + "_string_ptr";
|
||||
body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr));
|
||||
int index = body.Variables.Count - 1;
|
||||
var variableDefinition = new VariableDefinition(TypeIntPtr);
|
||||
body.Variables.Add(variableDefinition);
|
||||
int generatedPointerVarIndex = body.Variables.Count - 1;
|
||||
|
||||
GeneratedVariableIdentifier stringPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_string_ptr");
|
||||
|
||||
// ptr = Marshal.StringToHGlobalAnsi(str);
|
||||
il.Emit(OpCodes.Call, marshal_str_to_ptr);
|
||||
il.Emit(OpCodes.Stloc, index);
|
||||
il.Emit(OpCodes.Ldloc, index);
|
||||
il.Emit(OpCodes.Stloc, generatedPointerVarIndex);
|
||||
il.Emit(OpCodes.Ldloc, generatedPointerVarIndex);
|
||||
|
||||
// The finally block will be emitted in the function epilogue
|
||||
return stringPtrVar;
|
||||
}
|
||||
|
||||
static void EmitStringEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
private static void EmitStringEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body,
|
||||
ILProcessor il, GeneratedVariableIdentifier generatedPtrVar)
|
||||
{
|
||||
var p = parameter.ParameterType;
|
||||
var free = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringPtr"));
|
||||
var free = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringPtr"));
|
||||
|
||||
// FreeStringPtr(ptr)
|
||||
var variable_name = parameter.Name + "_string_ptr";
|
||||
var v = body.Variables.First(m => m.Name == variable_name);
|
||||
il.Emit(OpCodes.Ldloc, v.Index);
|
||||
il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index);
|
||||
il.Emit(OpCodes.Call, free);
|
||||
}
|
||||
|
||||
static void EmitStringArrayParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
private static GeneratedVariableIdentifier EmitStringArrayParameter(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body,
|
||||
ILProcessor il)
|
||||
{
|
||||
var p = parameter.ParameterType;
|
||||
|
||||
// string[] masrhaling:
|
||||
// IntPtr ptr = MarshalStringArrayToPtr(strings);
|
||||
// try { calli }
|
||||
// finally { FreeStringArrayPtr(ptr); }
|
||||
var marshal_str_array_to_ptr = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringArrayToPtr"));
|
||||
var marshal_str_array_to_ptr = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "MarshalStringArrayToPtr"));
|
||||
|
||||
// IntPtr ptr;
|
||||
var variable_name = parameter.Name + "_string_array_ptr";
|
||||
body.Variables.Add(new VariableDefinition(variable_name, TypeIntPtr));
|
||||
int index = body.Variables.Count - 1;
|
||||
var variableDefinition = new VariableDefinition(TypeIntPtr);
|
||||
body.Variables.Add(variableDefinition);
|
||||
int generatedPointerVarIndex = body.Variables.Count - 1;
|
||||
|
||||
GeneratedVariableIdentifier stringArrayPtrVar = new GeneratedVariableIdentifier(body, variableDefinition, parameter.Name + "_string_array_ptr");
|
||||
|
||||
// ptr = MarshalStringArrayToPtr(strings);
|
||||
il.Emit(OpCodes.Call, marshal_str_array_to_ptr);
|
||||
il.Emit(OpCodes.Stloc, index);
|
||||
il.Emit(OpCodes.Ldloc, index);
|
||||
il.Emit(OpCodes.Stloc, generatedPointerVarIndex);
|
||||
il.Emit(OpCodes.Ldloc, generatedPointerVarIndex);
|
||||
|
||||
// The finally block will be emitted in the function epilogue
|
||||
|
||||
return stringArrayPtrVar;
|
||||
}
|
||||
|
||||
static void EmitStringArrayEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body, ILProcessor il)
|
||||
private static void EmitStringArrayEpilogue(MethodDefinition wrapper, ParameterDefinition parameter, MethodBody body,
|
||||
ILProcessor il, GeneratedVariableIdentifier generatedPtrVar)
|
||||
{
|
||||
if (generatedPtrVar == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(generatedPtrVar));
|
||||
}
|
||||
|
||||
// Note: only works for string vectors (1d arrays).
|
||||
// We do not (and will probably never) support 2d or higher string arrays
|
||||
var p = parameter.ParameterType;
|
||||
var free = wrapper.Module.Import(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringArrayPtr"));
|
||||
var free = wrapper.Module.ImportReference(TypeBindingsBase.Methods.First(m => m.Name == "FreeStringArrayPtr"));
|
||||
|
||||
// FreeStringArrayPtr(string_array_ptr, string_array.Length)
|
||||
var variable_name = parameter.Name + "_string_array_ptr";
|
||||
var v = body.Variables.First(m => m.Name == variable_name);
|
||||
|
||||
// load string_array_ptr
|
||||
il.Emit(OpCodes.Ldloc, v.Index);
|
||||
il.Emit(OpCodes.Ldloc, generatedPtrVar.Definition.Index);
|
||||
|
||||
// load string_array.Length
|
||||
il.Emit(OpCodes.Ldarg, parameter.Index);
|
||||
|
@ -694,7 +777,7 @@ namespace OpenTK.Rewrite
|
|||
il.Emit(OpCodes.Call, free);
|
||||
}
|
||||
|
||||
static void EmitConvenienceWrapper(MethodDefinition wrapper,
|
||||
private static List<GeneratedVariableIdentifier> EmitConvenienceWrapper(MethodDefinition wrapper,
|
||||
MethodDefinition native, int difference, MethodBody body, ILProcessor il)
|
||||
{
|
||||
if (wrapper.Parameters.Count > 2)
|
||||
|
@ -703,6 +786,8 @@ namespace OpenTK.Rewrite
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
List<GeneratedVariableIdentifier> generatedVariables = new List<GeneratedVariableIdentifier>();
|
||||
if (wrapper.ReturnType.Name != "Void")
|
||||
{
|
||||
if (difference == 2)
|
||||
|
@ -729,7 +814,8 @@ namespace OpenTK.Rewrite
|
|||
// return result;
|
||||
// }
|
||||
body.Variables.Add(new VariableDefinition(wrapper.ReturnType));
|
||||
EmitParameters(wrapper, native, body, il);
|
||||
|
||||
generatedVariables = EmitParameters(wrapper, native, body, il);
|
||||
il.Emit(OpCodes.Ldloca, body.Variables.Count - 1);
|
||||
}
|
||||
else
|
||||
|
@ -755,15 +841,84 @@ namespace OpenTK.Rewrite
|
|||
Console.Error.WriteLine("Unknown wrapper type for ({0})", native.Name);
|
||||
}
|
||||
}
|
||||
|
||||
return generatedVariables;
|
||||
}
|
||||
|
||||
static int EmitParameters(MethodDefinition method, MethodDefinition native, MethodBody body, ILProcessor il)
|
||||
private static object GetAttributeField(CustomAttribute attribute, string name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < method.Parameters.Count; i++)
|
||||
try
|
||||
{
|
||||
var field = attribute.Fields.First(f => f.Name == name);
|
||||
return field.Argument.Value;
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static CountAttribute GetCountAttribute(ParameterDefinition parameter)
|
||||
{
|
||||
var attribute = parameter.CustomAttributes
|
||||
.FirstOrDefault(a => a.AttributeType.Name == "CountAttribute");
|
||||
|
||||
CountAttribute count = null;
|
||||
if (attribute != null)
|
||||
{
|
||||
count = new CountAttribute();
|
||||
count.Count = (int)(GetAttributeField(attribute, "Count") ?? 0);
|
||||
count.Parameter = (string)(GetAttributeField(attribute, "Parameter"));
|
||||
count.Computed = (string)(GetAttributeField(attribute, "Computed"));
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
|
||||
private static VariableDefinition EmitCountVariable(MethodDefinition method, MethodBody body, ILProcessor il, string countParameter)
|
||||
{
|
||||
var countVariable = new VariableDefinition(TypeInt32);
|
||||
body.Variables.Add(countVariable);
|
||||
|
||||
// Parameter will either by a simple name, a dereference of a name
|
||||
// like "*name" or an expression like "name*5"
|
||||
var parameter = method.Parameters.FirstOrDefault(
|
||||
param => param.Name == countParameter);
|
||||
if (parameter != null)
|
||||
{
|
||||
il.Emit(OpCodes.Ldarg, parameter.Index);
|
||||
il.Emit(OpCodes.Stloc, countVariable.Index);
|
||||
}
|
||||
else if (countParameter[0] == '*')
|
||||
{
|
||||
var pointerParam = method.Parameters.FirstOrDefault(
|
||||
param => param.Name == countParameter.Substring(1));
|
||||
|
||||
il.Emit(OpCodes.Ldarg, pointerParam.Index);
|
||||
il.Emit(OpCodes.Ldind_I4);
|
||||
}
|
||||
else
|
||||
{
|
||||
var operands = countParameter.Split('*');
|
||||
parameter = method.Parameters.FirstOrDefault(
|
||||
param => param.Name == operands[0]);
|
||||
var scale = int.Parse(operands[1]);
|
||||
|
||||
il.Emit(OpCodes.Ldarg, parameter.Index);
|
||||
il.Emit(OpCodes.Ldc_I4, scale);
|
||||
il.Emit(OpCodes.Mul);
|
||||
il.Emit(OpCodes.Stloc, countVariable.Index);
|
||||
}
|
||||
return countVariable;
|
||||
}
|
||||
|
||||
private static List<GeneratedVariableIdentifier> EmitParameters(MethodDefinition method, MethodDefinition native, MethodBody body, ILProcessor il)
|
||||
{
|
||||
List<GeneratedVariableIdentifier> generatedVariables = new List<GeneratedVariableIdentifier>();
|
||||
for (int i = 0; i < method.Parameters.Count; i++)
|
||||
{
|
||||
var parameter = method.Parameters[i];
|
||||
var p = method.Module.Import(method.Parameters[i].ParameterType);
|
||||
var p = method.Module.ImportReference(method.Parameters[i].ParameterType);
|
||||
il.Emit(OpCodes.Ldarg, i);
|
||||
|
||||
if (p.Name.Contains("Int32") && native.Parameters[i].ParameterType.Name.Contains("IntPtr"))
|
||||
|
@ -772,13 +927,13 @@ namespace OpenTK.Rewrite
|
|||
// We need to convert the loaded argument to IntPtr.
|
||||
il.Emit(OpCodes.Conv_I);
|
||||
}
|
||||
else if (p.Name == "StringBuilder")
|
||||
else if (p.Name == "String&" && !p.IsArray)
|
||||
{
|
||||
EmitStringBuilderParameter(method, parameter, body, il);
|
||||
generatedVariables.Add(EmitStringOutParameter(method, parameter, body, il));
|
||||
}
|
||||
else if (p.Name == "String" && !p.IsArray)
|
||||
{
|
||||
EmitStringParameter(method, parameter, body, il);
|
||||
generatedVariables.Add(EmitStringParameter(method, parameter, body, il));
|
||||
}
|
||||
else if (p.IsByReference)
|
||||
{
|
||||
|
@ -790,7 +945,7 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
else if (p.IsArray)
|
||||
{
|
||||
if (p.Name != method.Module.Import(typeof(string[])).Name)
|
||||
if (p.Name != "String[]")
|
||||
{
|
||||
// .Net treats 1d arrays differently than higher rank arrays.
|
||||
// 1d arrays are directly supported by instructions such as ldlen and ldelema.
|
||||
|
@ -834,7 +989,7 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
else
|
||||
{
|
||||
var get_length = method.Module.Import(
|
||||
var get_length = method.Module.ImportReference(
|
||||
mscorlib.MainModule.GetType("System.Array").Methods.First(m => m.Name == "get_Length"));
|
||||
il.Emit(OpCodes.Callvirt, get_length);
|
||||
}
|
||||
|
@ -880,21 +1035,22 @@ namespace OpenTK.Rewrite
|
|||
}
|
||||
else
|
||||
{
|
||||
EmitStringArrayParameter(method, parameter, body, il);
|
||||
generatedVariables.Add(EmitStringArrayParameter(method, parameter, body, il));
|
||||
}
|
||||
}
|
||||
}
|
||||
return i;
|
||||
|
||||
return generatedVariables;
|
||||
}
|
||||
|
||||
static void EmitEntryPoint(FieldDefinition entry_points, ILProcessor il, int slot)
|
||||
private static void EmitEntryPoint(FieldDefinition entry_points, ILProcessor il, int slot)
|
||||
{
|
||||
il.Emit(OpCodes.Ldsfld, entry_points);
|
||||
il.Emit(OpCodes.Ldc_I4, slot);
|
||||
il.Emit(OpCodes.Ldelem_I);
|
||||
}
|
||||
|
||||
static void EmitCalli(ILProcessor il, MethodReference reference)
|
||||
private static void EmitCalli(ILProcessor il, MethodReference reference)
|
||||
{
|
||||
var signature = new CallSite(reference.ReturnType)
|
||||
{
|
||||
|
@ -911,7 +1067,7 @@ namespace OpenTK.Rewrite
|
|||
il.Emit(OpCodes.Calli, signature);
|
||||
}
|
||||
|
||||
static void EmitCall(ILProcessor il, MethodReference reference)
|
||||
private static void EmitCall(ILProcessor il, MethodReference reference)
|
||||
{
|
||||
il.Emit(OpCodes.Call, reference);
|
||||
}
|
||||
|
|
|
@ -5,13 +5,18 @@ using System.Reflection;
|
|||
[assembly: AssemblyTitleAttribute("Generator.Rewrite")]
|
||||
[assembly: AssemblyProductAttribute("OpenTK")]
|
||||
[assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")]
|
||||
[assembly: AssemblyVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyVersionAttribute("3.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0")]
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.")]
|
||||
namespace System {
|
||||
internal static class AssemblyVersionInformation {
|
||||
internal const string Version = "2.0.0";
|
||||
internal const string InformationalVersion = "2.0.0";
|
||||
internal const System.String AssemblyTitle = "Generator.Rewrite";
|
||||
internal const System.String AssemblyProduct = "OpenTK";
|
||||
internal const System.String AssemblyDescription = "A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.";
|
||||
internal const System.String AssemblyVersion = "3.0.0";
|
||||
internal const System.String AssemblyFileVersion = "3.0.0";
|
||||
internal const System.Boolean CLSCompliant = true;
|
||||
internal const System.String AssemblyCopyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
Mono.Cecil
|
||||
Mono.Cecil
|
||||
StyleCop.Analyzers
|
||||
CommandLineParser
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -23,7 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
// Created by Erik Ylvisaker on 3/17/08.
|
||||
|
||||
|
@ -35,7 +33,7 @@ using System.Runtime.InteropServices;
|
|||
namespace OpenTK.Platform.MacOS
|
||||
{
|
||||
#pragma warning disable 0169
|
||||
|
||||
|
||||
/*
|
||||
** Macintosh device type.
|
||||
*/
|
||||
|
@ -56,18 +54,17 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
using GLenum = UInt32;
|
||||
|
||||
unsafe static partial class Agl
|
||||
internal unsafe static partial class Agl
|
||||
{
|
||||
|
||||
const string agl = "/System/Library/Frameworks/AGL.framework/Versions/Current/AGL";
|
||||
|
||||
private const string agl = "/System/Library/Frameworks/AGL.framework/Versions/Current/AGL";
|
||||
|
||||
/*
|
||||
** AGL API version.
|
||||
*/
|
||||
const int AGL_VERSION_2_0 = 1;
|
||||
|
||||
private const int AGL_VERSION_2_0 = 1;
|
||||
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
** Attribute names for aglChoosePixelFormat and aglDescribePixelFormat.
|
||||
*/
|
||||
|
@ -196,7 +193,7 @@ namespace OpenTK.Platform.MacOS
|
|||
AGL_SURFACE_BACKING_SIZE = 304, /* 2 params. Width/height of surface backing size */
|
||||
AGL_ENABLE_SURFACE_BACKING_SIZE = 305, /* Enable or disable surface backing size override */
|
||||
AGL_SURFACE_VOLATILE = 306, /* Flag surface to candidate for deletion */
|
||||
}
|
||||
}
|
||||
/*
|
||||
** Option names for aglConfigure.
|
||||
*/
|
||||
|
@ -278,7 +275,7 @@ namespace OpenTK.Platform.MacOS
|
|||
internal enum AglError
|
||||
{
|
||||
NoError = 0, /* no error */
|
||||
|
||||
|
||||
BadAttribute = 10000, /* invalid pixel format attribute */
|
||||
BadProperty = 10001, /* invalid renderer property */
|
||||
BadPixelFormat = 10002, /* invalid pixel format */
|
||||
|
@ -299,7 +296,7 @@ namespace OpenTK.Platform.MacOS
|
|||
BadConnection = 10017, /* invalid CoreGraphics connection */
|
||||
}
|
||||
/************************************************************************/
|
||||
|
||||
|
||||
/*
|
||||
** Pixel format functions
|
||||
*/
|
||||
|
@ -319,56 +316,62 @@ namespace OpenTK.Platform.MacOS
|
|||
[DllImport(agl)] internal static extern void aglDestroyPixelFormat(AGLPixelFormat pix);
|
||||
[DllImport(agl)] internal static extern AGLPixelFormat aglNextPixelFormat(AGLPixelFormat pix);
|
||||
[DllImport(agl)] internal static extern bool aglDescribePixelFormat(AGLPixelFormat pix, PixelFormatAttribute attrib, out int value);
|
||||
[Obsolete("Use aglDisplaysOfPixelFormat instead.")]
|
||||
[DllImport(agl)] static extern AGLDevice *aglDevicesOfPixelFormat(AGLPixelFormat pix, int *ndevs);
|
||||
|
||||
|
||||
/*
|
||||
** Renderer information functions
|
||||
*/
|
||||
[DllImport(agl)] static extern AGLRendererInfo aglQueryRendererInfo(AGLDevice[] gdevs, int ndev);
|
||||
[DllImport(agl)] static extern void aglDestroyRendererInfo(AGLRendererInfo rend);
|
||||
[DllImport(agl)] static extern AGLRendererInfo aglNextRendererInfo(AGLRendererInfo rend);
|
||||
[DllImport(agl)] static extern byte aglDescribeRenderer(AGLRendererInfo rend, int prop, out int value);
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern AGLRendererInfo aglQueryRendererInfo(AGLDevice[] gdevs, int ndev);
|
||||
[DllImport(agl)]
|
||||
private static extern void aglDestroyRendererInfo(AGLRendererInfo rend);
|
||||
[DllImport(agl)]
|
||||
private static extern AGLRendererInfo aglNextRendererInfo(AGLRendererInfo rend);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglDescribeRenderer(AGLRendererInfo rend, int prop, out int value);
|
||||
|
||||
/*
|
||||
** Context functions
|
||||
*/
|
||||
[DllImport(agl)] internal static extern AGLContext aglCreateContext(AGLPixelFormat pix, AGLContext share);
|
||||
[DllImport(agl,EntryPoint="aglDestroyContext")] static extern byte _aglDestroyContext(AGLContext ctx);
|
||||
[DllImport(agl,EntryPoint="aglDestroyContext")]
|
||||
private static extern byte _aglDestroyContext(AGLContext ctx);
|
||||
internal static bool aglDestroyContext(AGLContext context)
|
||||
{
|
||||
return (_aglDestroyContext(context) != 0) ? true : false;
|
||||
}
|
||||
|
||||
[DllImport(agl)] static extern byte aglCopyContext(AGLContext src, AGLContext dst, uint mask);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglCopyContext(AGLContext src, AGLContext dst, uint mask);
|
||||
[DllImport(agl)] internal static extern byte aglUpdateContext(AGLContext ctx);
|
||||
|
||||
/*
|
||||
** Current state functions
|
||||
*/
|
||||
#region --- aglSetCurrentContext ---
|
||||
|
||||
[DllImport(agl,EntryPoint="aglSetCurrentContext")] static extern byte _aglSetCurrentContext(AGLContext ctx);
|
||||
[DllImport(agl,EntryPoint="aglSetCurrentContext")]
|
||||
private static extern byte _aglSetCurrentContext(AGLContext ctx);
|
||||
internal static bool aglSetCurrentContext(IntPtr context)
|
||||
{
|
||||
byte retval = _aglSetCurrentContext(context);
|
||||
|
||||
if (retval != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport(agl)] internal static extern AGLContext aglGetCurrentContext();
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** Drawable Functions
|
||||
*/
|
||||
[DllImport(agl,EntryPoint="aglSetDrawable")]
|
||||
static extern byte _aglSetDrawable(AGLContext ctx, AGLDrawable draw);
|
||||
[DllImport(agl,EntryPoint="aglSetDrawable")]
|
||||
private static extern byte _aglSetDrawable(AGLContext ctx, AGLDrawable draw);
|
||||
|
||||
internal static void aglSetDrawable(AGLContext ctx, AGLDrawable draw)
|
||||
{
|
||||
|
@ -380,11 +383,13 @@ namespace OpenTK.Platform.MacOS
|
|||
throw new Exception(ErrorString(err));
|
||||
}
|
||||
}
|
||||
[DllImport(agl)] static extern byte aglSetOffScreen(AGLContext ctx, int width, int height, int rowbytes, IntPtr baseaddr);
|
||||
[DllImport(agl)] static extern AGLDrawable aglGetDrawable(AGLContext ctx);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglSetOffScreen(AGLContext ctx, int width, int height, int rowbytes, IntPtr baseaddr);
|
||||
[DllImport(agl)]
|
||||
private static extern AGLDrawable aglGetDrawable(AGLContext ctx);
|
||||
|
||||
[DllImport(agl, EntryPoint = "aglSetFullScreen")]
|
||||
static extern byte _aglSetFullScreen(AGLContext ctx, int width, int height, int freq, int device);
|
||||
private static extern byte _aglSetFullScreen(AGLContext ctx, int width, int height, int freq, int device);
|
||||
internal static void aglSetFullScreen(AGLContext ctx, int width, int height, int freq, int device)
|
||||
{
|
||||
byte retval = _aglSetFullScreen(ctx, width, height, freq, device);
|
||||
|
@ -403,24 +408,28 @@ namespace OpenTK.Platform.MacOS
|
|||
/*
|
||||
** Virtual screen functions
|
||||
*/
|
||||
[DllImport(agl)] static extern byte aglSetVirtualScreen(AGLContext ctx, int screen);
|
||||
[DllImport(agl)] static extern int aglGetVirtualScreen(AGLContext ctx);
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglSetVirtualScreen(AGLContext ctx, int screen);
|
||||
[DllImport(agl)]
|
||||
private static extern int aglGetVirtualScreen(AGLContext ctx);
|
||||
|
||||
/*
|
||||
** Obtain version numbers
|
||||
*/
|
||||
[DllImport(agl)] static extern void aglGetVersion(int *major, int *minor);
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern void aglGetVersion(int *major, int *minor);
|
||||
|
||||
/*
|
||||
** Global library options
|
||||
*/
|
||||
[DllImport(agl)] static extern byte aglConfigure(GLenum pname, uint param);
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglConfigure(GLenum pname, uint param);
|
||||
|
||||
/*
|
||||
** Swap functions
|
||||
*/
|
||||
[DllImport(agl)] internal static extern void aglSwapBuffers(AGLContext ctx);
|
||||
|
||||
|
||||
/*
|
||||
** Per context options
|
||||
*/
|
||||
|
@ -429,7 +438,7 @@ namespace OpenTK.Platform.MacOS
|
|||
[DllImport(agl)]
|
||||
internal static extern bool aglDisable(AGLContext ctx, ParameterNames pname);
|
||||
[DllImport(agl)]
|
||||
static extern bool aglIsEnabled(AGLContext ctx, GLenum pname);
|
||||
private static extern bool aglIsEnabled(AGLContext ctx, GLenum pname);
|
||||
[DllImport(agl)]
|
||||
internal static extern bool aglSetInteger(AGLContext ctx, ParameterNames pname, ref int param);
|
||||
[DllImport(agl)]
|
||||
|
@ -443,47 +452,59 @@ namespace OpenTK.Platform.MacOS
|
|||
** Font function
|
||||
*/
|
||||
// TODO: face parameter should be of type StyleParameter in QuickDraw.
|
||||
[DllImport(agl)] static extern byte aglUseFont(AGLContext ctx, int fontID, int face, int size, int first, int count, int @base);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglUseFont(AGLContext ctx, int fontID, int face, int size, int first, int count, int @base);
|
||||
|
||||
/*
|
||||
** Error functions
|
||||
*/
|
||||
[DllImport(agl,EntryPoint="aglGetError")] internal static extern AglError GetError();
|
||||
[DllImport(agl,EntryPoint="aglErrorString")] static extern IntPtr _aglErrorString(AglError code);
|
||||
[DllImport(agl,EntryPoint="aglErrorString")]
|
||||
private static extern IntPtr _aglErrorString(AglError code);
|
||||
internal static string ErrorString(AglError code)
|
||||
{
|
||||
return Marshal.PtrToStringAnsi(_aglErrorString(code));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Soft reset function
|
||||
*/
|
||||
[DllImport(agl)] static extern void aglResetLibrary();
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern void aglResetLibrary();
|
||||
|
||||
/*
|
||||
** Surface texture function
|
||||
*/
|
||||
[DllImport(agl)] static extern void aglSurfaceTexture (AGLContext context, GLenum target, GLenum internalformat, AGLContext surfacecontext) ;
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern void aglSurfaceTexture (AGLContext context, GLenum target, GLenum internalformat, AGLContext surfacecontext) ;
|
||||
|
||||
/*
|
||||
** PBuffer functions
|
||||
*/
|
||||
[DllImport(agl)] static extern byte aglCreatePBuffer (int width, int height, GLenum target, GLenum internalFormat, long max_level, AGLPbuffer *pbuffer);
|
||||
[DllImport(agl)] static extern byte aglDestroyPBuffer (AGLPbuffer pbuffer);
|
||||
[DllImport(agl)] static extern byte aglDescribePBuffer (AGLPbuffer pbuffer, int *width, int *height, GLenum *target, GLenum *internalFormat, int *max_level);
|
||||
[DllImport(agl)] static extern byte aglTexImagePBuffer (AGLContext ctx, AGLPbuffer pbuffer, int source);
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglCreatePBuffer (int width, int height, GLenum target, GLenum internalFormat, long max_level, AGLPbuffer *pbuffer);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglDestroyPBuffer (AGLPbuffer pbuffer);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglDescribePBuffer (AGLPbuffer pbuffer, int *width, int *height, GLenum *target, GLenum *internalFormat, int *max_level);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglTexImagePBuffer (AGLContext ctx, AGLPbuffer pbuffer, int source);
|
||||
|
||||
/*
|
||||
** Pbuffer Drawable Functions
|
||||
*/
|
||||
[DllImport(agl)] static extern byte aglSetPBuffer (AGLContext ctx, AGLPbuffer pbuffer, int face, int level, int screen) ;
|
||||
[DllImport(agl)] static extern byte aglGetPBuffer (AGLContext ctx, AGLPbuffer *pbuffer, int *face, int *level, int *screen) ;
|
||||
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglSetPBuffer (AGLContext ctx, AGLPbuffer pbuffer, int face, int level, int screen) ;
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglGetPBuffer (AGLContext ctx, AGLPbuffer *pbuffer, int *face, int *level, int *screen) ;
|
||||
|
||||
/*
|
||||
** CGL functions
|
||||
*/
|
||||
[DllImport(agl)] static extern byte aglGetCGLContext(AGLContext ctx, void **cgl_ctx) ;
|
||||
[DllImport(agl)] static extern byte aglGetCGLPixelFormat(AGLPixelFormat pix, void **cgl_pix);
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglGetCGLContext(AGLContext ctx, void **cgl_ctx) ;
|
||||
[DllImport(agl)]
|
||||
private static extern byte aglGetCGLPixelFormat(AGLPixelFormat pix, void **cgl_pix);
|
||||
|
||||
#pragma warning restore 0169
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,14 +22,12 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
// Created by Erik Ylvisaker on 3/17/08.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace OpenTK.Platform.MacOS
|
||||
{
|
||||
|
@ -45,17 +42,13 @@ namespace OpenTK.Platform.MacOS
|
|||
/// <summary>
|
||||
/// AGL context implementation for WinForms compatibility.
|
||||
/// </summary>
|
||||
class AglContext : IGraphicsContext, IGraphicsContextInternal
|
||||
internal class AglContext : IGraphicsContext, IGraphicsContextInternal
|
||||
{
|
||||
ContextHandle Handle;
|
||||
GraphicsMode mode;
|
||||
IWindowInfo carbonWindow;
|
||||
IGraphicsContext dummyContext; // for extension loading
|
||||
bool disposed;
|
||||
bool error_checking;
|
||||
private IWindowInfo carbonWindow;
|
||||
private IGraphicsContext dummyContext; // for extension loading
|
||||
|
||||
readonly GetInt XOffset;
|
||||
readonly GetInt YOffset;
|
||||
private readonly GetInt XOffset;
|
||||
private readonly GetInt YOffset;
|
||||
|
||||
public AglContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext,
|
||||
GetInt xoffset, GetInt yoffset)
|
||||
|
@ -71,7 +64,7 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
if (shareContext is AglContext)
|
||||
{
|
||||
shareContextRef = ((AglContext)shareContext).Handle.Handle;
|
||||
shareContextRef = ((AglContext)shareContext).Context.Handle;
|
||||
}
|
||||
else if (shareContext is GraphicsContext)
|
||||
{
|
||||
|
@ -102,7 +95,7 @@ namespace OpenTK.Platform.MacOS
|
|||
aglAttributes.Add(value);
|
||||
}
|
||||
|
||||
void CreateContext(GraphicsMode mode, IWindowInfo carbonWindow, IntPtr shareContextRef, bool fullscreen)
|
||||
private void CreateContext(GraphicsMode mode, IWindowInfo carbonWindow, IntPtr shareContextRef, bool fullscreen)
|
||||
{
|
||||
Debug.Print("AGL pixel format attributes:");
|
||||
|
||||
|
@ -118,7 +111,7 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
Debug.Print("Creating AGL context. Sharing with {0}", shareContextRef);
|
||||
// create the context and share it with the share reference.
|
||||
Handle = new ContextHandle(Agl.aglCreateContext(pixelformat, shareContextRef));
|
||||
Context = new ContextHandle(Agl.aglCreateContext(pixelformat, shareContextRef));
|
||||
MyAGLReportError("aglCreateContext");
|
||||
|
||||
// Free the pixel format from memory.
|
||||
|
@ -130,9 +123,9 @@ namespace OpenTK.Platform.MacOS
|
|||
Update(carbonWindow);
|
||||
|
||||
MakeCurrent(carbonWindow);
|
||||
Debug.Print("context: {0}", Handle.Handle);
|
||||
Debug.Print("context: {0}", Context.Handle);
|
||||
|
||||
dummyContext = new GraphicsContext(Handle,
|
||||
dummyContext = new GraphicsContext(Context,
|
||||
GetAddress,
|
||||
delegate()
|
||||
{
|
||||
|
@ -140,7 +133,7 @@ namespace OpenTK.Platform.MacOS
|
|||
});
|
||||
}
|
||||
|
||||
void SetBufferRect(IWindowInfo carbonWindow)
|
||||
private void SetBufferRect(IWindowInfo carbonWindow)
|
||||
{
|
||||
Rect rect = API.GetControlBounds(carbonWindow.Handle);
|
||||
|
||||
|
@ -149,28 +142,36 @@ namespace OpenTK.Platform.MacOS
|
|||
int[] glrect = new int[4];
|
||||
|
||||
if (XOffset != null)
|
||||
{
|
||||
glrect[0] = rect.X + XOffset();
|
||||
}
|
||||
else
|
||||
{
|
||||
glrect[0] = rect.X;
|
||||
}
|
||||
if (YOffset != null)
|
||||
{
|
||||
glrect[1] = rect.Y + YOffset();
|
||||
}
|
||||
else
|
||||
{
|
||||
glrect[1] = rect.Y;
|
||||
}
|
||||
glrect[2] = rect.Width;
|
||||
glrect[3] = rect.Height;
|
||||
|
||||
Agl.aglSetInteger(Handle.Handle, Agl.ParameterNames.AGL_BUFFER_RECT, glrect);
|
||||
Agl.aglSetInteger(Context.Handle, Agl.ParameterNames.AGL_BUFFER_RECT, glrect);
|
||||
MyAGLReportError("aglSetInteger");
|
||||
|
||||
Agl.aglEnable(Handle.Handle, Agl.ParameterNames.AGL_BUFFER_RECT);
|
||||
Agl.aglEnable(Context.Handle, Agl.ParameterNames.AGL_BUFFER_RECT);
|
||||
MyAGLReportError("aglEnable");
|
||||
}
|
||||
|
||||
void SetDrawable(IWindowInfo carbonWindow)
|
||||
private void SetDrawable(IWindowInfo carbonWindow)
|
||||
{
|
||||
IntPtr windowPort = GetWindowPortForWindowInfo(carbonWindow);
|
||||
//Debug.Print("Setting drawable for context {0} to window port: {1}", Handle.Handle, windowPort);
|
||||
Agl.aglSetDrawable(Handle.Handle, windowPort);
|
||||
Agl.aglSetDrawable(Context.Handle, windowPort);
|
||||
MyAGLReportError("aglSetDrawable");
|
||||
}
|
||||
|
||||
|
@ -188,22 +189,22 @@ namespace OpenTK.Platform.MacOS
|
|||
SetDrawable(window);
|
||||
SetBufferRect(window);
|
||||
|
||||
Agl.aglUpdateContext(Handle.Handle);
|
||||
Agl.aglUpdateContext(Context.Handle);
|
||||
}
|
||||
|
||||
void MyAGLReportError(string function)
|
||||
private void MyAGLReportError(string function)
|
||||
{
|
||||
Agl.AglError err = Agl.GetError();
|
||||
|
||||
if (err != Agl.AglError.NoError)
|
||||
{
|
||||
throw new Exception(String.Format(
|
||||
"AGL Error from function {0}: {1} {2}",
|
||||
function, err, Agl.ErrorString(err)));
|
||||
}
|
||||
}
|
||||
|
||||
#region IGraphicsContext Members
|
||||
|
||||
bool firstSwap = true;
|
||||
private bool firstSwap = true;
|
||||
public void SwapBuffers()
|
||||
{
|
||||
// this is part of the hack to avoid dropping the first frame when
|
||||
|
@ -216,19 +217,21 @@ namespace OpenTK.Platform.MacOS
|
|||
Update(carbonWindow);
|
||||
}
|
||||
|
||||
Agl.aglSwapBuffers(Handle.Handle);
|
||||
Agl.aglSwapBuffers(Context.Handle);
|
||||
MyAGLReportError("aglSwapBuffers");
|
||||
}
|
||||
|
||||
public void MakeCurrent(IWindowInfo window)
|
||||
{
|
||||
if (Agl.aglSetCurrentContext(Handle.Handle) == false)
|
||||
if (Agl.aglSetCurrentContext(Context.Handle) == false)
|
||||
{
|
||||
MyAGLReportError("aglSetCurrentContext");
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsCurrent
|
||||
{
|
||||
get { return (Handle.Handle == Agl.aglGetCurrentContext()); }
|
||||
get { return (Context.Handle == Agl.aglGetCurrentContext()); }
|
||||
}
|
||||
|
||||
public int SwapInterval
|
||||
|
@ -236,7 +239,7 @@ namespace OpenTK.Platform.MacOS
|
|||
get
|
||||
{
|
||||
int swap_interval = 0;
|
||||
if (Agl.aglGetInteger(Handle.Handle, Agl.ParameterNames.AGL_SWAP_INTERVAL, out swap_interval))
|
||||
if (Agl.aglGetInteger(Context.Handle, Agl.ParameterNames.AGL_SWAP_INTERVAL, out swap_interval))
|
||||
{
|
||||
return swap_interval;
|
||||
}
|
||||
|
@ -248,36 +251,21 @@ namespace OpenTK.Platform.MacOS
|
|||
}
|
||||
set
|
||||
{
|
||||
if (!Agl.aglSetInteger(Handle.Handle, Agl.ParameterNames.AGL_SWAP_INTERVAL, ref value))
|
||||
if (!Agl.aglSetInteger(Context.Handle, Agl.ParameterNames.AGL_SWAP_INTERVAL, ref value))
|
||||
{
|
||||
MyAGLReportError("aglSetInteger");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GraphicsMode Mode
|
||||
{
|
||||
get
|
||||
{
|
||||
return mode;
|
||||
}
|
||||
set
|
||||
{
|
||||
mode = value;
|
||||
}
|
||||
|
||||
}
|
||||
public GraphicsMode Mode { get; set; }
|
||||
|
||||
public void LoadAll()
|
||||
{
|
||||
dummyContext.LoadAll();
|
||||
}
|
||||
|
||||
public bool IsDisposed
|
||||
{
|
||||
get
|
||||
{
|
||||
return disposed;
|
||||
}
|
||||
}
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
public bool VSync
|
||||
{
|
||||
|
@ -295,25 +283,11 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
get
|
||||
{
|
||||
return mode;
|
||||
return Mode;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ErrorChecking
|
||||
{
|
||||
get
|
||||
{
|
||||
return error_checking;
|
||||
}
|
||||
set
|
||||
{
|
||||
error_checking = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
public bool ErrorChecking { get; set; }
|
||||
|
||||
~AglContext()
|
||||
{
|
||||
|
@ -325,10 +299,12 @@ namespace OpenTK.Platform.MacOS
|
|||
Dispose(true);
|
||||
}
|
||||
|
||||
void Dispose(bool disposing)
|
||||
private void Dispose(bool disposing)
|
||||
{
|
||||
if (IsDisposed || Handle.Handle == IntPtr.Zero)
|
||||
if (IsDisposed || Context.Handle == IntPtr.Zero)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Print("Disposing of AGL context.");
|
||||
Agl.aglSetCurrentContext(IntPtr.Zero);
|
||||
|
@ -343,10 +319,10 @@ namespace OpenTK.Platform.MacOS
|
|||
// Actually, it seems to crash the mono runtime. -AMK 2013
|
||||
|
||||
Debug.Print("Destroying context");
|
||||
if (Agl.aglDestroyContext(Handle.Handle) == true)
|
||||
if (Agl.aglDestroyContext(Context.Handle) == true)
|
||||
{
|
||||
Debug.Print("Context destruction completed successfully.");
|
||||
Handle = ContextHandle.Zero;
|
||||
Context = ContextHandle.Zero;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -360,13 +336,9 @@ namespace OpenTK.Platform.MacOS
|
|||
throw new Exception(Agl.ErrorString(Agl.GetError()));
|
||||
}
|
||||
|
||||
disposed = true;
|
||||
IsDisposed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGraphicsContextInternal Members
|
||||
|
||||
public IntPtr GetAddress(string function)
|
||||
{
|
||||
return NS.GetAddress(function);
|
||||
|
@ -385,14 +357,6 @@ namespace OpenTK.Platform.MacOS
|
|||
}
|
||||
}
|
||||
|
||||
public ContextHandle Context
|
||||
{
|
||||
get
|
||||
{
|
||||
return Handle;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public ContextHandle Context { get; private set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,17 +22,15 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace OpenTK.Platform.MacOS
|
||||
{
|
||||
class AglGraphicsMode
|
||||
internal class AglGraphicsMode
|
||||
{
|
||||
public GraphicsMode SelectGraphicsMode(ColorFormat color, int depth, int stencil,
|
||||
int samples, ColorFormat accum, int buffers, bool stereo, out IntPtr pixelformat)
|
||||
|
@ -58,9 +55,7 @@ namespace OpenTK.Platform.MacOS
|
|||
return GetGraphicsModeFromPixelFormat(pixelformat);
|
||||
}
|
||||
|
||||
#region Internal Members
|
||||
|
||||
static bool RelaxGraphicsMode(ref ColorFormat color, ref int depth, ref int stencil, ref int samples, ref ColorFormat accum, ref int buffers, ref bool stereo)
|
||||
private static bool RelaxGraphicsMode(ref ColorFormat color, ref int depth, ref int stencil, ref int samples, ref ColorFormat accum, ref int buffers, ref bool stereo)
|
||||
{
|
||||
// Parameters are relaxed in order of importance.
|
||||
// - Accumulator buffers are way outdated as a concept,
|
||||
|
@ -128,7 +123,7 @@ namespace OpenTK.Platform.MacOS
|
|||
return false;
|
||||
}
|
||||
|
||||
GraphicsMode GetGraphicsModeFromPixelFormat(IntPtr pixelformat)
|
||||
private GraphicsMode GetGraphicsModeFromPixelFormat(IntPtr pixelformat)
|
||||
{
|
||||
int r, g, b, a;
|
||||
Agl.aglDescribePixelFormat(pixelformat, Agl.PixelFormatAttribute.AGL_RED_SIZE, out r);
|
||||
|
@ -151,13 +146,13 @@ namespace OpenTK.Platform.MacOS
|
|||
depth, stencil, samples, new ColorFormat(ar, ag, ab, aa), buffers + 1, stereo != 0);
|
||||
}
|
||||
|
||||
IntPtr SelectPixelFormat(ColorFormat color, int depth, int stencil, int samples,
|
||||
private IntPtr SelectPixelFormat(ColorFormat color, int depth, int stencil, int samples,
|
||||
ColorFormat accum, int buffers, bool stereo)
|
||||
{
|
||||
List<int> attribs = new List<int>();
|
||||
|
||||
Debug.Print("Bits per pixel: {0}", color.BitsPerPixel);
|
||||
|
||||
|
||||
if (color.BitsPerPixel > 0)
|
||||
{
|
||||
if (!color.IsIndexed)
|
||||
|
@ -224,7 +219,5 @@ namespace OpenTK.Platform.MacOS
|
|||
IntPtr pixelformat = Agl.aglChoosePixelFormat(IntPtr.Zero, 0, attribs.ToArray());
|
||||
return pixelformat;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,10 +68,10 @@ namespace OpenTK.Platform.MacOS.Carbon
|
|||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct Rect
|
||||
{
|
||||
short top;
|
||||
short left;
|
||||
short bottom;
|
||||
short right;
|
||||
private short top;
|
||||
private short left;
|
||||
private short bottom;
|
||||
private short right;
|
||||
|
||||
internal Rect(int left, int top, int width, int height)
|
||||
: this((short)left, (short)top, (short)width, (short)height)
|
||||
|
@ -132,16 +132,16 @@ namespace OpenTK.Platform.MacOS.Carbon
|
|||
}
|
||||
}
|
||||
|
||||
class API
|
||||
internal class API
|
||||
{
|
||||
const string carbon = "/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon";
|
||||
private const string carbon = "/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon";
|
||||
|
||||
[DllImport(carbon)]
|
||||
internal unsafe static extern OSStatus DMGetGDeviceByDisplayID(
|
||||
IntPtr displayID, out IntPtr displayDevice, Boolean failToMain);
|
||||
|
||||
[DllImport(carbon)]
|
||||
static extern IntPtr GetControlBounds(IntPtr control, out Rect bounds);
|
||||
private static extern IntPtr GetControlBounds(IntPtr control, out Rect bounds);
|
||||
|
||||
internal static Rect GetControlBounds(IntPtr control)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,11 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using OpenTK.Graphics;
|
||||
|
@ -36,18 +31,17 @@ using OpenTK.Platform.MacOS;
|
|||
|
||||
namespace OpenTK
|
||||
{
|
||||
class CarbonGLControl : IGLControl
|
||||
internal class CarbonGLControl : IGLControl
|
||||
{
|
||||
GraphicsMode mode;
|
||||
Control control;
|
||||
IWindowInfo window_info;
|
||||
private GraphicsMode mode;
|
||||
private Control control;
|
||||
|
||||
internal CarbonGLControl(GraphicsMode mode, Control owner)
|
||||
{
|
||||
this.mode = mode;
|
||||
this.control = owner;
|
||||
|
||||
window_info = Utilities.CreateMacOSCarbonWindowInfo(control.Handle, false, true);
|
||||
WindowInfo = Utilities.CreateMacOSCarbonWindowInfo(control.Handle, false, true);
|
||||
}
|
||||
|
||||
private int GetXOffset()
|
||||
|
@ -57,7 +51,7 @@ namespace OpenTK
|
|||
|
||||
private int GetYOffset()
|
||||
{
|
||||
if (control.TopLevelControl != null)
|
||||
if (control.TopLevelControl != null)
|
||||
{
|
||||
System.Drawing.Point offset = control.PointToScreen (control.Location);
|
||||
System.Drawing.Point windowOffset = control.TopLevelControl.PointToScreen (System.Drawing.Point.Empty);
|
||||
|
@ -67,8 +61,6 @@ namespace OpenTK
|
|||
return control.Location.Y;
|
||||
}
|
||||
|
||||
#region IGLControl Members
|
||||
|
||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
// AGL does not support OpenGL profiles
|
||||
|
@ -76,24 +68,16 @@ namespace OpenTK
|
|||
}
|
||||
|
||||
// TODO: Fix this
|
||||
bool lastIsIdle = false;
|
||||
private bool lastIsIdle = false;
|
||||
public bool IsIdle
|
||||
{
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
lastIsIdle = !lastIsIdle;
|
||||
return lastIsIdle;
|
||||
}
|
||||
}
|
||||
|
||||
public IWindowInfo WindowInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return window_info;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public IWindowInfo WindowInfo { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,7 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenTK.Graphics;
|
||||
|
@ -31,10 +29,8 @@ using OpenTK.Platform;
|
|||
|
||||
namespace OpenTK
|
||||
{
|
||||
class DummyGLControl : IGLControl
|
||||
internal class DummyGLControl : IGLControl
|
||||
{
|
||||
#region IGLControl Members
|
||||
|
||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
return new DummyContext();
|
||||
|
@ -50,22 +46,11 @@ namespace OpenTK
|
|||
get { return Utilities.CreateDummyWindowInfo(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region class DummyContext
|
||||
|
||||
class DummyContext : IGraphicsContext, IGraphicsContextInternal
|
||||
private class DummyContext : IGraphicsContext, IGraphicsContextInternal
|
||||
{
|
||||
static int instance_count;
|
||||
private static int instance_count;
|
||||
|
||||
readonly ContextHandle handle = new ContextHandle(new IntPtr(
|
||||
System.Threading.Interlocked.Increment(ref instance_count)));
|
||||
|
||||
IWindowInfo current_window;
|
||||
bool is_disposed;
|
||||
int swap_interval;
|
||||
|
||||
#region IGraphicsContext Members
|
||||
private IWindowInfo current_window;
|
||||
|
||||
public void SwapBuffers()
|
||||
{
|
||||
|
@ -81,10 +66,7 @@ namespace OpenTK
|
|||
get { return current_window != null; }
|
||||
}
|
||||
|
||||
public bool IsDisposed
|
||||
{
|
||||
get { return is_disposed; }
|
||||
}
|
||||
public bool IsDisposed { get; private set; }
|
||||
|
||||
public bool VSync
|
||||
{
|
||||
|
@ -98,17 +80,7 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
public int SwapInterval
|
||||
{
|
||||
get
|
||||
{
|
||||
return swap_interval;
|
||||
}
|
||||
set
|
||||
{
|
||||
swap_interval = value;
|
||||
}
|
||||
}
|
||||
public int SwapInterval { get; set; }
|
||||
|
||||
public void Update(IWindowInfo window)
|
||||
{
|
||||
|
@ -136,17 +108,11 @@ namespace OpenTK
|
|||
|
||||
public void Dispose()
|
||||
{
|
||||
is_disposed = true;
|
||||
IsDisposed = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGraphicsContextInternal
|
||||
|
||||
public ContextHandle Context
|
||||
{
|
||||
get { return handle; }
|
||||
}
|
||||
public ContextHandle Context { get; } = new ContextHandle(new IntPtr(
|
||||
System.Threading.Interlocked.Increment(ref instance_count)));
|
||||
|
||||
public IntPtr GetAddress(IntPtr function)
|
||||
{
|
||||
|
@ -162,10 +128,6 @@ namespace OpenTK
|
|||
{
|
||||
get { return this; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
16
src/OpenTK.GLControl/GLControl.Designer.cs
generated
16
src/OpenTK.GLControl/GLControl.Designer.cs
generated
|
@ -2,12 +2,12 @@
|
|||
{
|
||||
partial class GLControl
|
||||
{
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
|
@ -20,18 +20,16 @@
|
|||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
//
|
||||
// NewGLControl
|
||||
//
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Black;
|
||||
|
@ -39,7 +37,5 @@
|
|||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,20 +22,14 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using OpenTK.Platform;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
|
@ -48,23 +41,22 @@ namespace OpenTK
|
|||
/// </summary>
|
||||
public partial class GLControl : UserControl
|
||||
{
|
||||
IGraphicsContext context;
|
||||
IGLControl implementation;
|
||||
GraphicsMode format;
|
||||
int major, minor;
|
||||
GraphicsContextFlags flags;
|
||||
bool? initial_vsync_value;
|
||||
private IGraphicsContext context;
|
||||
private IGLControl implementation;
|
||||
private GraphicsMode format;
|
||||
private int major, minor;
|
||||
private GraphicsContextFlags flags;
|
||||
|
||||
private bool? initial_vsync_value;
|
||||
// Indicates that OnResize was called before OnHandleCreated.
|
||||
// To avoid issues with missing OpenGL contexts, we suppress
|
||||
// the premature Resize event and raise it as soon as the handle
|
||||
// is ready.
|
||||
bool resize_event_suppressed;
|
||||
private bool resize_event_suppressed;
|
||||
// Indicates whether the control is in design mode. Due to issues
|
||||
// wiith the DesignMode property and nested controls,we need to
|
||||
// evaluate this in the constructor.
|
||||
readonly bool design_mode;
|
||||
|
||||
#region --- Constructors ---
|
||||
private readonly bool design_mode;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new instance.
|
||||
|
@ -91,7 +83,9 @@ namespace OpenTK
|
|||
public GLControl(GraphicsMode mode, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
if (mode == null)
|
||||
{
|
||||
throw new ArgumentNullException("mode");
|
||||
}
|
||||
|
||||
// SDL does not currently support embedding
|
||||
// on external windows. If Open.Toolkit is not yet
|
||||
|
@ -104,7 +98,7 @@ namespace OpenTK
|
|||
{
|
||||
Backend = PlatformBackend.PreferNative
|
||||
});
|
||||
|
||||
|
||||
SetStyle(ControlStyles.Opaque, true);
|
||||
SetStyle(ControlStyles.UserPaint, true);
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
|
||||
|
@ -125,11 +119,7 @@ namespace OpenTK
|
|||
InitializeComponent();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Private Methods ---
|
||||
|
||||
IGLControl Implementation
|
||||
private IGLControl Implementation
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -140,7 +130,7 @@ namespace OpenTK
|
|||
}
|
||||
|
||||
[Conditional("DEBUG")]
|
||||
void ValidateContext(string message)
|
||||
private void ValidateContext(string message)
|
||||
{
|
||||
if (!Context.IsCurrent)
|
||||
{
|
||||
|
@ -148,22 +138,24 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
void ValidateState()
|
||||
private void ValidateState()
|
||||
{
|
||||
if (IsDisposed)
|
||||
{
|
||||
throw new ObjectDisposedException(GetType().Name);
|
||||
}
|
||||
|
||||
if (!IsHandleCreated)
|
||||
{
|
||||
CreateControl();
|
||||
}
|
||||
|
||||
if (implementation == null || context == null || context.IsDisposed)
|
||||
{
|
||||
RecreateHandle();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Protected Methods ---
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <c>CreateParams</c> instance for this <c>GLControl</c>
|
||||
/// </summary>
|
||||
|
@ -190,21 +182,31 @@ namespace OpenTK
|
|||
protected override void OnHandleCreated(EventArgs e)
|
||||
{
|
||||
if (context != null)
|
||||
{
|
||||
context.Dispose();
|
||||
}
|
||||
|
||||
if (implementation != null)
|
||||
{
|
||||
implementation.WindowInfo.Dispose();
|
||||
}
|
||||
|
||||
if (design_mode)
|
||||
{
|
||||
implementation = new DummyGLControl();
|
||||
}
|
||||
else
|
||||
{
|
||||
implementation = new GLControlFactory().CreateGLControl(format, this);
|
||||
}
|
||||
|
||||
context = implementation.CreateContext(major, minor, flags);
|
||||
MakeCurrent();
|
||||
|
||||
if (!design_mode)
|
||||
{
|
||||
((IGraphicsContextInternal)Context).LoadAll();
|
||||
}
|
||||
|
||||
// Deferred setting of vsync mode. See VSync property for more information.
|
||||
if (initial_vsync_value.HasValue)
|
||||
|
@ -253,7 +255,9 @@ namespace OpenTK
|
|||
ValidateState();
|
||||
|
||||
if (design_mode)
|
||||
{
|
||||
e.Graphics.Clear(BackColor);
|
||||
}
|
||||
|
||||
base.OnPaint(e);
|
||||
}
|
||||
|
@ -273,13 +277,15 @@ namespace OpenTK
|
|||
return;
|
||||
}
|
||||
|
||||
if (Configuration.RunningOnMacOS)
|
||||
if (Configuration.RunningOnMacOS)
|
||||
{
|
||||
DelayUpdate delay = PerformContextUpdate;
|
||||
BeginInvoke(delay); //Need the native window to resize first otherwise our control will be in the wrong place.
|
||||
}
|
||||
else if (context != null)
|
||||
{
|
||||
context.Update (Implementation.WindowInfo);
|
||||
}
|
||||
|
||||
base.OnResize(e);
|
||||
}
|
||||
|
@ -294,7 +300,9 @@ namespace OpenTK
|
|||
public void PerformContextUpdate()
|
||||
{
|
||||
if (context != null)
|
||||
{
|
||||
context.Update (Implementation.WindowInfo);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -304,17 +312,13 @@ namespace OpenTK
|
|||
protected override void OnParentChanged(EventArgs e)
|
||||
{
|
||||
if (context != null)
|
||||
{
|
||||
context.Update(Implementation.WindowInfo);
|
||||
}
|
||||
|
||||
base.OnParentChanged(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Public Methods ---
|
||||
|
||||
#region public void SwapBuffers()
|
||||
|
||||
/// <summary>
|
||||
/// Swaps the front and back buffers, presenting the rendered scene to the screen.
|
||||
/// This method will have no effect on a single-buffered <c>GraphicsMode</c>.
|
||||
|
@ -325,10 +329,6 @@ namespace OpenTK
|
|||
Context.SwapBuffers();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public void MakeCurrent()
|
||||
|
||||
/// <summary>
|
||||
/// <para>
|
||||
/// Makes <see cref="GLControl.Context"/> current in the calling thread.
|
||||
|
@ -350,10 +350,6 @@ namespace OpenTK
|
|||
Context.MakeCurrent(Implementation.WindowInfo);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool IsIdle
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether the current thread contains pending system messages.
|
||||
/// </summary>
|
||||
|
@ -367,10 +363,6 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public IGraphicsContext Context
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <c>IGraphicsContext</c> instance that is associated with the <c>GLControl</c>.
|
||||
/// The associated <c>IGraphicsContext</c> is updated whenever the <c>GLControl</c>
|
||||
|
@ -390,10 +382,6 @@ namespace OpenTK
|
|||
private set { context = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public float AspectRatio
|
||||
|
||||
/// <summary>
|
||||
/// Gets the aspect ratio of this GLControl.
|
||||
/// </summary>
|
||||
|
@ -407,10 +395,6 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool VSync
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether vsync is active for this <c>GLControl</c>.
|
||||
/// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
|
||||
|
@ -451,10 +435,6 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public GraphicsMode GraphicsMode
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <c>GraphicsMode</c> of the <c>IGraphicsContext</c> associated with
|
||||
/// this <c>GLControl</c>. If you wish to change <c>GraphicsMode</c>, you must
|
||||
|
@ -469,10 +449,6 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region WindowInfo
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="OpenTK.Platform.IWindowInfo"/> for this instance.
|
||||
/// </summary>
|
||||
|
@ -480,41 +456,5 @@ namespace OpenTK
|
|||
{
|
||||
get { return implementation.WindowInfo; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public Bitmap GrabScreenshot()
|
||||
|
||||
/// <summary>
|
||||
/// Grabs a screenshot of the frontbuffer contents.
|
||||
/// When using multiple <c>GLControl</c>s, ensure that <see cref="Context"/>
|
||||
/// is current before accessing this property.
|
||||
/// <seealso cref="Context"/>
|
||||
/// <seealso cref="MakeCurrent"/>
|
||||
/// </summary>
|
||||
/// <returns>A System.Drawing.Bitmap, containing the contents of the frontbuffer.</returns>
|
||||
/// <exception cref="OpenTK.Graphics.GraphicsContextException">
|
||||
/// Occurs when no OpenTK.Graphics.GraphicsContext is current in the calling thread.
|
||||
/// </exception>
|
||||
[Obsolete("This method will not work correctly with OpenGL|ES. Please use GL.ReadPixels to capture the contents of the framebuffer (refer to http://www.opentk.com/doc/graphics/save-opengl-rendering-to-disk for more information).")]
|
||||
public Bitmap GrabScreenshot()
|
||||
{
|
||||
ValidateState();
|
||||
ValidateContext("GrabScreenshot()");
|
||||
|
||||
Bitmap bmp = new Bitmap(this.ClientSize.Width, this.ClientSize.Height);
|
||||
System.Drawing.Imaging.BitmapData data =
|
||||
bmp.LockBits(this.ClientRectangle, System.Drawing.Imaging.ImageLockMode.WriteOnly,
|
||||
System.Drawing.Imaging.PixelFormat.Format24bppRgb);
|
||||
GL.ReadPixels(0, 0, this.ClientSize.Width, this.ClientSize.Height, PixelFormat.Bgr, PixelType.UnsignedByte,
|
||||
data.Scan0);
|
||||
bmp.UnlockBits(data);
|
||||
bmp.RotateFlip(RotateFlipType.RotateNoneFlipY);
|
||||
return bmp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,31 +22,47 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK.Graphics;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
// Constructs GLControls.
|
||||
class GLControlFactory
|
||||
internal class GLControlFactory
|
||||
{
|
||||
public IGLControl CreateGLControl(GraphicsMode mode, Control control)
|
||||
{
|
||||
if (mode == null)
|
||||
{
|
||||
throw new ArgumentNullException("mode");
|
||||
}
|
||||
if (control == null)
|
||||
{
|
||||
throw new ArgumentNullException("control");
|
||||
}
|
||||
|
||||
if (Configuration.RunningOnSdl2) return new Sdl2GLControl(mode, control);
|
||||
else if (Configuration.RunningOnWindows) return new WinGLControl(mode, control);
|
||||
else if (Configuration.RunningOnMacOS) return new CarbonGLControl(mode, control);
|
||||
else if (Configuration.RunningOnX11) return new X11GLControl(mode, control);
|
||||
else throw new PlatformNotSupportedException();
|
||||
if (Configuration.RunningOnSdl2)
|
||||
{
|
||||
return new Sdl2GLControl(mode, control);
|
||||
}
|
||||
else if (Configuration.RunningOnWindows)
|
||||
{
|
||||
return new WinGLControl(mode, control);
|
||||
}
|
||||
else if (Configuration.RunningOnMacOS)
|
||||
{
|
||||
return new CarbonGLControl(mode, control);
|
||||
}
|
||||
else if (Configuration.RunningOnX11)
|
||||
{
|
||||
return new X11GLControl(mode, control);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,11 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Platform;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// NS.cs
|
||||
//
|
||||
|
@ -26,8 +25,6 @@
|
|||
// THE SOFTWARE.
|
||||
//
|
||||
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -35,18 +32,18 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
internal class NS
|
||||
{
|
||||
const string Library = "libdl.dylib";
|
||||
private const string Library = "libdl.dylib";
|
||||
|
||||
[DllImport(Library, EntryPoint = "NSIsSymbolNameDefined")]
|
||||
static extern bool NSIsSymbolNameDefined(string s);
|
||||
private static extern bool NSIsSymbolNameDefined(string s);
|
||||
[DllImport(Library, EntryPoint = "NSIsSymbolNameDefined")]
|
||||
static extern bool NSIsSymbolNameDefined(IntPtr s);
|
||||
private static extern bool NSIsSymbolNameDefined(IntPtr s);
|
||||
[DllImport(Library, EntryPoint = "NSLookupAndBindSymbol")]
|
||||
static extern IntPtr NSLookupAndBindSymbol(string s);
|
||||
private static extern IntPtr NSLookupAndBindSymbol(string s);
|
||||
[DllImport(Library, EntryPoint = "NSLookupAndBindSymbol")]
|
||||
static extern IntPtr NSLookupAndBindSymbol(IntPtr s);
|
||||
private static extern IntPtr NSLookupAndBindSymbol(IntPtr s);
|
||||
[DllImport(Library, EntryPoint = "NSAddressOfSymbol")]
|
||||
static extern IntPtr NSAddressOfSymbol(IntPtr symbol);
|
||||
private static extern IntPtr NSAddressOfSymbol(IntPtr symbol);
|
||||
[DllImport(Library)]
|
||||
private static extern IntPtr dlopen(String fileName, int flags);
|
||||
[DllImport(Library)]
|
||||
|
@ -88,7 +85,9 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
symbol = NSLookupAndBindSymbol(function);
|
||||
if (symbol != IntPtr.Zero)
|
||||
{
|
||||
symbol = NSAddressOfSymbol(symbol);
|
||||
}
|
||||
}
|
||||
return symbol;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<Deterministic>true</Deterministic>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
|
@ -55,7 +57,7 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>full</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
|
@ -71,8 +73,8 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>none</DebugType>
|
||||
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignAssembly>True</SignAssembly>
|
||||
|
@ -158,6 +160,14 @@
|
|||
<None Include="paket.references" />
|
||||
<None Include="paket.template" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.ruleset">
|
||||
<Link>stylecop.ruleset</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
|
|
|
@ -5,13 +5,18 @@ using System.Reflection;
|
|||
[assembly: AssemblyTitleAttribute("OpenTK.GLControl")]
|
||||
[assembly: AssemblyProductAttribute("OpenTK")]
|
||||
[assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")]
|
||||
[assembly: AssemblyVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyVersionAttribute("3.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0")]
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.")]
|
||||
namespace System {
|
||||
internal static class AssemblyVersionInformation {
|
||||
internal const string Version = "2.0.0";
|
||||
internal const string InformationalVersion = "2.0.0";
|
||||
internal const System.String AssemblyTitle = "OpenTK.GLControl";
|
||||
internal const System.String AssemblyProduct = "OpenTK";
|
||||
internal const System.String AssemblyDescription = "A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.";
|
||||
internal const System.String AssemblyVersion = "3.0.0";
|
||||
internal const System.String AssemblyFileVersion = "3.0.0";
|
||||
internal const System.Boolean CLSCompliant = true;
|
||||
internal const System.String AssemblyCopyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2013 Stefanos Apostolopoulos
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,27 +22,22 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Platform;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
class Sdl2GLControl : IGLControl
|
||||
internal class Sdl2GLControl : IGLControl
|
||||
{
|
||||
IWindowInfo window_info;
|
||||
GraphicsMode mode;
|
||||
private GraphicsMode mode;
|
||||
|
||||
public Sdl2GLControl(GraphicsMode mode, Control control)
|
||||
{
|
||||
this.mode = mode;
|
||||
window_info = Utilities.CreateSdl2WindowInfo(control.Handle);
|
||||
WindowInfo = Utilities.CreateSdl2WindowInfo(control.Handle);
|
||||
// Fixme: SDL2 will refuse to create an OpenGL context on
|
||||
// a window with the SDL_WINDOW_FOREIGN flag (i.e. windows
|
||||
// that are passed to SDL2 through SDL_CreateWindowFrom).
|
||||
|
@ -52,7 +46,7 @@ namespace OpenTK
|
|||
|
||||
public Graphics.IGraphicsContext CreateContext(int major, int minor, Graphics.GraphicsContextFlags flags)
|
||||
{
|
||||
return new GraphicsContext(mode, window_info, major, minor, flags);
|
||||
return new GraphicsContext(mode, WindowInfo, major, minor, flags);
|
||||
}
|
||||
|
||||
public bool IsIdle
|
||||
|
@ -60,12 +54,9 @@ namespace OpenTK
|
|||
get { return NativeMethods.SDL_HasEvents(0, 0xffff); }
|
||||
}
|
||||
|
||||
public Platform.IWindowInfo WindowInfo
|
||||
{
|
||||
get { return window_info; }
|
||||
}
|
||||
public Platform.IWindowInfo WindowInfo { get; }
|
||||
|
||||
static class NativeMethods
|
||||
private static class NativeMethods
|
||||
{
|
||||
[DllImport("SDL2.dll", CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern bool SDL_HasEvents(int minType, int maxType);
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,11 +22,8 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using OpenTK.Graphics;
|
||||
|
@ -35,13 +31,9 @@ using OpenTK.Platform;
|
|||
|
||||
namespace OpenTK
|
||||
{
|
||||
class WinGLControl : IGLControl
|
||||
internal class WinGLControl : IGLControl
|
||||
{
|
||||
#region P/Invoke declarations
|
||||
|
||||
#region Message
|
||||
|
||||
struct MSG
|
||||
private struct MSG
|
||||
{
|
||||
public IntPtr HWnd;
|
||||
public uint Message;
|
||||
|
@ -57,11 +49,7 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Point
|
||||
|
||||
struct POINT
|
||||
private struct POINT
|
||||
{
|
||||
public int X;
|
||||
public int Y;
|
||||
|
@ -83,46 +71,23 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PeekMessage
|
||||
|
||||
[System.Security.SuppressUnmanagedCodeSecurity]
|
||||
[System.Runtime.InteropServices.DllImport("User32.dll")]
|
||||
static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);
|
||||
private static extern bool PeekMessage(ref MSG msg, IntPtr hWnd, int messageFilterMin, int messageFilterMax, int flags);
|
||||
|
||||
#endregion
|
||||
|
||||
#region
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
MSG msg = new MSG();
|
||||
IWindowInfo window_info;
|
||||
GraphicsMode mode;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
private MSG msg = new MSG();
|
||||
private GraphicsMode mode;
|
||||
|
||||
public WinGLControl(GraphicsMode mode, Control control)
|
||||
{
|
||||
this.mode = mode;
|
||||
|
||||
window_info = Utilities.CreateWindowsWindowInfo(control.Handle);
|
||||
WindowInfo = Utilities.CreateWindowsWindowInfo(control.Handle);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGLControl Members
|
||||
|
||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
return new GraphicsContext(mode, window_info, major, minor, flags);
|
||||
return new GraphicsContext(mode, WindowInfo, major, minor, flags);
|
||||
}
|
||||
|
||||
public bool IsIdle
|
||||
|
@ -130,15 +95,6 @@ namespace OpenTK
|
|||
get { return !PeekMessage(ref msg, IntPtr.Zero, 0, 0, 0); }
|
||||
}
|
||||
|
||||
public IWindowInfo WindowInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
// This method forces the creation of the control. Beware of this side-effect!
|
||||
return window_info;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
public IWindowInfo WindowInfo { get; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
#region --- License ---
|
||||
/* Licensed under the MIT/X11 license.
|
||||
/* Licensed under the MIT/X11 license.
|
||||
* Copyright (c) 2006-2008 the OpenTK Team.
|
||||
* This notice may not be removed from any source distribution.
|
||||
* See license.txt for licensing detailed licensing details.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
|
@ -17,26 +13,24 @@ using OpenTK.Platform;
|
|||
|
||||
namespace OpenTK
|
||||
{
|
||||
class X11GLControl : IGLControl
|
||||
internal class X11GLControl : IGLControl
|
||||
{
|
||||
#region P/Invokes
|
||||
|
||||
[DllImport("libX11")]
|
||||
static extern IntPtr XCreateColormap(IntPtr display, IntPtr window, IntPtr visual, int alloc);
|
||||
private static extern IntPtr XCreateColormap(IntPtr display, IntPtr window, IntPtr visual, int alloc);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetVisualInfo")]
|
||||
static extern IntPtr XGetVisualInfoInternal(IntPtr display, IntPtr vinfo_mask, ref XVisualInfo template, out int nitems);
|
||||
private static extern IntPtr XGetVisualInfoInternal(IntPtr display, IntPtr vinfo_mask, ref XVisualInfo template, out int nitems);
|
||||
|
||||
static IntPtr XGetVisualInfo(IntPtr display, int vinfo_mask, ref XVisualInfo template, out int nitems)
|
||||
private static IntPtr XGetVisualInfo(IntPtr display, int vinfo_mask, ref XVisualInfo template, out int nitems)
|
||||
{
|
||||
return XGetVisualInfoInternal(display, (IntPtr)vinfo_mask, ref template, out nitems);
|
||||
}
|
||||
|
||||
[DllImport("libX11")]
|
||||
extern static int XPending(IntPtr diplay);
|
||||
private extern static int XPending(IntPtr diplay);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct XVisualInfo
|
||||
private struct XVisualInfo
|
||||
{
|
||||
public IntPtr Visual;
|
||||
public IntPtr VisualID;
|
||||
|
@ -56,26 +50,23 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Fields
|
||||
|
||||
GraphicsMode mode;
|
||||
IWindowInfo window_info;
|
||||
IntPtr display;
|
||||
IntPtr rootWindow;
|
||||
private GraphicsMode mode;
|
||||
private IntPtr display;
|
||||
private IntPtr rootWindow;
|
||||
|
||||
// Use reflection to retrieve the necessary values from Mono's Windows.Forms implementation.
|
||||
Type xplatui = Type.GetType("System.Windows.Forms.XplatUIX11, System.Windows.Forms");
|
||||
|
||||
#endregion
|
||||
private Type xplatui = Type.GetType("System.Windows.Forms.XplatUIX11, System.Windows.Forms");
|
||||
|
||||
internal X11GLControl(GraphicsMode mode, Control control)
|
||||
{
|
||||
if (mode == null)
|
||||
{
|
||||
throw new ArgumentNullException("mode");
|
||||
}
|
||||
if (control == null)
|
||||
{
|
||||
throw new ArgumentNullException("control");
|
||||
}
|
||||
|
||||
// Note: the X11 window is created with a default XVisualInfo,
|
||||
// that is not necessarily compatible with the desired GraphicsMode.
|
||||
|
@ -94,19 +85,20 @@ namespace OpenTK
|
|||
mode.Buffers,
|
||||
mode.Stereo);
|
||||
|
||||
if (xplatui == null) throw new PlatformNotSupportedException(
|
||||
if (xplatui == null)
|
||||
{
|
||||
throw new PlatformNotSupportedException(
|
||||
"System.Windows.Forms.XplatUIX11 missing. Unsupported platform or Mono runtime version, aborting.");
|
||||
}
|
||||
|
||||
// get the required handles from the X11 API.
|
||||
display = (IntPtr)GetStaticFieldValue(xplatui, "DisplayHandle");
|
||||
rootWindow = (IntPtr)GetStaticFieldValue(xplatui, "RootWindow");
|
||||
int screen = (int)GetStaticFieldValue(xplatui, "ScreenNo");
|
||||
|
||||
window_info = Utilities.CreateX11WindowInfo(display, screen, control.Handle, rootWindow, IntPtr.Zero);
|
||||
WindowInfo = Utilities.CreateX11WindowInfo(display, screen, control.Handle, rootWindow, IntPtr.Zero);
|
||||
}
|
||||
|
||||
#region IGLControl Members
|
||||
|
||||
public IGraphicsContext CreateContext(int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
GraphicsContext context = new GraphicsContext(mode, this.WindowInfo, major, minor, flags);
|
||||
|
@ -133,30 +125,18 @@ namespace OpenTK
|
|||
get { return XPending(display) == 0; }
|
||||
}
|
||||
|
||||
public IWindowInfo WindowInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return window_info;
|
||||
}
|
||||
}
|
||||
public IWindowInfo WindowInfo { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
|
||||
static object GetStaticFieldValue(Type type, string fieldName)
|
||||
private static object GetStaticFieldValue(Type type, string fieldName)
|
||||
{
|
||||
return type.GetField(fieldName,
|
||||
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).GetValue(null);
|
||||
}
|
||||
|
||||
static void SetStaticFieldValue(Type type, string fieldName, object value)
|
||||
|
||||
private static void SetStaticFieldValue(Type type, string fieldName, object value)
|
||||
{
|
||||
type.GetField(fieldName,
|
||||
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).SetValue(null, value);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ type project
|
|||
id OpenTK.GLControl
|
||||
owners
|
||||
opentk thefiddler
|
||||
authors
|
||||
authors
|
||||
The Open Toolkit Team
|
||||
projectUrl
|
||||
http://www.opentk.com
|
||||
|
@ -19,5 +19,8 @@ tags
|
|||
summary
|
||||
A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.
|
||||
description
|
||||
The Open Toolkit is set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL. It runs on all major platforms and powers hundreds of apps, games and scientific research.
|
||||
The Open Toolkit is set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL. It runs on all major platforms and powers hundreds of apps, games and scientific research.
|
||||
OpenTK provides several utility libraries, including a math/linear algebra package, a windowing system, and input handling.
|
||||
include-pdbs true
|
||||
excludeddependencies
|
||||
StyleCop.Analyzers
|
||||
|
|
|
@ -1,166 +1,155 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.ComponentModel;
|
||||
|
||||
using Gdk;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Platform;
|
||||
using OpenTK;
|
||||
|
||||
using Gtk;
|
||||
|
||||
namespace OpenTK
|
||||
{
|
||||
/// <summary>
|
||||
/// The <see cref="GLWidget"/> is a GTK widget for which an OpenGL context can be used to draw arbitrary graphics.
|
||||
/// </summary>
|
||||
[CLSCompliant(false)]
|
||||
[ToolboxItem(true)]
|
||||
public class GLWidget: DrawingArea, IDisposable
|
||||
public class GLWidget : GLArea
|
||||
{
|
||||
private static int _GraphicsContextCount;
|
||||
private static bool _SharedContextInitialized = false;
|
||||
|
||||
#region Static attrs.
|
||||
private IGraphicsContext _GraphicsContext;
|
||||
private bool _Initialized = false;
|
||||
|
||||
static int _GraphicsContextCount;
|
||||
static bool _SharedContextInitialized = false;
|
||||
/// <summary>
|
||||
/// The previous frame time reported by GTK.
|
||||
/// </summary>
|
||||
private double? _PreviousFrameTime;
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Gets the time taken to render the last frame (in seconds).
|
||||
/// </summary>
|
||||
public double DeltaTime { get; private set; }
|
||||
|
||||
#region Attributes
|
||||
/// <summary>
|
||||
/// The set <see cref="ContextFlags"/> for this widget.
|
||||
/// </summary>
|
||||
public GraphicsContextFlags ContextFlags { get; }
|
||||
|
||||
IGraphicsContext _GraphicsContext;
|
||||
IWindowInfo _WindowInfo;
|
||||
GraphicsContextFlags _GraphicsContextFlags;
|
||||
bool _Initialized = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
|
||||
/// <summary>Use a single buffer versus a double buffer.</summary>
|
||||
[Browsable(true)]
|
||||
public bool SingleBuffer { get; set; }
|
||||
|
||||
/// <summary>Color Buffer Bits-Per-Pixel</summary>
|
||||
public int ColorBPP { get; set; }
|
||||
|
||||
/// <summary>Accumulation Buffer Bits-Per-Pixel</summary>
|
||||
public int AccumulatorBPP { get; set; }
|
||||
|
||||
/// <summary>Depth Buffer Bits-Per-Pixel</summary>
|
||||
public int DepthBPP { get; set; }
|
||||
|
||||
/// <summary>Stencil Buffer Bits-Per-Pixel</summary>
|
||||
public int StencilBPP { get; set; }
|
||||
|
||||
/// <summary>Number of samples</summary>
|
||||
public int Samples { get; set; }
|
||||
|
||||
/// <summary>Indicates if steropic renderering is enabled</summary>
|
||||
public bool Stereo { get; set; }
|
||||
|
||||
/// <summary>The major version of OpenGL to use.</summary>
|
||||
public int GlVersionMajor { get; set; }
|
||||
|
||||
/// <summary>The minor version of OpenGL to use.</summary>
|
||||
public int GlVersionMinor { get; set; }
|
||||
|
||||
public GraphicsContextFlags GraphicsContextFlags
|
||||
{
|
||||
get
|
||||
{
|
||||
return _GraphicsContextFlags;
|
||||
}
|
||||
set
|
||||
{
|
||||
_GraphicsContextFlags = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction/Destruction
|
||||
|
||||
/// <summary>Constructs a new GLWidget.</summary>
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GLWidget"/> class.
|
||||
/// </summary>
|
||||
public GLWidget()
|
||||
: this(GraphicsMode.Default)
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Constructs a new GLWidget using a given GraphicsMode</summary>
|
||||
public GLWidget(GraphicsMode graphicsMode)
|
||||
: this(graphicsMode, 1, 0, GraphicsContextFlags.Default)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Constructs a new GLWidget</summary>
|
||||
public GLWidget(GraphicsMode graphicsMode, int glVersionMajor, int glVersionMinor, GraphicsContextFlags graphicsContextFlags)
|
||||
{
|
||||
this.DoubleBuffered = false;
|
||||
|
||||
SingleBuffer = graphicsMode.Buffers == 1;
|
||||
ColorBPP = graphicsMode.ColorFormat.BitsPerPixel;
|
||||
AccumulatorBPP = graphicsMode.AccumulatorFormat.BitsPerPixel;
|
||||
DepthBPP = graphicsMode.Depth;
|
||||
StencilBPP = graphicsMode.Stencil;
|
||||
Samples = graphicsMode.Samples;
|
||||
Stereo = graphicsMode.Stereo;
|
||||
|
||||
GlVersionMajor = glVersionMajor;
|
||||
GlVersionMinor = glVersionMinor;
|
||||
GraphicsContextFlags = graphicsContextFlags;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GLWidget"/> class.
|
||||
/// </summary>
|
||||
/// <param name="graphicsMode">The <see cref="GraphicsMode"/> which the widget should be constructed with.</param>
|
||||
/// <param name="glVersionMajor">The major OpenGL version to attempt to initialize.</param>
|
||||
/// <param name="glVersionMinor">The minor OpenGL version to attempt to initialize.</param>
|
||||
/// <param name="contextFlags">
|
||||
/// Any flags which should be used during initialization of the <see cref="GraphicsContext"/>.
|
||||
/// </param>
|
||||
public GLWidget(GraphicsMode graphicsMode, int glVersionMajor, int glVersionMinor, GraphicsContextFlags contextFlags)
|
||||
{
|
||||
ContextFlags = contextFlags;
|
||||
|
||||
AddTickCallback(UpdateFrameTime);
|
||||
SetRequiredVersion(glVersionMajor, glVersionMinor);
|
||||
|
||||
if (graphicsMode.Depth > 0)
|
||||
{
|
||||
HasDepthBuffer = true;
|
||||
}
|
||||
|
||||
if (graphicsMode.Stencil > 0)
|
||||
{
|
||||
HasStencilBuffer = true;
|
||||
}
|
||||
|
||||
if (graphicsMode.ColorFormat.Alpha > 0)
|
||||
{
|
||||
HasAlpha = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates the time delta with a new value from the last frame.
|
||||
/// </summary>
|
||||
/// <param name="widget">The sending widget.</param>
|
||||
/// <param name="frameClock">The relevant frame clock.</param>
|
||||
/// <returns>true if the callback should be called again; otherwise, false.</returns>
|
||||
private bool UpdateFrameTime(Widget widget, FrameClock frameClock)
|
||||
{
|
||||
var frameTimeµSeconds = frameClock.FrameTime;
|
||||
|
||||
if (!_PreviousFrameTime.HasValue)
|
||||
{
|
||||
_PreviousFrameTime = frameTimeµSeconds;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
var frameTimeSeconds = (frameTimeµSeconds - _PreviousFrameTime) / 10e6;
|
||||
|
||||
DeltaTime = (float)frameTimeSeconds;
|
||||
_PreviousFrameTime = frameTimeµSeconds;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override GLContext OnCreateContext()
|
||||
{
|
||||
var gdkGLContext = Window.CreateGlContext();
|
||||
|
||||
GetRequiredVersion(out var major, out var minor);
|
||||
gdkGLContext.SetRequiredVersion(major, minor);
|
||||
|
||||
gdkGLContext.DebugEnabled = ContextFlags.HasFlag(GraphicsContextFlags.Debug);
|
||||
gdkGLContext.ForwardCompatible = ContextFlags.HasFlag(GraphicsContextFlags.ForwardCompatible);
|
||||
|
||||
gdkGLContext.Realize();
|
||||
return gdkGLContext;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructs this object.
|
||||
/// </summary>
|
||||
~GLWidget()
|
||||
{
|
||||
Dispose(false);
|
||||
{
|
||||
Dispose(false);
|
||||
}
|
||||
|
||||
#if GTK3
|
||||
public override void Destroy() {
|
||||
#else
|
||||
public override void Dispose()
|
||||
/// <summary>
|
||||
/// Destroys this <see cref="Widget"/>, disposing it and destroying it in the context of GTK.
|
||||
/// </summary>
|
||||
public override void Destroy()
|
||||
{
|
||||
#endif
|
||||
GC.SuppressFinalize(this);
|
||||
Dispose(true);
|
||||
#if GTK3
|
||||
|
||||
base.Destroy();
|
||||
#else
|
||||
base.Dispose();
|
||||
#endif
|
||||
}
|
||||
|
||||
public virtual void Dispose(bool disposing)
|
||||
/// <summary>
|
||||
/// Disposes the current object, releasing any native resources it was using.
|
||||
/// </summary>
|
||||
/// <param name="disposing"></param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_GraphicsContext.MakeCurrent(_WindowInfo);
|
||||
MakeCurrent();
|
||||
OnShuttingDown();
|
||||
if (GraphicsContext.ShareContexts && (Interlocked.Decrement(ref _GraphicsContextCount) == 0))
|
||||
{
|
||||
|
@ -171,142 +160,107 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region New Events
|
||||
|
||||
// Called when the first GraphicsContext is created in the case of GraphicsContext.ShareContexts == True;
|
||||
/// <summary>
|
||||
/// Called when the first <see cref="GraphicsContext"/> is created in the case where
|
||||
/// GraphicsContext.ShareContexts == true;
|
||||
/// </summary>
|
||||
public static event EventHandler GraphicsContextInitialized;
|
||||
|
||||
static void OnGraphicsContextInitialized()
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="GraphicsContextInitialized"/> event.
|
||||
/// </summary>
|
||||
private static void OnGraphicsContextInitialized()
|
||||
{
|
||||
if (GraphicsContextInitialized != null)
|
||||
GraphicsContextInitialized(null, EventArgs.Empty);
|
||||
{
|
||||
GraphicsContextInitialized(null, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when the first GraphicsContext is being destroyed in the case of GraphicsContext.ShareContexts == True;
|
||||
/// <summary>
|
||||
/// Called when the first <see cref="GraphicsContext"/> is being destroyed in the case where
|
||||
/// GraphicsContext.ShareContext == true;
|
||||
/// </summary>
|
||||
public static event EventHandler GraphicsContextShuttingDown;
|
||||
|
||||
static void OnGraphicsContextShuttingDown()
|
||||
{
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="GraphicsContextShuttingDown"/> event.
|
||||
/// </summary>
|
||||
private static void OnGraphicsContextShuttingDown()
|
||||
{
|
||||
if (GraphicsContextShuttingDown != null)
|
||||
GraphicsContextShuttingDown(null, EventArgs.Empty);
|
||||
{
|
||||
GraphicsContextShuttingDown(null, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when this GLWidget has a valid GraphicsContext
|
||||
/// <summary>
|
||||
/// Called when this <see cref="GLWidget"/> has finished initializing and has a valid
|
||||
/// <see cref="GraphicsContext"/>.
|
||||
/// </summary>
|
||||
public event EventHandler Initialized;
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="Initialized"/> event.
|
||||
/// </summary>
|
||||
protected virtual void OnInitialized()
|
||||
{
|
||||
{
|
||||
if (Initialized != null)
|
||||
Initialized(this, EventArgs.Empty);
|
||||
{
|
||||
Initialized(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
// Called when this GLWidget needs to render a frame
|
||||
public event EventHandler RenderFrame;
|
||||
|
||||
protected virtual void OnRenderFrame()
|
||||
{
|
||||
if (RenderFrame != null)
|
||||
RenderFrame(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
// Called when this GLWidget is being Disposed
|
||||
/// <summary>
|
||||
/// Called when this <see cref="GLWidget"/> is being disposed.
|
||||
/// </summary>
|
||||
public event EventHandler ShuttingDown;
|
||||
|
||||
/// <summary>
|
||||
/// Invokes the <see cref="ShuttingDown"/> event.
|
||||
/// </summary>
|
||||
protected virtual void OnShuttingDown()
|
||||
{
|
||||
{
|
||||
if (ShuttingDown != null)
|
||||
ShuttingDown(this, EventArgs.Empty);
|
||||
{
|
||||
ShuttingDown(this, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
// Called when a widget is realized. (window handles and such are valid)
|
||||
// protected override void OnRealized() { base.OnRealized(); }
|
||||
|
||||
// Called when the widget needs to be (fully or partially) redrawn.
|
||||
#if GTK3
|
||||
/// <summary>
|
||||
/// Called when the widget needs to be (fully or partially) redrawn.
|
||||
/// </summary>
|
||||
/// <param name="cr"></param>
|
||||
/// <returns></returns>
|
||||
protected override bool OnDrawn(Cairo.Context cr)
|
||||
#else
|
||||
protected override bool OnExposeEvent(Gdk.EventExpose evnt)
|
||||
#endif
|
||||
{
|
||||
if (!_Initialized)
|
||||
{
|
||||
Initialize();
|
||||
else
|
||||
_GraphicsContext.MakeCurrent(_WindowInfo);
|
||||
}
|
||||
|
||||
#if GTK3
|
||||
var result = base.OnDrawn(cr);
|
||||
#else
|
||||
bool result = base.OnExposeEvent(evnt);
|
||||
#endif
|
||||
|
||||
OnRenderFrame();
|
||||
|
||||
#if !GTK3
|
||||
evnt.Window.Display.Sync(); // Add Sync call to fix resize rendering problem (Jay L. T. Cornwall) - How does this affect VSync?
|
||||
#endif
|
||||
|
||||
_GraphicsContext.SwapBuffers();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Called on Resize
|
||||
protected override bool OnConfigureEvent(Gdk.EventConfigure evnt)
|
||||
{
|
||||
bool result = base.OnConfigureEvent(evnt);
|
||||
|
||||
if (_GraphicsContext != null)
|
||||
_GraphicsContext.Update(_WindowInfo);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
/// <summary>
|
||||
/// Initializes the <see cref="GLWidget"/> with its given values and creates a <see cref="GraphicsContext"/>.
|
||||
/// </summary>
|
||||
private void Initialize()
|
||||
{
|
||||
_Initialized = true;
|
||||
|
||||
// If this looks uninitialized... initialize.
|
||||
if (ColorBPP == 0)
|
||||
// Make the GDK GL context current
|
||||
MakeCurrent();
|
||||
|
||||
// Create a dummy context that will grab the GdkGLContext that is current on the thread
|
||||
_GraphicsContext = new GraphicsContext(ContextHandle.Zero, null);
|
||||
|
||||
if (ContextFlags.HasFlag(GraphicsContextFlags.Debug))
|
||||
{
|
||||
ColorBPP = 32;
|
||||
|
||||
if (DepthBPP == 0)
|
||||
DepthBPP = 16;
|
||||
_GraphicsContext.ErrorChecking = true;
|
||||
}
|
||||
|
||||
ColorFormat colorBufferColorFormat = new ColorFormat(ColorBPP);
|
||||
|
||||
ColorFormat accumulationColorFormat = new ColorFormat(AccumulatorBPP);
|
||||
|
||||
int buffers = 2;
|
||||
if (SingleBuffer)
|
||||
buffers--;
|
||||
|
||||
GraphicsMode graphicsMode = new GraphicsMode(colorBufferColorFormat, DepthBPP, StencilBPP, Samples, accumulationColorFormat, buffers, Stereo);
|
||||
|
||||
if (Configuration.RunningOnWindows)
|
||||
Console.WriteLine("OpenTK running on windows");
|
||||
else if (Configuration.RunningOnMacOS)
|
||||
Console.WriteLine("OpenTK running on OSX");
|
||||
else
|
||||
Console.WriteLine("OpenTK running on X11");
|
||||
|
||||
// IWindowInfo
|
||||
if (Configuration.RunningOnWindows)
|
||||
_WindowInfo = InitializeWindows();
|
||||
else if (Configuration.RunningOnMacOS)
|
||||
_WindowInfo = InitializeOSX();
|
||||
else
|
||||
_WindowInfo = InitializeX(graphicsMode);
|
||||
|
||||
// GraphicsContext
|
||||
_GraphicsContext = new GraphicsContext(graphicsMode, _WindowInfo, GlVersionMajor, GlVersionMinor, _GraphicsContextFlags);
|
||||
_GraphicsContext.MakeCurrent(_WindowInfo);
|
||||
|
||||
if (GraphicsContext.ShareContexts)
|
||||
{
|
||||
Interlocked.Increment(ref _GraphicsContextCount);
|
||||
|
@ -326,250 +280,5 @@ namespace OpenTK
|
|||
|
||||
OnInitialized();
|
||||
}
|
||||
|
||||
#region Windows Specific initalization
|
||||
|
||||
IWindowInfo InitializeWindows()
|
||||
{
|
||||
IntPtr windowHandle = gdk_win32_drawable_get_handle(GdkWindow.Handle);
|
||||
return Utilities.CreateWindowsWindowInfo(windowHandle);
|
||||
}
|
||||
|
||||
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-win32-2.0-0.dll")]
|
||||
public static extern IntPtr gdk_win32_drawable_get_handle(IntPtr d);
|
||||
|
||||
#endregion
|
||||
|
||||
#region OSX Specific Initialization
|
||||
|
||||
IWindowInfo InitializeOSX()
|
||||
{
|
||||
IntPtr windowHandle = gdk_quartz_window_get_nswindow(this.GdkWindow.Handle);
|
||||
IntPtr viewHandle = gdk_quartz_window_get_nsview(this.GdkWindow.Handle);
|
||||
return Utilities.CreateMacOSWindowInfo(windowHandle, viewHandle);
|
||||
}
|
||||
|
||||
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")]
|
||||
static extern IntPtr gdk_quartz_window_get_nswindow(IntPtr handle);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity, DllImport("libgdk-quartz-2.0.0.dylib")]
|
||||
static extern IntPtr gdk_quartz_window_get_nsview(IntPtr handle);
|
||||
|
||||
#endregion
|
||||
|
||||
#region X Specific Initialization
|
||||
|
||||
#if GTK3
|
||||
const string UnixLibGdkName = "libgdk-3.so.0";
|
||||
#else
|
||||
const string UnixLibGdkName = "libgdk-x11-2.0.so.0";
|
||||
#endif
|
||||
const string UnixLibX11Name = "libX11.so.6";
|
||||
const string UnixLibGLName = "libGL.so.1";
|
||||
|
||||
const int GLX_NONE = 0;
|
||||
const int GLX_USE_GL = 1;
|
||||
const int GLX_BUFFER_SIZE = 2;
|
||||
const int GLX_LEVEL = 3;
|
||||
const int GLX_RGBA = 4;
|
||||
const int GLX_DOUBLEBUFFER = 5;
|
||||
const int GLX_STEREO = 6;
|
||||
const int GLX_AUX_BUFFERS = 7;
|
||||
const int GLX_RED_SIZE = 8;
|
||||
const int GLX_GREEN_SIZE = 9;
|
||||
const int GLX_BLUE_SIZE = 10;
|
||||
const int GLX_ALPHA_SIZE = 11;
|
||||
const int GLX_DEPTH_SIZE = 12;
|
||||
const int GLX_STENCIL_SIZE = 13;
|
||||
const int GLX_ACCUM_RED_SIZE = 14;
|
||||
const int GLX_ACCUM_GREEN_SIZE = 15;
|
||||
const int GLX_ACCUM_BLUE_SIZE = 16;
|
||||
const int GLX_ACCUM_ALPHA_SIZE = 17;
|
||||
|
||||
public enum XVisualClass
|
||||
{
|
||||
StaticGray = 0,
|
||||
GrayScale = 1,
|
||||
StaticColor = 2,
|
||||
PseudoColor = 3,
|
||||
TrueColor = 4,
|
||||
DirectColor = 5,
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct XVisualInfo
|
||||
{
|
||||
public IntPtr Visual;
|
||||
public IntPtr VisualID;
|
||||
public int Screen;
|
||||
public int Depth;
|
||||
public XVisualClass Class;
|
||||
public long RedMask;
|
||||
public long GreenMask;
|
||||
public long blueMask;
|
||||
public int ColormapSize;
|
||||
public int BitsPerRgb;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("id ({0}), screen ({1}), depth ({2}), class ({3})",
|
||||
VisualID, Screen, Depth, Class);
|
||||
}
|
||||
}
|
||||
|
||||
[Flags]
|
||||
internal enum XVisualInfoMask
|
||||
{
|
||||
No = 0x0,
|
||||
ID = 0x1,
|
||||
Screen = 0x2,
|
||||
Depth = 0x4,
|
||||
Class = 0x8,
|
||||
Red = 0x10,
|
||||
Green = 0x20,
|
||||
Blue = 0x40,
|
||||
ColormapSize = 0x80,
|
||||
BitsPerRGB = 0x100,
|
||||
All = 0x1FF,
|
||||
}
|
||||
|
||||
IWindowInfo InitializeX(GraphicsMode mode)
|
||||
{
|
||||
IntPtr display = gdk_x11_display_get_xdisplay(Display.Handle);
|
||||
int screen = Screen.Number;
|
||||
#if GTK3
|
||||
IntPtr windowHandle = gdk_x11_window_get_xid(GdkWindow.Handle);
|
||||
IntPtr rootWindow = gdk_x11_window_get_xid(RootWindow.Handle);
|
||||
#else
|
||||
IntPtr windowHandle = gdk_x11_drawable_get_xid(GdkWindow.Handle);
|
||||
IntPtr rootWindow = gdk_x11_drawable_get_xid(RootWindow.Handle);
|
||||
#endif
|
||||
IWindowInfo retval;
|
||||
|
||||
IntPtr visualInfo;
|
||||
if (mode.Index.HasValue)
|
||||
{
|
||||
XVisualInfo info = new XVisualInfo();
|
||||
info.VisualID = mode.Index.Value;
|
||||
int dummy;
|
||||
visualInfo = XGetVisualInfo(display, XVisualInfoMask.ID, ref info, out dummy);
|
||||
}
|
||||
else
|
||||
visualInfo = GetVisualInfo(display);
|
||||
|
||||
retval = Utilities.CreateX11WindowInfo(display, screen, windowHandle, rootWindow, visualInfo);
|
||||
XFree(visualInfo);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
static IntPtr XGetVisualInfo(IntPtr display, XVisualInfoMask vinfo_mask, ref XVisualInfo template, out int nitems)
|
||||
{
|
||||
return XGetVisualInfoInternal(display, (IntPtr)(int)vinfo_mask, ref template, out nitems);
|
||||
}
|
||||
|
||||
IntPtr GetVisualInfo(IntPtr display)
|
||||
{
|
||||
try
|
||||
{
|
||||
int[] attributes = AttributeList.ToArray();
|
||||
return glXChooseVisual(display, Screen.Number, attributes);
|
||||
}
|
||||
catch (DllNotFoundException e)
|
||||
{
|
||||
throw new DllNotFoundException("OpenGL dll not found!", e);
|
||||
}
|
||||
catch (EntryPointNotFoundException enf)
|
||||
{
|
||||
throw new EntryPointNotFoundException("Glx entry point not found!", enf);
|
||||
}
|
||||
}
|
||||
|
||||
List<int> AttributeList
|
||||
{
|
||||
get
|
||||
{
|
||||
List<int> attributeList = new List<int>(24);
|
||||
|
||||
attributeList.Add(GLX_RGBA);
|
||||
|
||||
if (!SingleBuffer)
|
||||
attributeList.Add(GLX_DOUBLEBUFFER);
|
||||
|
||||
if (Stereo)
|
||||
attributeList.Add(GLX_STEREO);
|
||||
|
||||
attributeList.Add(GLX_RED_SIZE);
|
||||
attributeList.Add(ColorBPP / 4); // TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_GREEN_SIZE);
|
||||
attributeList.Add(ColorBPP / 4); // TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_BLUE_SIZE);
|
||||
attributeList.Add(ColorBPP / 4); // TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_ALPHA_SIZE);
|
||||
attributeList.Add(ColorBPP / 4); // TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_DEPTH_SIZE);
|
||||
attributeList.Add(DepthBPP);
|
||||
|
||||
attributeList.Add(GLX_STENCIL_SIZE);
|
||||
attributeList.Add(StencilBPP);
|
||||
|
||||
//attributeList.Add(GLX_AUX_BUFFERS);
|
||||
//attributeList.Add(Buffers);
|
||||
|
||||
attributeList.Add(GLX_ACCUM_RED_SIZE);
|
||||
attributeList.Add(AccumulatorBPP / 4);// TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_ACCUM_GREEN_SIZE);
|
||||
attributeList.Add(AccumulatorBPP / 4);// TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_ACCUM_BLUE_SIZE);
|
||||
attributeList.Add(AccumulatorBPP / 4);// TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_ACCUM_ALPHA_SIZE);
|
||||
attributeList.Add(AccumulatorBPP / 4);// TODO support 16-bit
|
||||
|
||||
attributeList.Add(GLX_NONE);
|
||||
|
||||
return attributeList;
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport(UnixLibX11Name, EntryPoint = "XGetVisualInfo")]
|
||||
static extern IntPtr XGetVisualInfoInternal(IntPtr display, IntPtr vinfo_mask, ref XVisualInfo template, out int nitems);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(UnixLibX11Name)]
|
||||
static extern void XFree(IntPtr handle);
|
||||
|
||||
/// <summary> Returns the X resource (window or pixmap) belonging to a GdkDrawable. </summary>
|
||||
/// <remarks> XID gdk_x11_drawable_get_xid(GdkDrawable *drawable); </remarks>
|
||||
/// <param name="gdkDisplay"> The GdkDrawable. </param>
|
||||
/// <returns> The ID of drawable's X resource. </returns>
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(UnixLibGdkName)]
|
||||
static extern IntPtr gdk_x11_drawable_get_xid(IntPtr gdkDisplay);
|
||||
|
||||
/// <summary> Returns the X resource (window or pixmap) belonging to a GdkDrawable. </summary>
|
||||
/// <remarks> XID gdk_x11_drawable_get_xid(GdkDrawable *drawable); </remarks>
|
||||
/// <param name="gdkDisplay"> The GdkDrawable. </param>
|
||||
/// <returns> The ID of drawable's X resource. </returns>
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(UnixLibGdkName)]
|
||||
static extern IntPtr gdk_x11_window_get_xid(IntPtr gdkDisplay);
|
||||
|
||||
/// <summary> Returns the X display of a GdkDisplay. </summary>
|
||||
/// <remarks> Display* gdk_x11_display_get_xdisplay(GdkDisplay *display); </remarks>
|
||||
/// <param name="gdkDisplay"> The GdkDrawable. </param>
|
||||
/// <returns> The X Display of the GdkDisplay. </returns>
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(UnixLibGdkName)]
|
||||
static extern IntPtr gdk_x11_display_get_xdisplay(IntPtr gdkDisplay);
|
||||
|
||||
[SuppressUnmanagedCodeSecurity, DllImport(UnixLibGLName)]
|
||||
static extern IntPtr glXChooseVisual(IntPtr display, int screen, int[] attr);
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="14.0">
|
||||
<PropertyGroup>
|
||||
<ProjectType>Local</ProjectType>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
|
@ -41,13 +41,17 @@
|
|||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<Deterministic>true</Deterministic>
|
||||
<LangVersion>7</LangVersion>
|
||||
<RunCodeAnalysis>true</RunCodeAnalysis>
|
||||
<CodeAnalysisRuleSet>..\..\stylecop.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>DEBUG;TRACE;</DefineConstants>
|
||||
<DefineConstants>DEBUG;TRACE;GTK3;</DefineConstants>
|
||||
<DocumentationFile>bin\Debug\OpenTK.GLWidget.xml</DocumentationFile>
|
||||
<DebugSymbols>True</DebugSymbols>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
|
@ -56,7 +60,6 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>full</DebugType>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
|
@ -65,7 +68,7 @@
|
|||
<BaseAddress>285212672</BaseAddress>
|
||||
<ConfigurationOverrideFile>
|
||||
</ConfigurationOverrideFile>
|
||||
<DefineConstants>TRACE;</DefineConstants>
|
||||
<DefineConstants>TRACE;GTK3;</DefineConstants>
|
||||
<DocumentationFile>bin\Release\OpenTK.GLWidget.xml</DocumentationFile>
|
||||
<FileAlignment>4096</FileAlignment>
|
||||
<Optimize>True</Optimize>
|
||||
|
@ -73,8 +76,7 @@
|
|||
<RegisterForComInterop>False</RegisterForComInterop>
|
||||
<RemoveIntegerChecks>False</RemoveIntegerChecks>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<DebugType>none</DebugType>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
|
@ -87,12 +89,6 @@
|
|||
<Reference Include="System">
|
||||
<Name>System</Name>
|
||||
</Reference>
|
||||
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenTK\OpenTK.csproj">
|
||||
|
@ -111,35 +107,78 @@
|
|||
<None Include="paket.references" />
|
||||
<None Include="paket.template" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<AdditionalFiles Include="$(SolutionDir)\stylecop.ruleset">
|
||||
<Link>stylecop.ruleset</Link>
|
||||
</AdditionalFiles>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
|
||||
<PropertyGroup>
|
||||
<__paket__GtkSharp_targets>net45\GtkSharp</__paket__GtkSharp_targets>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition="$(TargetFrameworkIdentifier) == '.NETFramework' And ($(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3')">
|
||||
<When Condition="($(DefineConstants.Contains('GTK3')) And ($(TargetFrameworkVersion) == 'v4.0' Or $(TargetFrameworkVersion) == 'v4.0.3' Or $(TargetFrameworkVersion) == 'v4.5' Or $(TargetFrameworkVersion) == 'v4.5.1' Or $(TargetFrameworkVersion) == 'v4.5.2' Or $(TargetFrameworkVersion) == 'v4.5.3' Or $(TargetFrameworkVersion) == 'v4.6' Or $(TargetFrameworkVersion) == 'v4.6.1' Or $(TargetFrameworkVersion) == 'v4.6.2' Or $(TargetFrameworkVersion) == 'v4.6.3' Or $(TargetFrameworkVersion) == 'v4.7'))">
|
||||
<ItemGroup>
|
||||
<Reference Include="cairo-sharp">
|
||||
<HintPath>..\..\packages\GtkSharp\lib\net45\cairo-sharp.dll</HintPath>
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\cairo-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="gio-sharp">
|
||||
<HintPath>..\..\packages\GtkSharp\lib\net45\gio-sharp.dll</HintPath>
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\gio-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="gtk-dotnet">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\gtk-dotnet.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="atk-sharp">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\atk-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="gdk-sharp">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\gdk-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="glib-sharp">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\glib-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="gtk-sharp">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\gtk-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
<Reference Include="pango-sharp">
|
||||
<HintPath>..\..\packages\gtk-sharp3\lib\net40\pango-sharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Paket>True</Paket>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
<Import Project="..\..\packages\GtkSharp\build\$(__paket__GtkSharp_targets).targets" Condition="Exists('..\..\packages\GtkSharp\build\$(__paket__GtkSharp_targets).targets')" Label="Paket" />
|
||||
<Import Project="..\..\packages\gtk-sharp3\build\gtk-sharp3.targets" Condition="Exists('..\..\packages\gtk-sharp3\build\gtk-sharp3.targets')" Label="Paket" />
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.CodeFixes.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
<Analyzer Include="..\..\packages\StyleCop.Analyzers\analyzers\dotnet\cs\StyleCop.Analyzers.dll">
|
||||
<Paket>True</Paket>
|
||||
</Analyzer>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -5,13 +5,18 @@ using System.Reflection;
|
|||
[assembly: AssemblyTitleAttribute("OpenTK.GLWidget")]
|
||||
[assembly: AssemblyProductAttribute("OpenTK")]
|
||||
[assembly: AssemblyDescriptionAttribute("A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.")]
|
||||
[assembly: AssemblyVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("2.0.0")]
|
||||
[assembly: AssemblyVersionAttribute("3.0.0")]
|
||||
[assembly: AssemblyFileVersionAttribute("3.0.0")]
|
||||
[assembly: CLSCompliantAttribute(true)]
|
||||
[assembly: AssemblyCopyrightAttribute("Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.")]
|
||||
namespace System {
|
||||
internal static class AssemblyVersionInformation {
|
||||
internal const string Version = "2.0.0";
|
||||
internal const string InformationalVersion = "2.0.0";
|
||||
internal const System.String AssemblyTitle = "OpenTK.GLWidget";
|
||||
internal const System.String AssemblyProduct = "OpenTK";
|
||||
internal const System.String AssemblyDescription = "A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.";
|
||||
internal const System.String AssemblyVersion = "3.0.0";
|
||||
internal const System.String AssemblyFileVersion = "3.0.0";
|
||||
internal const System.Boolean CLSCompliant = true;
|
||||
internal const System.String AssemblyCopyright = "Copyright (c) 2006 - 2016 Stefanos Apostolopoulos <stapostol@gmail.com> for the Open Toolkit library.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
GtkSharp
|
||||
gtk-sharp3
|
||||
StyleCop.Analyzers
|
|
@ -2,7 +2,7 @@ type project
|
|||
id OpenTK.GLWidget
|
||||
owners
|
||||
opentk thefiddler
|
||||
authors
|
||||
authors
|
||||
The Open Toolkit Team
|
||||
projectUrl
|
||||
http://www.opentk.com
|
||||
|
@ -19,5 +19,8 @@ tags
|
|||
summary
|
||||
A set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL.
|
||||
description
|
||||
The Open Toolkit is set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL. It runs on all major platforms and powers hundreds of apps, games and scientific research.
|
||||
The Open Toolkit is set of fast, low-level C# bindings for OpenGL, OpenGL ES and OpenAL. It runs on all major platforms and powers hundreds of apps, games and scientific research.
|
||||
OpenTK provides several utility libraries, including a math/linear algebra package, a windowing system, and input handling.
|
||||
include-pdbs true
|
||||
excludeddependencies
|
||||
StyleCop.Analyzers
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,7 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -41,20 +39,11 @@ namespace OpenTK.Audio
|
|||
/// </summary>
|
||||
public sealed class AudioCapture : IDisposable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
// This must stay private info so the end-user cannot call any Alc commands for the recording device.
|
||||
IntPtr Handle;
|
||||
private IntPtr Handle;
|
||||
|
||||
// Alc.CaptureStop should be called prior to device shutdown, this keeps track of Alc.CaptureStart/Stop calls.
|
||||
bool _isrecording = false;
|
||||
|
||||
ALFormat sample_format;
|
||||
int sample_frequency;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
static AudioCapture()
|
||||
{
|
||||
|
@ -80,27 +69,33 @@ namespace OpenTK.Audio
|
|||
public AudioCapture(string deviceName, int frequency, ALFormat sampleFormat, int bufferSize)
|
||||
{
|
||||
if (!AudioDeviceEnumerator.IsOpenALSupported)
|
||||
{
|
||||
throw new DllNotFoundException("openal32.dll");
|
||||
}
|
||||
if (frequency <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("frequency");
|
||||
}
|
||||
if (bufferSize <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("bufferSize");
|
||||
}
|
||||
|
||||
// Try to open specified device. If it fails, try to open default device.
|
||||
device_name = deviceName;
|
||||
CurrentDevice = deviceName;
|
||||
Handle = Alc.CaptureOpenDevice(deviceName, frequency, sampleFormat, bufferSize);
|
||||
|
||||
if (Handle == IntPtr.Zero)
|
||||
{
|
||||
Debug.WriteLine(ErrorMessage(deviceName, frequency, sampleFormat, bufferSize));
|
||||
device_name = "IntPtr.Zero";
|
||||
CurrentDevice = "IntPtr.Zero";
|
||||
Handle = Alc.CaptureOpenDevice(null, frequency, sampleFormat, bufferSize);
|
||||
}
|
||||
|
||||
if (Handle == IntPtr.Zero)
|
||||
{
|
||||
Debug.WriteLine(ErrorMessage("IntPtr.Zero", frequency, sampleFormat, bufferSize));
|
||||
device_name = AudioDeviceEnumerator.DefaultRecordingDevice;
|
||||
CurrentDevice = AudioDeviceEnumerator.DefaultRecordingDevice;
|
||||
Handle = Alc.CaptureOpenDevice(AudioDeviceEnumerator.DefaultRecordingDevice, frequency, sampleFormat, bufferSize);
|
||||
}
|
||||
|
||||
|
@ -108,7 +103,7 @@ namespace OpenTK.Audio
|
|||
{
|
||||
// Everything we tried failed. Capture may not be supported, bail out.
|
||||
Debug.WriteLine(ErrorMessage(AudioDeviceEnumerator.DefaultRecordingDevice, frequency, sampleFormat, bufferSize));
|
||||
device_name = "None";
|
||||
CurrentDevice = "None";
|
||||
|
||||
throw new AudioDeviceException("All attempts to open capture devices returned IntPtr.Zero. See debug log for verbose list.");
|
||||
}
|
||||
|
@ -120,28 +115,10 @@ namespace OpenTK.Audio
|
|||
SampleFrequency = frequency;
|
||||
}
|
||||
|
||||
#endregion Constructor
|
||||
|
||||
#region Public Members
|
||||
|
||||
#region CurrentDevice
|
||||
|
||||
private string device_name;
|
||||
|
||||
/// <summary>
|
||||
/// The name of the device associated with this instance.
|
||||
/// </summary>
|
||||
public string CurrentDevice
|
||||
{
|
||||
get
|
||||
{
|
||||
return device_name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AvailableDevices
|
||||
public string CurrentDevice { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of strings containing all known recording devices.
|
||||
|
@ -154,10 +131,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DefaultDevice
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the device that will be used as recording default.
|
||||
/// </summary>
|
||||
|
@ -169,10 +142,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CheckErrors
|
||||
|
||||
/// <summary>
|
||||
/// Checks for ALC error conditions.
|
||||
/// </summary>
|
||||
|
@ -185,10 +154,6 @@ namespace OpenTK.Audio
|
|||
new AudioDeviceErrorChecker(Handle).Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CurrentError
|
||||
|
||||
/// <summary>Returns the ALC error code for this device.</summary>
|
||||
public AlcError CurrentError
|
||||
{
|
||||
|
@ -198,10 +163,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Start & Stop
|
||||
|
||||
/// <summary>
|
||||
/// Start recording samples.
|
||||
/// The number of available samples can be obtained through the <see cref="AvailableSamples"/> property.
|
||||
|
@ -210,20 +171,16 @@ namespace OpenTK.Audio
|
|||
public void Start()
|
||||
{
|
||||
Alc.CaptureStart(Handle);
|
||||
_isrecording = true;
|
||||
IsRunning = true;
|
||||
}
|
||||
|
||||
/// <summary>Stop recording samples. This will not clear previously recorded samples.</summary>
|
||||
public void Stop()
|
||||
{
|
||||
Alc.CaptureStop(Handle);
|
||||
_isrecording = false;
|
||||
IsRunning = false;
|
||||
}
|
||||
|
||||
#endregion Start & Stop Capture
|
||||
|
||||
#region AvailableSamples
|
||||
|
||||
/// <summary>Returns the number of available samples for capture.</summary>
|
||||
public int AvailableSamples
|
||||
{
|
||||
|
@ -237,10 +194,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion Available samples property
|
||||
|
||||
#region ReadSamples
|
||||
|
||||
/// <summary>Fills the specified buffer with samples from the internal capture ring-buffer. This method does not block: it is an error to specify a sampleCount larger than AvailableSamples.</summary>
|
||||
/// <param name="buffer">A pointer to a previously initialized and pinned array.</param>
|
||||
/// <param name="sampleCount">The number of samples to be written to the buffer.</param>
|
||||
|
@ -258,7 +211,9 @@ namespace OpenTK.Audio
|
|||
where TBuffer : struct
|
||||
{
|
||||
if (buffer == null)
|
||||
{
|
||||
throw new ArgumentNullException("buffer");
|
||||
}
|
||||
|
||||
int buffer_size = BlittableValueType<TBuffer>.Stride * buffer.Length;
|
||||
// This is more of a heuristic than a 100% valid check. However, it will work
|
||||
|
@ -267,56 +222,33 @@ namespace OpenTK.Audio
|
|||
// be produced with compressed sample formats (which are very rare).
|
||||
// Still, this is better than no check at all.
|
||||
if (sampleCount * GetSampleSize(SampleFormat) > buffer_size)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("sampleCount");
|
||||
}
|
||||
|
||||
GCHandle buffer_ptr = GCHandle.Alloc(buffer, GCHandleType.Pinned);
|
||||
try { ReadSamples(buffer_ptr.AddrOfPinnedObject(), sampleCount); }
|
||||
finally { buffer_ptr.Free(); }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SampleFormat & SampleFrequency
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OpenTK.Audio.ALFormat for this instance.
|
||||
/// </summary>
|
||||
public ALFormat SampleFormat
|
||||
{
|
||||
get { return sample_format; }
|
||||
private set { sample_format = value; }
|
||||
}
|
||||
public ALFormat SampleFormat { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the sampling rate for this instance.
|
||||
/// </summary>
|
||||
public int SampleFrequency
|
||||
{
|
||||
get { return sample_frequency; }
|
||||
private set { sample_frequency = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsRunning
|
||||
public int SampleFrequency { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is currently capturing samples.
|
||||
/// </summary>
|
||||
public bool IsRunning
|
||||
{
|
||||
get { return _isrecording; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Members
|
||||
public bool IsRunning { get; private set; } = false;
|
||||
|
||||
// Retrieves the sample size in bytes for various ALFormats.
|
||||
// Compressed formats always return 1.
|
||||
static int GetSampleSize(ALFormat format)
|
||||
private static int GetSampleSize(ALFormat format)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
|
@ -350,7 +282,7 @@ namespace OpenTK.Audio
|
|||
}
|
||||
|
||||
// Converts an error code to an error string with additional information.
|
||||
string ErrorMessage(string devicename, int frequency, ALFormat bufferformat, int buffersize)
|
||||
private string ErrorMessage(string devicename, int frequency, ALFormat bufferformat, int buffersize)
|
||||
{
|
||||
string alcerrmsg;
|
||||
AlcError alcerrcode = CurrentError;
|
||||
|
@ -374,10 +306,6 @@ namespace OpenTK.Audio
|
|||
"\nBuffer Size: " + buffersize;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
/// <summary>
|
||||
/// Finalizes this instance.
|
||||
/// </summary>
|
||||
|
@ -401,15 +329,15 @@ namespace OpenTK.Audio
|
|||
{
|
||||
if (this.Handle != IntPtr.Zero)
|
||||
{
|
||||
if (this._isrecording)
|
||||
if (this.IsRunning)
|
||||
{
|
||||
this.Stop();
|
||||
}
|
||||
|
||||
Alc.CaptureCloseDevice(this.Handle);
|
||||
}
|
||||
this.IsDisposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Destructor
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,14 +22,10 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
|
@ -41,23 +36,14 @@ namespace OpenTK.Audio
|
|||
/// </summary>
|
||||
public sealed class AudioContext : IDisposable
|
||||
{
|
||||
#region --- Fields ---
|
||||
private bool disposed;
|
||||
private bool is_processing, is_synchronized;
|
||||
private ContextHandle context_handle;
|
||||
private bool context_exists;
|
||||
|
||||
bool disposed;
|
||||
bool is_processing, is_synchronized;
|
||||
IntPtr device_handle;
|
||||
ContextHandle context_handle;
|
||||
bool context_exists;
|
||||
|
||||
string device_name;
|
||||
static object audio_context_lock = new object();
|
||||
static Dictionary<ContextHandle, AudioContext> available_contexts = new Dictionary<ContextHandle, AudioContext>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Constructors ---
|
||||
|
||||
#region static AudioContext()
|
||||
private string device_name;
|
||||
private static object audio_context_lock = new object();
|
||||
private static Dictionary<ContextHandle, AudioContext> available_contexts = new Dictionary<ContextHandle, AudioContext>();
|
||||
|
||||
/// \internal
|
||||
/// <summary>
|
||||
|
@ -69,28 +55,16 @@ namespace OpenTK.Audio
|
|||
{ }
|
||||
}
|
||||
|
||||
#endregion static AudioContext()
|
||||
|
||||
#region public AudioContext()
|
||||
|
||||
/// <summary>Constructs a new AudioContext, using the default audio device.</summary>
|
||||
public AudioContext()
|
||||
: this(null, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device)
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new AudioContext instance.
|
||||
/// </summary>
|
||||
/// <param name="device">The device name that will host this instance.</param>
|
||||
public AudioContext(string device) : this(device, 0, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device, int freq)
|
||||
|
||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||
/// <param name="device">The name of the audio device to use.</param>
|
||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||
|
@ -100,10 +74,6 @@ namespace OpenTK.Audio
|
|||
/// </remarks>
|
||||
public AudioContext(string device, int freq) : this(device, freq, 0, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device, int freq, int refresh)
|
||||
|
||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||
/// <param name="device">The name of the audio device to use.</param>
|
||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||
|
@ -115,10 +85,6 @@ namespace OpenTK.Audio
|
|||
public AudioContext(string device, int freq, int refresh)
|
||||
: this(device, freq, refresh, false, true, MaxAuxiliarySends.UseDriverDefault) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device, int freq, int refresh, bool sync)
|
||||
|
||||
/// <summary>Constructs a new AudioContext, using the specified audio device and device parameters.</summary>
|
||||
/// <param name="device">The name of the audio device to use.</param>
|
||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||
|
@ -131,10 +97,6 @@ namespace OpenTK.Audio
|
|||
public AudioContext(string device, int freq, int refresh, bool sync)
|
||||
: this(AudioDeviceEnumerator.AvailablePlaybackDevices[0], freq, refresh, sync, true) { }
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device, int freq, int refresh, bool sync, bool enableEfx)
|
||||
|
||||
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
||||
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||
|
@ -165,10 +127,6 @@ namespace OpenTK.Audio
|
|||
CreateContext(device, freq, refresh, sync, enableEfx, MaxAuxiliarySends.UseDriverDefault);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public AudioContext(string device, int freq, int refresh, bool sync, bool enableEfx, MaxAuxiliarySends efxMaxAuxSends)
|
||||
|
||||
/// <summary>Creates the audio context using the specified device and device parameters.</summary>
|
||||
/// <param name="device">The device descriptor obtained through AudioContext.AvailableDevices.</param>
|
||||
/// <param name="freq">Frequency for mixing output buffer, in units of Hz. Pass 0 for driver default.</param>
|
||||
|
@ -200,14 +158,6 @@ namespace OpenTK.Audio
|
|||
CreateContext(device, freq, refresh, sync, enableEfx, efxMaxAuxSends);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion --- Constructors ---
|
||||
|
||||
#region --- Private Methods ---
|
||||
|
||||
#region CreateContext
|
||||
|
||||
/// <summary>May be passed at context construction time to indicate the number of desired auxiliary effect slot sends per source.</summary>
|
||||
public enum MaxAuxiliarySends:int
|
||||
{
|
||||
|
@ -249,34 +199,47 @@ namespace OpenTK.Audio
|
|||
/// Values higher than supported will be clamped by the driver.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
void CreateContext(string device, int freq, int refresh, bool sync, bool enableEfx, MaxAuxiliarySends efxAuxiliarySends)
|
||||
private void CreateContext(string device, int freq, int refresh, bool sync, bool enableEfx, MaxAuxiliarySends efxAuxiliarySends)
|
||||
{
|
||||
if (!AudioDeviceEnumerator.IsOpenALSupported)
|
||||
{
|
||||
throw new DllNotFoundException("openal32.dll");
|
||||
}
|
||||
|
||||
if (AudioDeviceEnumerator.Version == AudioDeviceEnumerator.AlcVersion.Alc1_1 && AudioDeviceEnumerator.AvailablePlaybackDevices.Count == 0) // Alc 1.0 does not support device enumeration.
|
||||
{
|
||||
throw new NotSupportedException("No audio hardware is available.");
|
||||
if (context_exists) throw new NotSupportedException("Multiple AudioContexts are not supported.");
|
||||
if (freq < 0) throw new ArgumentOutOfRangeException("freq", freq, "Should be greater than zero.");
|
||||
if (refresh < 0) throw new ArgumentOutOfRangeException("refresh", refresh, "Should be greater than zero.");
|
||||
}
|
||||
if (context_exists)
|
||||
{
|
||||
throw new NotSupportedException("Multiple AudioContexts are not supported.");
|
||||
}
|
||||
if (freq < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("freq", freq, "Should be greater than zero.");
|
||||
}
|
||||
if (refresh < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("refresh", refresh, "Should be greater than zero.");
|
||||
}
|
||||
|
||||
|
||||
if (!String.IsNullOrEmpty(device))
|
||||
{
|
||||
device_name = device;
|
||||
device_handle = Alc.OpenDevice(device); // try to open device by name
|
||||
Device = Alc.OpenDevice(device); // try to open device by name
|
||||
}
|
||||
if (device_handle == IntPtr.Zero)
|
||||
if (Device == IntPtr.Zero)
|
||||
{
|
||||
device_name = "IntPtr.Zero (null string)";
|
||||
device_handle = Alc.OpenDevice(null); // try to open unnamed default device
|
||||
Device = Alc.OpenDevice(null); // try to open unnamed default device
|
||||
}
|
||||
if (device_handle == IntPtr.Zero)
|
||||
if (Device == IntPtr.Zero)
|
||||
{
|
||||
device_name = AudioContext.DefaultDevice;
|
||||
device_handle = Alc.OpenDevice(AudioContext.DefaultDevice); // try to open named default device
|
||||
Device = Alc.OpenDevice(AudioContext.DefaultDevice); // try to open named default device
|
||||
}
|
||||
if (device_handle == IntPtr.Zero)
|
||||
if (Device == IntPtr.Zero)
|
||||
{
|
||||
device_name = "None";
|
||||
throw new AudioDeviceException(String.Format("Audio device '{0}' does not exist or is tied up by another application.",
|
||||
|
@ -303,7 +266,7 @@ namespace OpenTK.Audio
|
|||
attributes.Add((int)AlcContextAttributes.Sync);
|
||||
attributes.Add(sync ? 1 : 0);
|
||||
|
||||
if (enableEfx && Alc.IsExtensionPresent(device_handle, "ALC_EXT_EFX"))
|
||||
if (enableEfx && Alc.IsExtensionPresent(Device, "ALC_EXT_EFX"))
|
||||
{
|
||||
int num_slots;
|
||||
switch (efxAuxiliarySends)
|
||||
|
@ -316,20 +279,20 @@ namespace OpenTK.Audio
|
|||
break;
|
||||
default:
|
||||
case MaxAuxiliarySends.UseDriverDefault:
|
||||
Alc.GetInteger(device_handle, AlcGetInteger.EfxMaxAuxiliarySends, 1, out num_slots);
|
||||
Alc.GetInteger(Device, AlcGetInteger.EfxMaxAuxiliarySends, 1, out num_slots);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
attributes.Add((int)AlcContextAttributes.EfxMaxAuxiliarySends);
|
||||
attributes.Add(num_slots);
|
||||
}
|
||||
attributes.Add(0);
|
||||
|
||||
context_handle = Alc.CreateContext(device_handle, attributes.ToArray());
|
||||
context_handle = Alc.CreateContext(Device, attributes.ToArray());
|
||||
|
||||
if (context_handle == ContextHandle.Zero)
|
||||
{
|
||||
Alc.CloseDevice(device_handle);
|
||||
Alc.CloseDevice(Device);
|
||||
throw new AudioContextException("The audio context could not be created with the specified parameters.");
|
||||
}
|
||||
|
||||
|
@ -339,12 +302,14 @@ namespace OpenTK.Audio
|
|||
// an old OpenAL version is detect - it may affect outdated OpenAL versions different than OpenAL SI,
|
||||
// but it looks like a good compromise for now.
|
||||
if (AudioDeviceEnumerator.AvailablePlaybackDevices.Count > 0)
|
||||
{
|
||||
MakeCurrent();
|
||||
}
|
||||
|
||||
CheckErrors();
|
||||
|
||||
device_name = Alc.GetString(device_handle, AlcGetString.DeviceSpecifier);
|
||||
|
||||
device_name = Alc.GetString(Device, AlcGetString.DeviceSpecifier);
|
||||
|
||||
|
||||
lock (audio_context_lock)
|
||||
{
|
||||
|
@ -353,10 +318,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion --- Private Methods ---
|
||||
|
||||
#region static void MakeCurrent(AudioContext context)
|
||||
|
||||
/// \internal
|
||||
/// <summary>Makes the specified AudioContext current in the calling thread.</summary>
|
||||
/// <param name="context">The OpenTK.Audio.AudioContext to make current, or null.</param>
|
||||
|
@ -366,21 +327,19 @@ namespace OpenTK.Audio
|
|||
/// <exception cref="AudioContextException">
|
||||
/// Occurs when the AudioContext could not be made current.
|
||||
/// </exception>
|
||||
static void MakeCurrent(AudioContext context)
|
||||
private static void MakeCurrent(AudioContext context)
|
||||
{
|
||||
lock (audio_context_lock)
|
||||
{
|
||||
if (!Alc.MakeContextCurrent(context != null ? context.context_handle : ContextHandle.Zero))
|
||||
{
|
||||
throw new AudioContextException(String.Format("ALC {0} error detected at {1}.",
|
||||
Alc.GetError(context != null ? (IntPtr)context.context_handle : IntPtr.Zero).ToString(),
|
||||
context != null ? context.ToString() : "null"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region internal bool IsCurrent
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a System.Boolean indicating whether the AudioContext
|
||||
/// is current.
|
||||
|
@ -396,7 +355,9 @@ namespace OpenTK.Audio
|
|||
lock (audio_context_lock)
|
||||
{
|
||||
if (available_contexts.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return AudioContext.CurrentContext == this;
|
||||
|
@ -405,24 +366,18 @@ namespace OpenTK.Audio
|
|||
}
|
||||
set
|
||||
{
|
||||
if (value) AudioContext.MakeCurrent(this);
|
||||
else AudioContext.MakeCurrent(null);
|
||||
if (value)
|
||||
{
|
||||
AudioContext.MakeCurrent(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
AudioContext.MakeCurrent(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IntPtr Device
|
||||
|
||||
IntPtr Device { get { return device_handle; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Public Members ---
|
||||
|
||||
#region CheckErrors
|
||||
private IntPtr Device { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks for ALC error conditions.
|
||||
|
@ -434,15 +389,13 @@ namespace OpenTK.Audio
|
|||
public void CheckErrors()
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
new AudioDeviceErrorChecker(device_handle).Dispose();
|
||||
new AudioDeviceErrorChecker(Device).Dispose();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CurrentError
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ALC error code for this instance.
|
||||
/// </summary>
|
||||
|
@ -451,16 +404,14 @@ namespace OpenTK.Audio
|
|||
get
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
return Alc.GetError(device_handle);
|
||||
return Alc.GetError(Device);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region MakeCurrent
|
||||
|
||||
/// <summary>Makes the AudioContext current in the calling thread.</summary>
|
||||
/// <exception cref="ObjectDisposedException">
|
||||
/// Occurs if this function is called after the AudioContext has been disposed.
|
||||
|
@ -475,15 +426,13 @@ namespace OpenTK.Audio
|
|||
public void MakeCurrent()
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
AudioContext.MakeCurrent(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsProcessing
|
||||
|
||||
/// <summary>
|
||||
/// Gets a System.Boolean indicating whether the AudioContext is
|
||||
/// currently processing audio events.
|
||||
|
@ -495,17 +444,15 @@ namespace OpenTK.Audio
|
|||
get
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
return is_processing;
|
||||
}
|
||||
private set { is_processing = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IsSynchronized
|
||||
|
||||
/// <summary>
|
||||
/// Gets a System.Boolean indicating whether the AudioContext is
|
||||
/// synchronized.
|
||||
|
@ -516,17 +463,15 @@ namespace OpenTK.Audio
|
|||
get
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
return is_synchronized;
|
||||
}
|
||||
private set { is_synchronized = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public void Process
|
||||
|
||||
/// <summary>
|
||||
/// Processes queued audio events.
|
||||
/// </summary>
|
||||
|
@ -548,16 +493,14 @@ namespace OpenTK.Audio
|
|||
public void Process()
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
Alc.ProcessContext(this.context_handle);
|
||||
IsProcessing = true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public void Suspend
|
||||
|
||||
/// <summary>
|
||||
/// Suspends processing of audio events.
|
||||
/// </summary>
|
||||
|
@ -581,16 +524,14 @@ namespace OpenTK.Audio
|
|||
public void Suspend()
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
Alc.SuspendContext(this.context_handle);
|
||||
IsProcessing = false;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public bool SupportsExtension(string extension)
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether the specified OpenAL extension is supported.
|
||||
/// </summary>
|
||||
|
@ -599,15 +540,13 @@ namespace OpenTK.Audio
|
|||
public bool SupportsExtension(string extension)
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
return Alc.IsExtensionPresent(this.Device, extension);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region CurrentDevice
|
||||
|
||||
/// <summary>
|
||||
/// Gets a System.String with the name of the device used in this context.
|
||||
/// </summary>
|
||||
|
@ -616,20 +555,14 @@ namespace OpenTK.Audio
|
|||
get
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
throw new ObjectDisposedException(this.GetType().FullName);
|
||||
}
|
||||
|
||||
return device_name;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion --- Public Members ---
|
||||
|
||||
#region --- Static Members ---
|
||||
|
||||
#region public static AudioContext CurrentContext
|
||||
|
||||
/// <summary>
|
||||
/// Gets the OpenTK.Audio.AudioContext which is current in the application.
|
||||
/// </summary>
|
||||
|
@ -644,7 +577,9 @@ namespace OpenTK.Audio
|
|||
lock (audio_context_lock)
|
||||
{
|
||||
if (available_contexts.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
AudioContext context;
|
||||
|
@ -657,10 +592,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region AvailableDevices
|
||||
|
||||
/// <summary>
|
||||
/// Returns a list of strings containing all known playback devices.
|
||||
/// </summary>
|
||||
|
@ -671,10 +602,6 @@ namespace OpenTK.Audio
|
|||
return AudioDeviceEnumerator.AvailablePlaybackDevices;
|
||||
}
|
||||
}
|
||||
#endregion public static IList<string> AvailablePlaybackDevices
|
||||
|
||||
#region DefaultDevice
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the device that will be used as playback default.
|
||||
/// </summary>
|
||||
|
@ -686,12 +613,6 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- IDisposable Members ---
|
||||
|
||||
/// <summary>
|
||||
/// Disposes of the AudioContext, cleaning up all resources consumed by it.
|
||||
/// </summary>
|
||||
|
@ -701,12 +622,14 @@ namespace OpenTK.Audio
|
|||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
void Dispose(bool manual)
|
||||
private void Dispose(bool manual)
|
||||
{
|
||||
if (!disposed)
|
||||
{
|
||||
if (this.IsCurrent)
|
||||
{
|
||||
this.IsCurrent = false;
|
||||
}
|
||||
|
||||
if (context_handle != ContextHandle.Zero)
|
||||
{
|
||||
|
@ -714,8 +637,10 @@ namespace OpenTK.Audio
|
|||
Alc.DestroyContext(context_handle);
|
||||
}
|
||||
|
||||
if (device_handle != IntPtr.Zero)
|
||||
Alc.CloseDevice(device_handle);
|
||||
if (Device != IntPtr.Zero)
|
||||
{
|
||||
Alc.CloseDevice(Device);
|
||||
}
|
||||
|
||||
if (manual)
|
||||
{
|
||||
|
@ -732,10 +657,6 @@ namespace OpenTK.Audio
|
|||
this.Dispose(false);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region --- Overrides ---
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the hash code for this instance.
|
||||
/// </summary>
|
||||
|
@ -762,9 +683,7 @@ namespace OpenTK.Audio
|
|||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0} (handle: {1}, device: {2})",
|
||||
this.device_name, this.context_handle, this.device_handle);
|
||||
this.device_name, this.context_handle, this.Device);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,13 +22,8 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>Represents exceptions related to an OpenTK.Audio.AudioContext.</summary>
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#region License
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
|
@ -6,7 +5,7 @@
|
|||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,11 +22,9 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
@ -36,8 +33,6 @@ namespace OpenTK.Audio
|
|||
{
|
||||
internal static class AudioDeviceEnumerator
|
||||
{
|
||||
#region All device strings
|
||||
|
||||
private static readonly List<string> available_playback_devices = new List<string>();
|
||||
private static readonly List<string> available_recording_devices = new List<string>();
|
||||
|
||||
|
@ -56,44 +51,11 @@ namespace OpenTK.Audio
|
|||
}
|
||||
}
|
||||
|
||||
#endregion All device strings
|
||||
internal static string DefaultPlaybackDevice { get; }
|
||||
|
||||
#region Default device strings
|
||||
internal static string DefaultRecordingDevice { get; }
|
||||
|
||||
private static string default_playback_device;
|
||||
internal static string DefaultPlaybackDevice
|
||||
{
|
||||
get
|
||||
{
|
||||
return default_playback_device;
|
||||
}
|
||||
}
|
||||
|
||||
private static string default_recording_device;
|
||||
internal static string DefaultRecordingDevice
|
||||
{
|
||||
get
|
||||
{
|
||||
return default_recording_device;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Default device strings
|
||||
|
||||
#region Is OpenAL supported?
|
||||
|
||||
private static bool openal_supported = true;
|
||||
internal static bool IsOpenALSupported
|
||||
{
|
||||
get
|
||||
{
|
||||
return openal_supported;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Is OpenAL supported?
|
||||
|
||||
#region Alc Version number
|
||||
internal static bool IsOpenALSupported { get; } = true;
|
||||
|
||||
internal enum AlcVersion
|
||||
{
|
||||
|
@ -101,18 +63,7 @@ namespace OpenTK.Audio
|
|||
Alc1_1
|
||||
}
|
||||
|
||||
private static AlcVersion version;
|
||||
internal static AlcVersion Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return version;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Alc Version number
|
||||
|
||||
#region Constructors
|
||||
internal static AlcVersion Version { get; }
|
||||
|
||||
// Loads all available audio devices into the available_*_devices lists.
|
||||
static AudioDeviceEnumerator()
|
||||
|
@ -141,32 +92,34 @@ namespace OpenTK.Audio
|
|||
// Get a list of all known playback devices, using best extension available
|
||||
if (Alc.IsExtensionPresent(IntPtr.Zero, "ALC_ENUMERATION_EXT"))
|
||||
{
|
||||
version = AlcVersion.Alc1_1;
|
||||
Version = AlcVersion.Alc1_1;
|
||||
if (Alc.IsExtensionPresent(IntPtr.Zero, "ALC_ENUMERATE_ALL_EXT"))
|
||||
{
|
||||
available_playback_devices.AddRange(Alc.GetString(IntPtr.Zero, AlcGetStringList.AllDevicesSpecifier));
|
||||
default_playback_device = Alc.GetString(IntPtr.Zero, AlcGetString.DefaultAllDevicesSpecifier);
|
||||
DefaultPlaybackDevice = Alc.GetString(IntPtr.Zero, AlcGetString.DefaultAllDevicesSpecifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
available_playback_devices.AddRange(Alc.GetString(IntPtr.Zero, AlcGetStringList.DeviceSpecifier));
|
||||
default_playback_device = Alc.GetString(IntPtr.Zero, AlcGetString.DefaultDeviceSpecifier);
|
||||
DefaultPlaybackDevice = Alc.GetString(IntPtr.Zero, AlcGetString.DefaultDeviceSpecifier);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
version = AlcVersion.Alc1_0;
|
||||
Version = AlcVersion.Alc1_0;
|
||||
Debug.Print("Device enumeration extension not available. Failed to enumerate playback devices.");
|
||||
}
|
||||
AlcError playback_err = Alc.GetError(dummy_device);
|
||||
if (playback_err != AlcError.NoError)
|
||||
{
|
||||
throw new AudioContextException("Alc Error occured when querying available playback devices. " + playback_err.ToString());
|
||||
}
|
||||
|
||||
// Get a list of all known recording devices, at least ALC_ENUMERATION_EXT is needed too
|
||||
if (version == AlcVersion.Alc1_1 && Alc.IsExtensionPresent(IntPtr.Zero, "ALC_EXT_CAPTURE"))
|
||||
if (Version == AlcVersion.Alc1_1 && Alc.IsExtensionPresent(IntPtr.Zero, "ALC_EXT_CAPTURE"))
|
||||
{
|
||||
available_recording_devices.AddRange(Alc.GetString(IntPtr.Zero, AlcGetStringList.CaptureDeviceSpecifier));
|
||||
default_recording_device = Alc.GetString(IntPtr.Zero, AlcGetString.CaptureDefaultDeviceSpecifier);
|
||||
DefaultRecordingDevice = Alc.GetString(IntPtr.Zero, AlcGetString.CaptureDefaultDeviceSpecifier);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -174,55 +127,63 @@ namespace OpenTK.Audio
|
|||
}
|
||||
AlcError record_err = Alc.GetError(dummy_device);
|
||||
if (record_err != AlcError.NoError)
|
||||
{
|
||||
throw new AudioContextException("Alc Error occured when querying available recording devices. " + record_err.ToString());
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
Debug.WriteLine("Found playback devices:");
|
||||
foreach (string s in available_playback_devices)
|
||||
{
|
||||
Debug.WriteLine(s);
|
||||
}
|
||||
|
||||
Debug.WriteLine("Default playback device: " + default_playback_device);
|
||||
Debug.WriteLine("Default playback device: " + DefaultPlaybackDevice);
|
||||
|
||||
Debug.WriteLine("Found recording devices:");
|
||||
foreach (string s in available_recording_devices)
|
||||
{
|
||||
Debug.WriteLine(s);
|
||||
}
|
||||
|
||||
Debug.WriteLine("Default recording device: " + default_recording_device);
|
||||
Debug.WriteLine("Default recording device: " + DefaultRecordingDevice);
|
||||
#endif
|
||||
}
|
||||
catch (DllNotFoundException e)
|
||||
{
|
||||
Trace.WriteLine(e.ToString());
|
||||
openal_supported = false;
|
||||
IsOpenALSupported = false;
|
||||
}
|
||||
catch (AudioContextException ace)
|
||||
{
|
||||
Trace.WriteLine(ace.ToString());
|
||||
openal_supported = false;
|
||||
IsOpenALSupported = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Debug.Unindent();
|
||||
|
||||
if (openal_supported)
|
||||
if (IsOpenALSupported)
|
||||
{
|
||||
try
|
||||
{
|
||||
// clean up the dummy context
|
||||
Alc.MakeContextCurrent(ContextHandle.Zero);
|
||||
if (dummy_context != ContextHandle.Zero && dummy_context.Handle != IntPtr.Zero)
|
||||
{
|
||||
Alc.DestroyContext(dummy_context);
|
||||
}
|
||||
if (dummy_device != IntPtr.Zero)
|
||||
{
|
||||
Alc.CloseDevice(dummy_device);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
openal_supported = false;
|
||||
IsOpenALSupported = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,39 +22,27 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using OpenTK.Audio.OpenAL;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
struct AudioDeviceErrorChecker : IDisposable
|
||||
internal struct AudioDeviceErrorChecker : IDisposable
|
||||
{
|
||||
#region Fields
|
||||
|
||||
readonly IntPtr Device;
|
||||
static readonly string ErrorString = "Device {0} reported {1}.";
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
private readonly IntPtr Device;
|
||||
private static readonly string ErrorString = "Device {0} reported {1}.";
|
||||
|
||||
public AudioDeviceErrorChecker(IntPtr device)
|
||||
{
|
||||
if (device == IntPtr.Zero)
|
||||
{
|
||||
throw new AudioDeviceException();
|
||||
}
|
||||
|
||||
Device = device;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IDisposable Members
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
AlcError err = Alc.GetError(Device);
|
||||
|
@ -63,23 +50,21 @@ namespace OpenTK.Audio
|
|||
{
|
||||
case AlcError.OutOfMemory:
|
||||
throw new OutOfMemoryException(String.Format(ErrorString, Device, err));
|
||||
|
||||
|
||||
case AlcError.InvalidValue:
|
||||
throw new AudioValueException(String.Format(ErrorString, Device, err));
|
||||
|
||||
|
||||
case AlcError.InvalidDevice:
|
||||
throw new AudioDeviceException(String.Format(ErrorString, Device, err));
|
||||
|
||||
|
||||
case AlcError.InvalidContext:
|
||||
throw new AudioContextException(String.Format(ErrorString, Device, err));
|
||||
|
||||
|
||||
case AlcError.NoError:
|
||||
default:
|
||||
// everything went fine, do nothing
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,13 +22,8 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
/// <summary>Represents exceptions related to an OpenTK.Audio device.</summary>
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,12 +22,9 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
@ -39,6 +35,6 @@ namespace OpenTK.Audio
|
|||
public AudioException() : base() { }
|
||||
/// <summary>Constructs a new AudioException with the specified error message.</summary>
|
||||
/// <param name="message">The error message of the AudioException.</param>
|
||||
public AudioException(string message) : base(message) { }
|
||||
public AudioException(string message) : base(message) { }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#region License
|
||||
//
|
||||
//
|
||||
// The Open Toolkit Library License
|
||||
//
|
||||
// Copyright (c) 2006 - 2009 the Open Toolkit library.
|
||||
//
|
||||
// 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
|
||||
// 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:
|
||||
|
@ -23,11 +22,6 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
// OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenTK.Audio
|
||||
{
|
||||
|
|
|
@ -1,64 +1,60 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlFunctions.cs
|
||||
/* AlFunctions.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Al.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
|
||||
using OpenTK;
|
||||
|
||||
/* Type Mapping
|
||||
// 8-bit boolean
|
||||
// 8-bit boolean
|
||||
typedef char ALboolean;
|
||||
* bool
|
||||
// character
|
||||
// character
|
||||
typedef char ALchar;
|
||||
* byte
|
||||
// signed 8-bit 2's complement integer
|
||||
// signed 8-bit 2's complement integer
|
||||
typedef char ALbyte;
|
||||
* byte
|
||||
|
||||
// unsigned 8-bit integer
|
||||
// unsigned 8-bit integer
|
||||
typedef unsigned char ALubyte;
|
||||
* byte
|
||||
|
||||
// signed 16-bit 2's complement integer
|
||||
// signed 16-bit 2's complement integer
|
||||
typedef short ALshort;
|
||||
* short
|
||||
|
||||
// unsigned 16-bit integer
|
||||
// unsigned 16-bit integer
|
||||
typedef unsigned short ALushort;
|
||||
* ushort
|
||||
|
||||
// unsigned 32-bit integer
|
||||
// unsigned 32-bit integer
|
||||
typedef unsigned int ALuint;
|
||||
* uint
|
||||
|
||||
// signed 32-bit 2's complement integer
|
||||
|
||||
// signed 32-bit 2's complement integer
|
||||
typedef int ALint;
|
||||
* int
|
||||
// non-negative 32-bit binary integer size
|
||||
// non-negative 32-bit binary integer size
|
||||
typedef int ALsizei;
|
||||
* int
|
||||
// enumerated 32-bit value
|
||||
typedef int ALenum;
|
||||
* int
|
||||
|
||||
// 32-bit IEEE754 floating-point
|
||||
// 32-bit IEEE754 floating-point
|
||||
typedef float ALfloat;
|
||||
* float
|
||||
|
||||
// 64-bit IEEE754 floating-point
|
||||
// 64-bit IEEE754 floating-point
|
||||
typedef double ALdouble;
|
||||
* double
|
||||
|
||||
// void type (for opaque pointers only)
|
||||
// void type (for opaque pointers only)
|
||||
typedef void ALvoid;
|
||||
* void
|
||||
*/
|
||||
|
@ -71,15 +67,9 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static partial class AL
|
||||
{
|
||||
|
||||
#region Constants
|
||||
|
||||
internal const string Lib = "openal32.dll";
|
||||
private const CallingConvention Style = CallingConvention.Cdecl;
|
||||
|
||||
#endregion Constants
|
||||
|
||||
#region Renderer State management
|
||||
|
||||
/// <summary>This function enables a feature of the OpenAL driver. There are no capabilities defined in OpenAL 1.1 to be used with this function, but it may be used by an extension.</summary>
|
||||
/// <param name="capability">The name of a capability to enable.</param>
|
||||
[DllImport(AL.Lib, EntryPoint = "alEnable", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -90,18 +80,14 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="capability">The name of a capability to disable.</param>
|
||||
[DllImport(AL.Lib, EntryPoint = "alDisable", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void Disable(ALCapability capability);
|
||||
// AL_API void AL_APIENTRY alDisable( ALenum capability );
|
||||
// AL_API void AL_APIENTRY alDisable( ALenum capability );
|
||||
|
||||
/// <summary>This function returns a boolean indicating if a specific feature is enabled in the OpenAL driver.</summary>
|
||||
/// <param name="capability">The name of a capability to enable.</param>
|
||||
/// <returns>True if enabled, False if disabled.</returns>
|
||||
[DllImport(AL.Lib, EntryPoint = "alIsEnabled", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern bool IsEnabled(ALCapability capability);
|
||||
// AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
||||
|
||||
#endregion Renderer State management
|
||||
|
||||
#region State retrieval
|
||||
// AL_API ALboolean AL_APIENTRY alIsEnabled( ALenum capability );
|
||||
|
||||
[DllImport(AL.Lib, EntryPoint = "alGetString", ExactSpelling = true, CallingConvention = AL.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
private static extern IntPtr GetStringPrivate(ALGetString param); // accepts the enums AlError, AlContextString
|
||||
|
@ -168,10 +154,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern ALError GetError();
|
||||
// AL_API ALenum AL_APIENTRY alGetError( void );
|
||||
|
||||
#endregion State retrieval
|
||||
|
||||
#region Extension support.
|
||||
|
||||
///<summary>This function tests if a specific Extension is available for the OpenAL driver.</summary>
|
||||
/// <param name="extname">A string naming the desired extension. Example: "EAX-RAM"</param>
|
||||
/// <returns>Returns True if the Extension is available or False if not available.</returns>
|
||||
|
@ -193,12 +175,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern int GetEnumValue([In] string ename);
|
||||
// AL_API ALenum AL_APIENTRY alGetEnumValue( const ALchar* ename );
|
||||
|
||||
#endregion Extension support.
|
||||
|
||||
/* Listener
|
||||
* Listener represents the location and orientation of the
|
||||
* 'user' in 3D-space.
|
||||
*
|
||||
*
|
||||
* Properties include: -
|
||||
*
|
||||
* Gain AL_GAIN ALfloat
|
||||
|
@ -207,8 +187,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
* Orientation AL_ORIENTATION ALfloat[6] (Forward then Up vectors)
|
||||
*/
|
||||
|
||||
#region Set Listener parameters
|
||||
|
||||
/// <summary>This function sets a floating-point property for the listener.</summary>
|
||||
/// <param name="param">The name of the attribute to be set: ALListenerf.Gain</param>
|
||||
/// <param name="value">The float value to set the attribute to.</param>
|
||||
|
@ -281,10 +259,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
// AL_API void AL_APIENTRY alListener3i( ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
// AL_API void AL_APIENTRY alListeneriv( ALenum param, const ALint* values );
|
||||
|
||||
#endregion Set Listener parameters
|
||||
|
||||
#region Get Listener parameters
|
||||
|
||||
/// <summary>This function retrieves a floating-point property of the listener.</summary>
|
||||
/// <param name="param">the name of the attribute to be retrieved: ALListenerf.Gain</param>
|
||||
/// <param name="value">a pointer to the floating-point value being retrieved.</param>
|
||||
|
@ -345,24 +319,22 @@ namespace OpenTK.Audio.OpenAL
|
|||
// AL_API void AL_APIENTRY alGetListener3i( ALenum param, ALint *value1, ALint *value2, ALint *value3 );
|
||||
// AL_API void AL_APIENTRY alGetListeneriv( ALenum param, ALint* values );
|
||||
|
||||
#endregion Get Listener parameters
|
||||
|
||||
/* Source
|
||||
* Sources represent individual sound objects in 3D-space.
|
||||
* Sources take the PCM buffer provided in the specified Buffer,
|
||||
* apply Source-specific modifications, and then
|
||||
* submit them to be mixed according to spatial arrangement etc.
|
||||
*
|
||||
*
|
||||
* Properties include: -
|
||||
*
|
||||
|
||||
|
||||
* Position AL_POSITION ALfloat[3]
|
||||
* Velocity AL_VELOCITY ALfloat[3]
|
||||
* Direction AL_DIRECTION ALfloat[3]
|
||||
|
||||
* Head Relative Mode AL_SOURCE_RELATIVE ALint (AL_TRUE or AL_FALSE)
|
||||
* Looping AL_LOOPING ALint (AL_TRUE or AL_FALSE)
|
||||
*
|
||||
*
|
||||
* Reference Distance AL_REFERENCE_DISTANCE ALfloat
|
||||
* Max Distance AL_MAX_DISTANCE ALfloat
|
||||
* RollOff Factor AL_ROLLOFF_FACTOR ALfloat
|
||||
|
@ -372,22 +344,18 @@ namespace OpenTK.Audio.OpenAL
|
|||
* Max Gain AL_MAX_GAIN ALfloat
|
||||
* Inner Angle AL_CONE_INNER_ANGLE ALint or ALfloat
|
||||
* Outer Angle AL_CONE_OUTER_ANGLE ALint or ALfloat
|
||||
* Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
|
||||
*
|
||||
* Cone Outer Gain AL_CONE_OUTER_GAIN ALint or ALfloat
|
||||
*
|
||||
* MS Offset AL_MSEC_OFFSET ALint or ALfloat
|
||||
* Byte Offset AL_BYTE_OFFSET ALint or ALfloat
|
||||
* Sample Offset AL_SAMPLE_OFFSET ALint or ALfloat
|
||||
* Attached Buffer AL_BUFFER ALint
|
||||
*
|
||||
*
|
||||
* State (Query only) AL_SOURCE_STATE ALint
|
||||
* Buffers Queued (Query only) AL_BUFFERS_QUEUED ALint
|
||||
* Buffers Processed (Query only) AL_BUFFERS_PROCESSED ALint
|
||||
*/
|
||||
|
||||
#region Create Source objects
|
||||
|
||||
#region GenSources()
|
||||
|
||||
[DllImport(AL.Lib, EntryPoint = "alGenSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
unsafe private static extern void GenSourcesPrivate(int n, [Out] uint* sources);
|
||||
// AL_API void AL_APIENTRY alGenSources( ALsizei n, ALuint* Sources );
|
||||
|
@ -465,16 +433,12 @@ namespace OpenTK.Audio.OpenAL
|
|||
GenSources(1, out source);
|
||||
}
|
||||
|
||||
#endregion GenSources()
|
||||
|
||||
#region DeleteSources()
|
||||
|
||||
/// <summary>This function deletes one or more sources.</summary>
|
||||
/// <param name="n">The number of sources to be deleted.</param>
|
||||
/// <param name="sources">Pointer to an array of source names identifying the sources to be deleted.</param>
|
||||
[CLSCompliant(false)]
|
||||
[DllImport(AL.Lib, EntryPoint = "alDeleteSources", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
unsafe public static extern void DeleteSources(int n, [In] uint* sources); // Delete Source objects
|
||||
unsafe public static extern void DeleteSources(int n, [In] uint* sources); // Delete Source objects
|
||||
// AL_API void AL_APIENTRY alDeleteSources( ALsizei n, const ALuint* Sources );
|
||||
|
||||
/// <summary>This function deletes one or more sources.</summary>
|
||||
|
@ -495,8 +459,14 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(false)]
|
||||
public static void DeleteSources(uint[] sources)
|
||||
{
|
||||
if (sources == null) throw new ArgumentNullException();
|
||||
if (sources.Length == 0) throw new ArgumentOutOfRangeException();
|
||||
if (sources == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (sources.Length == 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
DeleteBuffers(sources.Length, ref sources[0]);
|
||||
}
|
||||
|
||||
|
@ -504,8 +474,14 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="sources">An array of source names identifying the sources to be deleted.</param>
|
||||
public static void DeleteSources(int[] sources)
|
||||
{
|
||||
if (sources == null) throw new ArgumentNullException();
|
||||
if (sources.Length == 0) throw new ArgumentOutOfRangeException();
|
||||
if (sources == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (sources.Length == 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
DeleteBuffers(sources.Length, ref sources[0]);
|
||||
}
|
||||
|
||||
|
@ -524,10 +500,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
DeleteSources(1, ref source);
|
||||
}
|
||||
|
||||
#endregion DeleteSources()
|
||||
|
||||
#region IsSource()
|
||||
|
||||
/// <summary>This function tests if a source name is valid, returning True if valid and False if not.</summary>
|
||||
/// <param name="sid">A source name to be tested for validity</param>
|
||||
/// <returns>Success.</returns>
|
||||
|
@ -543,14 +515,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
return IsSource((uint)sid);
|
||||
}
|
||||
|
||||
#endregion IsSource()
|
||||
|
||||
#endregion Create Source objects
|
||||
|
||||
#region Set Source parameters
|
||||
|
||||
#region Sourcef
|
||||
|
||||
/// <summary>This function sets a floating-point property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set</param>
|
||||
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
||||
|
@ -568,10 +532,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Source((uint)sid, param, value);
|
||||
}
|
||||
|
||||
#endregion Sourcef
|
||||
|
||||
#region Source3f
|
||||
|
||||
/// <summary>This function sets a source property requiring three floating-point values.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||
/// <param name="param">The name of the attribute to set: ALSource3f.Position, Velocity, Direction.</param>
|
||||
|
@ -612,17 +572,13 @@ namespace OpenTK.Audio.OpenAL
|
|||
Source((uint)sid, param, values.X, values.Y, values.Z);
|
||||
}
|
||||
|
||||
#endregion Source3f
|
||||
|
||||
#region Sourcei
|
||||
|
||||
/// <summary>This function sets an integer property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||
/// <param name="param">The name of the attribute to set: ALSourcei.SourceRelative, ConeInnerAngle, ConeOuterAngle, Looping, Buffer, SourceState.</param>
|
||||
/// <param name="value">The value to set the attribute to.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcei", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void Source(uint sid, ALSourcei param, int value);
|
||||
// AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
|
||||
// AL_API void AL_APIENTRY alSourcei( ALuint sid, ALenum param, ALint value );
|
||||
|
||||
/// <summary>This function sets an integer property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||
|
@ -669,10 +625,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Source((uint)source, ALSourcei.Buffer, buffer);
|
||||
}
|
||||
|
||||
#endregion Sourcei
|
||||
|
||||
#region Source3i
|
||||
|
||||
/// <summary>This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||
/// <param name="param">The name of the attribute to set: EfxAuxiliarySendFilter</param>
|
||||
|
@ -681,7 +633,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
///<param name="value3">The value to set the attribute to. (EFX Extension) optional Filter ID.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSource3i", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
public static extern void Source(uint sid, ALSource3i param, int value1, int value2, int value3);
|
||||
// AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
// AL_API void AL_APIENTRY alSource3i( ALuint sid, ALenum param, ALint value1, ALint value2, ALint value3 );
|
||||
|
||||
/// <summary>This function sets 3 integer properties of a source. This property is used to establish connections between Sources and Auxiliary Effect Slots.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being set.</param>
|
||||
|
@ -694,18 +646,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
Source((uint)sid, param, value1, value2, value3);
|
||||
}
|
||||
|
||||
#endregion Source3i
|
||||
|
||||
// Not used by any Enum:
|
||||
// AL_API void AL_APIENTRY alSourcefv( ALuint sid, ALenum param, const ALfloat* values );
|
||||
// AL_API void AL_APIENTRY alSourceiv( ALuint sid, ALenum param, const ALint* values );
|
||||
|
||||
#endregion Set Source parameters
|
||||
|
||||
#region Get Source parameters
|
||||
|
||||
#region GetSourcef
|
||||
|
||||
/// <summary>This function retrieves a floating-point property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||
/// <param name="param">The name of the attribute to set: ALSourcef.Pitch, Gain, MinGain, MaxGain, MaxDistance, RolloffFactor, ConeOuterGain, ConeInnerAngle, ConeOuterAngle, ReferenceDistance, EfxAirAbsorptionFactor, EfxRoomRolloffFactor, EfxConeOuterGainHighFrequency.</param>
|
||||
|
@ -723,10 +667,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetSource((uint)sid, param, out value);
|
||||
}
|
||||
|
||||
#endregion GetSourcef
|
||||
|
||||
#region GetSource3f
|
||||
|
||||
/// <summary>This function retrieves three floating-point values representing a property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||
/// <param name="param">the name of the attribute being retrieved: ALSource3f.Position, Velocity, Direction.</param>
|
||||
|
@ -767,10 +707,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetSource((uint)sid, param, out values.X, out values.Y, out values.Z);
|
||||
}
|
||||
|
||||
#endregion GetSource3f
|
||||
|
||||
#region GetSourcei
|
||||
|
||||
/// <summary>This function retrieves an integer property of a source.</summary>
|
||||
/// <param name="sid">Source name whose attribute is being retrieved.</param>
|
||||
/// <param name="param">The name of the attribute to retrieve: ALSourcei.SourceRelative, Buffer, SourceState, BuffersQueued, BuffersProcessed.</param>
|
||||
|
@ -811,19 +747,11 @@ namespace OpenTK.Audio.OpenAL
|
|||
value = result != 0;
|
||||
}
|
||||
|
||||
#endregion GetSourcei
|
||||
|
||||
// Not used by any Enum:
|
||||
// AL_API void AL_APIENTRY alGetSource3i( ALuint sid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
// AL_API void AL_APIENTRY alGetSourcefv( ALuint sid, ALenum param, ALfloat* values );
|
||||
// AL_API void AL_APIENTRY alGetSourceiv( ALuint sid, ALenum param, ALint* values );
|
||||
|
||||
#endregion Get Source parameters
|
||||
|
||||
#region Source vector based playback calls
|
||||
|
||||
#region SourcePlay
|
||||
|
||||
/// <summary>This function plays a set of sources. The playing sources will have their state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
||||
/// <param name="ns">The number of sources to be played.</param>
|
||||
/// <param name="sids">A pointer to an array of sources to be played.</param>
|
||||
|
@ -874,10 +802,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion SourcePlay
|
||||
|
||||
#region SourceStop
|
||||
|
||||
/// <summary>This function stops a set of sources. The stopped sources will have their state changed to ALSourceState.Stopped.</summary>
|
||||
/// <param name="ns">The number of sources to stop.</param>
|
||||
/// <param name="sids">A pointer to an array of sources to be stopped.</param>
|
||||
|
@ -928,10 +852,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion SourceStop
|
||||
|
||||
#region SourceRewind
|
||||
|
||||
/// <summary>This function stops a set of sources and sets all their states to ALSourceState.Initial.</summary>
|
||||
/// <param name="ns">The number of sources to be rewound.</param>
|
||||
/// <param name="sids">A pointer to an array of sources to be rewound.</param>
|
||||
|
@ -982,10 +902,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion SourceRewind
|
||||
|
||||
#region SourcePause
|
||||
|
||||
/// <summary>This function pauses a set of sources. The paused sources will have their state changed to ALSourceState.Paused.</summary>
|
||||
/// <param name="ns">The number of sources to be paused.</param>
|
||||
/// <param name="sids">A pointer to an array of sources to be paused.</param>
|
||||
|
@ -1035,14 +951,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion SourcePause
|
||||
|
||||
#endregion Source vector based playback calls
|
||||
|
||||
#region Source based playback calls
|
||||
|
||||
#region SourcePlay
|
||||
|
||||
/// <summary>This function plays, replays or resumes a source. The playing source will have it's state changed to ALSourceState.Playing. When called on a source which is already playing, the source will restart at the beginning. When the attached buffer(s) are done playing, the source will progress to the ALSourceState.Stopped state.</summary>
|
||||
/// <param name="sid">The name of the source to be played.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePlay", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -1056,10 +964,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
SourcePlay((uint)sid);
|
||||
}
|
||||
|
||||
#endregion SourcePlay
|
||||
|
||||
#region SourceStop
|
||||
|
||||
/// <summary>This function stops a source. The stopped source will have it's state changed to ALSourceState.Stopped.</summary>
|
||||
/// <param name="sid">The name of the source to be stopped.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceStop", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -1073,10 +977,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
SourceStop((uint)sid);
|
||||
}
|
||||
|
||||
#endregion SourceStop
|
||||
|
||||
#region SourceRewind
|
||||
|
||||
/// <summary>This function stops the source and sets its state to ALSourceState.Initial.</summary>
|
||||
/// <param name="sid">The name of the source to be rewound.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourceRewind", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -1090,10 +990,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
SourceRewind((uint)sid);
|
||||
}
|
||||
|
||||
#endregion SourceRewind
|
||||
|
||||
#region SourcePause
|
||||
|
||||
/// <summary>This function pauses a source. The paused source will have its state changed to ALSourceState.Paused.</summary>
|
||||
/// <param name="sid">The name of the source to be paused.</param>
|
||||
[CLSCompliant(false), DllImport(AL.Lib, EntryPoint = "alSourcePause", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -1107,14 +1003,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
SourcePause((uint)sid);
|
||||
}
|
||||
|
||||
#endregion SourcePause
|
||||
|
||||
#endregion Source based playback calls
|
||||
|
||||
#region Source Queuing
|
||||
|
||||
#region SourceQueueBuffers
|
||||
|
||||
/// <summary>This function queues a set of buffers on a source. All buffers attached to a source will be played in sequence, and the number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed. When first created, a source will be of type ALSourceType.Undetermined. A successful AL.SourceQueueBuffers call will change the source type to ALSourceType.Streaming.</summary>
|
||||
/// <param name="sid">The name of the source to queue buffers onto.</param>
|
||||
/// <param name="numEntries">The number of buffers to be queued.</param>
|
||||
|
@ -1177,10 +1065,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
unsafe { AL.SourceQueueBuffers((uint)source, 1, (uint*)&buffer); }
|
||||
}
|
||||
|
||||
#endregion SourceQueueBuffers
|
||||
|
||||
#region SourceUnqueueBuffers
|
||||
|
||||
/// <summary>This function unqueues a set of buffers attached to a source. The number of processed buffers can be detected using AL.GetSource with parameter ALGetSourcei.BuffersProcessed, which is the maximum number of buffers that can be unqueued using this call. The unqueue operation will only take place if all n buffers can be removed from the queue.</summary>
|
||||
/// <param name="sid">The name of the source to unqueue buffers from.</param>
|
||||
/// <param name="numEntries">The number of buffers to be unqueued.</param>
|
||||
|
@ -1233,16 +1117,15 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="numEntries">The number of buffers to be unqueued.</param>
|
||||
public static int[] SourceUnqueueBuffers(int sid, int numEntries)
|
||||
{
|
||||
if (numEntries <= 0) throw new ArgumentOutOfRangeException("numEntries", "Must be greater than zero.");
|
||||
if (numEntries <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("numEntries", "Must be greater than zero.");
|
||||
}
|
||||
int[] buf = new int[numEntries];
|
||||
SourceUnqueueBuffers(sid, numEntries, buf);
|
||||
return buf;
|
||||
}
|
||||
|
||||
#endregion SourceUnqueueBuffers
|
||||
|
||||
#endregion Source Queuing
|
||||
|
||||
/*
|
||||
* Buffer
|
||||
* Buffer objects are storage space for sample buffer.
|
||||
|
@ -1257,10 +1140,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
* Channels (Query only) AL_CHANNELS ALint
|
||||
*/
|
||||
|
||||
#region Buffer objects
|
||||
|
||||
#region GenBuffers
|
||||
|
||||
/// <summary>This function generates one or more buffers, which contain audio buffer (see AL.BufferData). References to buffers are uint values, which are used wherever a buffer reference is needed (in calls such as AL.DeleteBuffers, AL.Source with parameter ALSourcei, AL.SourceQueueBuffers, and AL.SourceUnqueueBuffers).</summary>
|
||||
/// <param name="n">The number of buffers to be generated.</param>
|
||||
/// <param name="buffers">Pointer to an array of uint values which will store the names of the new buffers.</param>
|
||||
|
@ -1332,10 +1211,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GenBuffers(1, out buffer);
|
||||
}
|
||||
|
||||
#endregion GenBuffers
|
||||
|
||||
#region DeleteBuffers
|
||||
|
||||
/// <summary>This function deletes one or more buffers, freeing the resources used by the buffer. Buffers which are attached to a source can not be deleted. See AL.Source (ALSourcei) and AL.SourceUnqueueBuffers for information on how to detach a buffer from a source.</summary>
|
||||
/// <param name="n">The number of buffers to be deleted.</param>
|
||||
/// <param name="buffers">Pointer to an array of buffer names identifying the buffers to be deleted.</param>
|
||||
|
@ -1385,8 +1260,14 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(false)]
|
||||
public static void DeleteBuffers(uint[] buffers)
|
||||
{
|
||||
if (buffers == null) throw new ArgumentNullException();
|
||||
if (buffers.Length == 0) throw new ArgumentOutOfRangeException();
|
||||
if (buffers == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (buffers.Length == 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
DeleteBuffers(buffers.Length, ref buffers[0]);
|
||||
}
|
||||
|
||||
|
@ -1394,8 +1275,14 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="buffers">Pointer to an array of buffer names identifying the buffers to be deleted.</param>
|
||||
public static void DeleteBuffers(int[] buffers)
|
||||
{
|
||||
if (buffers == null) throw new ArgumentNullException();
|
||||
if (buffers.Length == 0) throw new ArgumentOutOfRangeException();
|
||||
if (buffers == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
if (buffers.Length == 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
DeleteBuffers(buffers.Length, ref buffers[0]);
|
||||
}
|
||||
|
||||
|
@ -1414,10 +1301,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
DeleteBuffers(1, ref buffer);
|
||||
}
|
||||
|
||||
#endregion DeleteBuffers
|
||||
|
||||
#region IsBuffer
|
||||
|
||||
/// <summary>This function tests if a buffer name is valid, returning True if valid, False if not.</summary>
|
||||
/// <param name="bid">A buffer Handle previously allocated with <see cref="GenBuffers(int)"/>.</param>
|
||||
/// <returns>Success.</returns>
|
||||
|
@ -1434,10 +1317,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
return IsBuffer(temp);
|
||||
}
|
||||
|
||||
#endregion IsBuffer
|
||||
|
||||
#region BufferData
|
||||
|
||||
/// <summary>This function fills a buffer with audio buffer. All the pre-defined formats are PCM buffer, but this function may be used by extensions to load other buffer types as well.</summary>
|
||||
/// <param name="bid">buffer Handle/Name to be filled with buffer.</param>
|
||||
/// <param name="format">Format type from among the following: ALFormat.Mono8, ALFormat.Mono16, ALFormat.Stereo8, ALFormat.Stereo16.</param>
|
||||
|
@ -1469,19 +1348,15 @@ namespace OpenTK.Audio.OpenAL
|
|||
where TBuffer : struct
|
||||
{
|
||||
if (!BlittableValueType.Check(buffer))
|
||||
{
|
||||
throw new ArgumentException("buffer");
|
||||
}
|
||||
|
||||
GCHandle handle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
|
||||
try { BufferData(bid, format, handle.AddrOfPinnedObject(), size, freq); }
|
||||
finally { handle.Free(); }
|
||||
}
|
||||
|
||||
#endregion BufferData
|
||||
|
||||
#endregion Buffer objects
|
||||
|
||||
#region Set Buffer parameters (currently parameters can only be read)
|
||||
|
||||
/*
|
||||
Remarks (from Manual)
|
||||
* There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by this call,
|
||||
|
@ -1504,12 +1379,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Buffer3f( bid, param, values.X, values.Y, values.Z );
|
||||
}*/
|
||||
|
||||
#endregion Set Buffer parameters
|
||||
|
||||
#region Get Buffer parameters
|
||||
|
||||
#region GetBufferi
|
||||
|
||||
/// <summary>This function retrieves an integer property of a buffer.</summary>
|
||||
/// <param name="bid">Buffer name whose attribute is being retrieved</param>
|
||||
/// <param name="param">The name of the attribute to be retrieved: ALGetBufferi.Frequency, Bits, Channels, Size, and the currently hidden AL_DATA (dangerous).</param>
|
||||
|
@ -1527,18 +1396,12 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetBuffer((uint)bid, param, out value);
|
||||
}
|
||||
|
||||
#endregion GetBufferi
|
||||
|
||||
// AL_API void AL_APIENTRY alGetBufferf( ALuint bid, ALenum param, ALfloat* value );
|
||||
// AL_API void AL_APIENTRY alGetBuffer3f( ALuint bid, ALenum param, ALfloat* value1, ALfloat* value2, ALfloat* value3);
|
||||
// AL_API void AL_APIENTRY alGetBufferfv( ALuint bid, ALenum param, ALfloat* values );
|
||||
// AL_API void AL_APIENTRY alGetBuffer3i( ALuint bid, ALenum param, ALint* value1, ALint* value2, ALint* value3);
|
||||
// AL_API void AL_APIENTRY alGetBufferiv( ALuint bid, ALenum param, ALint* values );
|
||||
|
||||
#endregion Get Buffer parameters
|
||||
|
||||
#region Global Parameters
|
||||
|
||||
/// <summary>AL.DopplerFactor is a simple scaling of source and listener velocities to exaggerate or deemphasize the Doppler (pitch) shift resulting from the calculation.</summary>
|
||||
/// <param name="value">A negative value will result in an error, the command is then ignored. The default value is 1f. The current setting can be queried using AL.Get with parameter ALGetFloat.SpeedOfSound.</param>
|
||||
[DllImport(AL.Lib, EntryPoint = "alDopplerFactor", ExactSpelling = true, CallingConvention = AL.Style), SuppressUnmanagedCodeSecurity()]
|
||||
|
@ -1561,29 +1424,29 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <remarks>
|
||||
/// The ALDistanceModel .InverseDistance model works according to the following formula:
|
||||
/// gain = ALSourcef.ReferenceDistance / (ALSourcef.ReferenceDistance + ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance));
|
||||
///
|
||||
///
|
||||
/// The ALDistanceModel .InverseDistanceClamped model works according to the following formula:
|
||||
/// distance = max(distance,ALSourcef.ReferenceDistance);
|
||||
/// distance = min(distance,ALSourcef.MaxDistance);
|
||||
/// gain = ALSourcef.ReferenceDistance / (ALSourcef.ReferenceDistance + ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance));
|
||||
///
|
||||
/// The ALDistanceModel.LinearDistance model works according to the following formula:
|
||||
///
|
||||
/// The ALDistanceModel.LinearDistance model works according to the following formula:
|
||||
/// distance = min(distance, ALSourcef.MaxDistance) // avoid negative gain
|
||||
/// gain = (1 – ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance) / (ALSourcef.MaxDistance – ALSourcef.ReferenceDistance))
|
||||
///
|
||||
///
|
||||
/// The ALDistanceModel.LinearDistanceClamped model works according to the following formula:
|
||||
/// distance = max(distance, ALSourcef.ReferenceDistance)
|
||||
/// distance = min(distance, ALSourcef.MaxDistance)
|
||||
/// gain = (1 – ALSourcef.RolloffFactor * (distance – ALSourcef.ReferenceDistance) / (ALSourcef.MaxDistance – ALSourcef.ReferenceDistance))
|
||||
///
|
||||
///
|
||||
/// The ALDistanceModel.ExponentDistance model works according to the following formula:
|
||||
/// gain = (distance / ALSourcef.ReferenceDistance) ^ (- ALSourcef.RolloffFactor)
|
||||
///
|
||||
/// gain = (distance / ALSourcef.ReferenceDistance) ^ (- ALSourcef.RolloffFactor)
|
||||
///
|
||||
/// The ALDistanceModel.ExponentDistanceClamped model works according to the following formula:
|
||||
/// distance = max(distance, ALSourcef.ReferenceDistance)
|
||||
/// distance = min(distance, ALSourcef.MaxDistance)
|
||||
/// gain = (distance / ALSourcef.ReferenceDistance) ^ (- ALSourcef.RolloffFactor)
|
||||
///
|
||||
///
|
||||
/// The ALDistanceModel.None model works according to the following formula:
|
||||
/// gain = 1f;
|
||||
/// </remarks>
|
||||
|
@ -1592,10 +1455,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern void DistanceModel(ALDistanceModel distancemodel);
|
||||
// AL_API void AL_APIENTRY alDistanceModel( ALenum distanceModel );
|
||||
|
||||
#endregion Global Parameters
|
||||
|
||||
#region Helpers
|
||||
|
||||
/// <summary>(Helper) Returns Source state information.</summary>
|
||||
/// <param name="sid">The source to be queried.</param>
|
||||
/// <returns>state information from OpenAL.</returns>
|
||||
|
@ -1646,7 +1505,5 @@ namespace OpenTK.Audio.OpenAL
|
|||
{
|
||||
return (ALDistanceModel)AL.Get(ALGetInteger.DistanceModel);
|
||||
}
|
||||
|
||||
#endregion Helpers
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlTokens.cs
|
||||
/* AlTokens.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Al.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* EfxFunctions.cs
|
||||
/* EfxFunctions.cs
|
||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -19,10 +17,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// </summary>
|
||||
public partial class EffectsExtension
|
||||
{
|
||||
#region Helpers
|
||||
|
||||
#region BindEffect
|
||||
|
||||
/// <summary>(Helper) Selects the Effect type used by this Effect handle.</summary>
|
||||
/// <param name="eid">Effect id returned from a successful call to GenEffects.</param>
|
||||
/// <param name="type">Effect type.</param>
|
||||
|
@ -41,10 +35,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alEffecti((uint)eid, EfxEffecti.EffectType, (int)type);
|
||||
}
|
||||
|
||||
#endregion BindEffect
|
||||
|
||||
#region BindFilterToSource
|
||||
|
||||
/// <summary>(Helper) reroutes the output of a Source through a Filter.</summary>
|
||||
/// <param name="source">A valid Source handle.</param>
|
||||
/// <param name="filter">A valid Filter handle.</param>
|
||||
|
@ -63,10 +53,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
AL.Source((uint)source, ALSourcei.EfxDirectFilter, (int)filter);
|
||||
}
|
||||
|
||||
#endregion BindFilterToSource
|
||||
|
||||
#region BindEffectToAuxiliarySlot
|
||||
|
||||
/// <summary>(Helper) Attaches an Effect to an Auxiliary Effect Slot.</summary>
|
||||
/// <param name="auxiliaryeffectslot">The slot handle to attach the Effect to.</param>
|
||||
/// <param name="effect">The Effect handle that is being attached.</param>
|
||||
|
@ -85,10 +71,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
AuxiliaryEffectSlot((uint)auxiliaryeffectslot, EfxAuxiliaryi.EffectslotEffect, (int)effect);
|
||||
}
|
||||
|
||||
#endregion BindEffectToAuxiliarySlot
|
||||
|
||||
#region BindSourceToAuxiliarySlot
|
||||
|
||||
/// <summary>(Helper) Reroutes a Source's output into an Auxiliary Effect Slot.</summary>
|
||||
/// <param name="source">The Source handle who's output is forwarded.</param>
|
||||
/// <param name="slot">The Auxiliary Effect Slot handle that receives input from the Source.</param>
|
||||
|
@ -111,14 +93,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
AL.Source((uint)source, ALSource3i.EfxAuxiliarySendFilter, (int)slot, (int)slotnumber, (int)filter);
|
||||
}
|
||||
|
||||
#endregion BindSourceToAuxiliarySlot
|
||||
|
||||
#endregion Helpers
|
||||
|
||||
#region Effect Object
|
||||
|
||||
#region alGenEffects
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGenEffects(int n, [Out] uint* effects);
|
||||
// typedef void (__cdecl *LPALGENEFFECTS)( ALsizei n, ALuint* effects );
|
||||
|
@ -167,7 +141,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// </remarks>
|
||||
public int[] GenEffects(int n)
|
||||
{
|
||||
if (n <= 0) throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
if (n <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
}
|
||||
int[] effects = new int[n];
|
||||
GenEffects(n, out effects[0]);
|
||||
return effects;
|
||||
|
@ -202,10 +179,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
|
||||
}
|
||||
|
||||
#endregion alGenEffects
|
||||
|
||||
#region alDeleteEffects
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alDeleteEffects(int n, [In] uint* effects);
|
||||
// typedef void (__cdecl *LPALDELETEEFFECTS)( ALsizei n, ALuint* effects );
|
||||
|
@ -246,7 +219,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="effects">Pointer to n Effect object identifiers.</param>
|
||||
public void DeleteEffects(int[] effects)
|
||||
{
|
||||
if (effects == null) throw new ArgumentNullException("effects");
|
||||
if (effects == null)
|
||||
{
|
||||
throw new ArgumentNullException("effects");
|
||||
}
|
||||
DeleteEffects(effects.Length, ref effects[0]);
|
||||
}
|
||||
|
||||
|
@ -255,7 +231,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(false)]
|
||||
public void DeleteEffects(uint[] effects)
|
||||
{
|
||||
if (effects == null) throw new ArgumentNullException("effects");
|
||||
if (effects == null)
|
||||
{
|
||||
throw new ArgumentNullException("effects");
|
||||
}
|
||||
DeleteEffects(effects.Length, ref effects[0]);
|
||||
}
|
||||
|
||||
|
@ -280,10 +259,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion alDeleteEffects
|
||||
|
||||
#region alIsEffect
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate bool Delegate_alIsEffect(uint eid);
|
||||
// typedef ALboolean (__cdecl *LPALISEFFECT)( ALuint eid );
|
||||
|
@ -309,13 +284,9 @@ namespace OpenTK.Audio.OpenAL
|
|||
return Imported_alIsEffect((uint)eid);
|
||||
}
|
||||
|
||||
#endregion alIsEffect
|
||||
|
||||
#region alEffecti
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alEffecti(uint eid, EfxEffecti param, int value);
|
||||
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
|
||||
// typedef void (__cdecl *LPALEFFECTI)( ALuint eid, ALenum param, ALint value);
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_alEffecti Imported_alEffecti;
|
||||
|
@ -340,10 +311,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alEffecti((uint)eid, param, value);
|
||||
}
|
||||
|
||||
#endregion alEffecti
|
||||
|
||||
#region alEffectf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alEffectf(uint eid, EfxEffectf param, float value);
|
||||
// typedef void (__cdecl *LPALEFFECTF)( ALuint eid, ALenum param, ALfloat value);
|
||||
|
@ -371,13 +338,9 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alEffectf((uint)eid, param, value);
|
||||
}
|
||||
|
||||
#endregion alEffectf
|
||||
|
||||
#region alEffectfv
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alEffectfv(uint eid, EfxEffect3f param, [In] float* values);
|
||||
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
|
||||
// typedef void (__cdecl *LPALEFFECTFV)( ALuint eid, ALenum param, ALfloat* values );
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_alEffectfv Imported_alEffectfv;
|
||||
|
@ -408,10 +371,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Effect((uint)eid, param, ref values);
|
||||
}
|
||||
|
||||
#endregion alEffectfv
|
||||
|
||||
#region alGetEffecti
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetEffecti(uint eid, EfxEffecti pname, [Out] int* value);
|
||||
// typedef void (__cdecl *LPALGETEFFECTI)( ALuint eid, ALenum pname, ALint* value );
|
||||
|
@ -445,10 +404,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetEffect((uint)eid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetEffecti
|
||||
|
||||
#region alGetEffectf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetEffectf(uint eid, EfxEffectf pname, [Out]float* value);
|
||||
// typedef void (__cdecl *LPALGETEFFECTF)( ALuint eid, ALenum pname, ALfloat* value );
|
||||
|
@ -482,10 +437,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetEffect((uint)eid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetEffectf
|
||||
|
||||
#region alGetEffectfv
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetEffectfv(uint eid, EfxEffect3f param, [Out] float* values);
|
||||
// typedef void (__cdecl *LPALGETEFFECTFV)( ALuint eid, ALenum pname, ALfloat* values );
|
||||
|
@ -522,21 +473,13 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetEffect((uint)eid, param, out values);
|
||||
}
|
||||
|
||||
#endregion alGetEffectfv
|
||||
|
||||
// Not used:
|
||||
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALEFFECTIV)( ALuint eid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALGETEFFECTIV)( ALuint eid, ALenum pname, ALint* values );
|
||||
|
||||
#endregion Effect Object
|
||||
|
||||
#region Filter Object
|
||||
|
||||
#region alGenFilters
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGenFilters(int n, [Out] uint* filters);
|
||||
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
|
||||
// typedef void (__cdecl *LPALGENFILTERS)( ALsizei n, ALuint* filters );
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_alGenFilters Imported_alGenFilters;
|
||||
|
@ -582,7 +525,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
public int[] GenFilters(int n)
|
||||
{
|
||||
|
||||
if (n <= 0) throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
if (n <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
}
|
||||
int[] filters = new int[n];
|
||||
GenFilters(filters.Length, out filters[0]);
|
||||
return filters;
|
||||
|
@ -612,10 +558,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion alGenFilters
|
||||
|
||||
#region alDeleteFilters
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alDeleteFilters(int n, [In] uint* filters);
|
||||
// typedef void (__cdecl *LPALDELETEFILTERS)( ALsizei n, ALuint* filters );
|
||||
|
@ -657,7 +599,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(false)]
|
||||
public void DeleteFilters(uint[] filters)
|
||||
{
|
||||
if (filters == null) throw new ArgumentNullException("filters");
|
||||
if (filters == null)
|
||||
{
|
||||
throw new ArgumentNullException("filters");
|
||||
}
|
||||
DeleteFilters(filters.Length, ref filters[0]);
|
||||
}
|
||||
|
||||
|
@ -665,7 +610,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="filters">Pointer to an filter name/handle identifying the Filter Object to be deleted.</param>
|
||||
public void DeleteFilters(int[] filters)
|
||||
{
|
||||
if (filters == null) throw new ArgumentNullException("filters");
|
||||
if (filters == null)
|
||||
{
|
||||
throw new ArgumentNullException("filters");
|
||||
}
|
||||
DeleteFilters(filters.Length, ref filters[0]);
|
||||
}
|
||||
|
||||
|
@ -690,10 +638,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion alDeleteFilters
|
||||
|
||||
#region alIsFilter
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate bool Delegate_alIsFilter(uint fid);
|
||||
// typedef ALboolean (__cdecl *LPALISFILTER)( ALuint fid );
|
||||
|
@ -719,10 +663,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
return Imported_alIsFilter((uint)fid);
|
||||
}
|
||||
|
||||
#endregion alIsFilter
|
||||
|
||||
#region alFilteri
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alFilteri(uint fid, EfxFilteri param, int value);
|
||||
// typedef void (__cdecl *LPALFILTERI)( ALuint fid, ALenum param, ALint value );
|
||||
|
@ -750,10 +690,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alFilteri((uint)fid, param, value);
|
||||
}
|
||||
|
||||
#endregion alFilteri
|
||||
|
||||
#region alFilterf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alFilterf(uint fid, EfxFilterf param, float value);
|
||||
// typedef void (__cdecl *LPALFILTERF)( ALuint fid, ALenum param, ALfloat value);
|
||||
|
@ -781,10 +717,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alFilterf((uint)fid, param, value);
|
||||
}
|
||||
|
||||
#endregion alFilterf
|
||||
|
||||
#region alGetFilteri
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetFilteri(uint fid, EfxFilteri pname, [Out] int* value);
|
||||
// typedef void (__cdecl *LPALGETFILTERI)( ALuint fid, ALenum pname, ALint* value );
|
||||
|
@ -818,10 +750,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetFilter((uint)fid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetFilteri
|
||||
|
||||
#region alGetFilterf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetFilterf(uint fid, EfxFilterf pname, [Out] float* value);
|
||||
// typedef void (__cdecl *LPALGETFILTERF)( ALuint fid, ALenum pname, ALfloat* value );
|
||||
|
@ -855,20 +783,12 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetFilter((uint)fid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetFilterf
|
||||
|
||||
// Not used:
|
||||
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
|
||||
// typedef void (__cdecl *LPALFILTERIV)( ALuint fid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALFILTERFV)( ALuint fid, ALenum param, ALfloat* values );
|
||||
// typedef void (__cdecl *LPALGETFILTERIV)( ALuint fid, ALenum pname, ALint* values );
|
||||
// typedef void (__cdecl *LPALGETFILTERFV)( ALuint fid, ALenum pname, ALfloat* values );
|
||||
|
||||
#endregion Filter Object
|
||||
|
||||
#region Auxiliary Effect Slot Object
|
||||
|
||||
#region alGenAuxiliaryEffectSlots
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGenAuxiliaryEffectSlots(int n, [Out] uint* slots);
|
||||
// typedef void (__cdecl *LPALGENAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
||||
|
@ -915,7 +835,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <returns>Pointer addressing sufficient memory to store n Effect Slot object identifiers.</returns>
|
||||
public int[] GenAuxiliaryEffectSlots(int n)
|
||||
{
|
||||
if (n <= 0) throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
if (n <= 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("n", "Must be higher than 0.");
|
||||
}
|
||||
int[] slots = new int[n];
|
||||
GenAuxiliaryEffectSlots(slots.Length, out slots[0]);
|
||||
return slots;
|
||||
|
@ -945,10 +868,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion alGenAuxiliaryEffectSlots
|
||||
|
||||
#region DeleteAuxiliaryEffectSlots
|
||||
|
||||
unsafe private delegate void Delegate_alDeleteAuxiliaryEffectSlots(int n, [In] uint* slots);
|
||||
// typedef void (__cdecl *LPALDELETEAUXILIARYEFFECTSLOTS)( ALsizei n, ALuint* slots );
|
||||
|
||||
|
@ -987,7 +906,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="slots">Pointer to n Effect Slot object identifiers.</param>
|
||||
public void DeleteAuxiliaryEffectSlots(int[] slots)
|
||||
{
|
||||
if (slots == null) throw new ArgumentNullException("slots");
|
||||
if (slots == null)
|
||||
{
|
||||
throw new ArgumentNullException("slots");
|
||||
}
|
||||
DeleteAuxiliaryEffectSlots(slots.Length, ref slots[0]);
|
||||
}
|
||||
|
||||
|
@ -996,7 +918,10 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(false)]
|
||||
public void DeleteAuxiliaryEffectSlots(uint[] slots)
|
||||
{
|
||||
if (slots == null) throw new ArgumentNullException("slots");
|
||||
if (slots == null)
|
||||
{
|
||||
throw new ArgumentNullException("slots");
|
||||
}
|
||||
DeleteAuxiliaryEffectSlots(slots.Length, ref slots[0]);
|
||||
}
|
||||
|
||||
|
@ -1021,10 +946,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion alDeleteAuxiliaryEffectSlots
|
||||
|
||||
#region alIsAuxiliaryEffectSlot
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate bool Delegate_alIsAuxiliaryEffectSlot(uint slot);
|
||||
// typedef ALboolean (__cdecl *LPALISAUXILIARYEFFECTSLOT)( ALuint slot );
|
||||
|
@ -1050,13 +971,9 @@ namespace OpenTK.Audio.OpenAL
|
|||
return Imported_alIsAuxiliaryEffectSlot((uint)slot);
|
||||
}
|
||||
|
||||
#endregion alIsAuxiliaryEffectSlot
|
||||
|
||||
#region alAuxiliaryEffectSloti
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi param, int value);
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum param, ALint value );
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private Delegate_alAuxiliaryEffectSloti Imported_alAuxiliaryEffectSloti;
|
||||
|
@ -1081,10 +998,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alAuxiliaryEffectSloti((uint)asid, param, value);
|
||||
}
|
||||
|
||||
#endregion alAuxiliaryEffectSloti
|
||||
|
||||
#region alAuxiliaryEffectSlotf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
private delegate void Delegate_alAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf param, float value);
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum param, ALfloat value );
|
||||
|
@ -1112,10 +1025,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
Imported_alAuxiliaryEffectSlotf((uint)asid, param, value);
|
||||
}
|
||||
|
||||
#endregion alAuxiliaryEffectSlotf
|
||||
|
||||
#region alGetAuxiliaryEffectSloti
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetAuxiliaryEffectSloti(uint asid, EfxAuxiliaryi pname, [Out] int* value);
|
||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTI)( ALuint asid, ALenum pname, ALint* value );
|
||||
|
@ -1149,10 +1058,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetAuxiliaryEffectSloti
|
||||
|
||||
#region alGetAuxiliaryEffectSlotf
|
||||
|
||||
//[CLSCompliant(false)]
|
||||
unsafe private delegate void Delegate_alGetAuxiliaryEffectSlotf(uint asid, EfxAuxiliaryf pname, [Out] float* value);
|
||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTF)( ALuint asid, ALenum pname, ALfloat* value );
|
||||
|
@ -1186,38 +1091,26 @@ namespace OpenTK.Audio.OpenAL
|
|||
GetAuxiliaryEffectSlot((uint)asid, pname, out value);
|
||||
}
|
||||
|
||||
#endregion alGetAuxiliaryEffectSlotf
|
||||
|
||||
// Not used:
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum param, ALint* values );
|
||||
// typedef void (__cdecl *LPALAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum param, ALfloat* values );
|
||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTIV)( ALuint asid, ALenum pname, ALint* values );
|
||||
// typedef void (__cdecl *LPALGETAUXILIARYEFFECTSLOTFV)( ALuint asid, ALenum pname, ALfloat* values );
|
||||
|
||||
#endregion Auxiliary Effect Slot Object
|
||||
|
||||
#region Constructor / Extension Loading
|
||||
|
||||
private bool _valid;
|
||||
|
||||
/// <summary>Returns True if the EFX Extension has been found and could be initialized.</summary>
|
||||
public bool IsInitialized
|
||||
{
|
||||
get
|
||||
{
|
||||
return _valid;
|
||||
}
|
||||
}
|
||||
public bool IsInitialized { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new EffectsExtension instance.
|
||||
/// </summary>
|
||||
public EffectsExtension()
|
||||
{
|
||||
_valid = false;
|
||||
IsInitialized = false;
|
||||
|
||||
if (AudioContext.CurrentContext == null)
|
||||
{
|
||||
throw new InvalidOperationException("AL.LoadAll() needs a current AudioContext.");
|
||||
}
|
||||
|
||||
if (!AudioContext.CurrentContext.SupportsExtension("ALC_EXT_EFX"))
|
||||
{
|
||||
|
@ -1280,9 +1173,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
// Console.WriteLine("Auxiliary Effect Slot functions appear to be ok.");
|
||||
|
||||
// didn't return so far, everything went fine.
|
||||
_valid = true;
|
||||
IsInitialized = true;
|
||||
}
|
||||
|
||||
#endregion Constructor / Extension Loading
|
||||
}
|
||||
}
|
|
@ -1,18 +1,12 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* EfxTokens.cs
|
||||
/* EfxTokens.cs
|
||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
namespace OpenTK.Audio.OpenAL
|
||||
{
|
||||
#region Effect
|
||||
|
||||
///<summary>A list of valid 32-bit Float Effect/GetEffect parameters</summary>
|
||||
public enum EfxEffectf : int
|
||||
{
|
||||
|
@ -167,7 +161,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
///<summary>A list of valid Math.Vector3 Effect/GetEffect parameters</summary>
|
||||
public enum EfxEffect3f : int
|
||||
{
|
||||
/// <summary>Reverb Pan does for the Reverb what Reflections Pan does for the Reflections. Unit: Vector3 of length 0f to 1f Default: {0.0f, 0.0f, 0.0f}</summary>
|
||||
/// <summary>Reverb Pan does for the Reverb what Reflections Pan does for the Reflections. Unit: Vector3 of length 0f to 1f Default: {0.0f, 0.0f, 0.0f}</summary>
|
||||
EaxReverbLateReverbPan = 0x000E,
|
||||
/// <summary>This Vector3 controls the spatial distribution of the cluster of early reflections. The direction of this vector controls the global direction of the reflections, while its magnitude controls how focused the reflections are towards this direction. For legacy reasons this Vector3 follows a left-handed co-ordinate system! Note that OpenAL uses a right-handed coordinate system. Unit: Vector3 of length 0f to 1f Default: {0.0f, 0.0f, 0.0f}</summary>
|
||||
EaxReverbReflectionsPan = 0x000B,
|
||||
|
@ -230,7 +224,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// The A phoneme of the vocal morpher.
|
||||
/// </summary>
|
||||
VocalMorpherPhonemeA = 0,
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The E phoneme of the vocal morpher.
|
||||
/// </summary>
|
||||
|
@ -377,7 +371,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
VocalMorpherPhonemeZ = 29,
|
||||
}
|
||||
|
||||
///<summary>Effect type definitions to be used with EfxEffecti.EffectType.</summary>
|
||||
///<summary>Effect type definitions to be used with EfxEffecti.EffectType.</summary>
|
||||
public enum EfxEffectType : int
|
||||
{
|
||||
///<summary>No Effect, disable. This Effect type is used when an Effect object is initially created.</summary>
|
||||
|
@ -410,10 +404,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
EaxReverb = 0x8000,
|
||||
}
|
||||
|
||||
#endregion Effect
|
||||
|
||||
#region Auxiliary Effect Slot
|
||||
|
||||
///<summary>A list of valid Int32 AuxiliaryEffectSlot/GetAuxiliaryEffectSlot parameters</summary>
|
||||
public enum EfxAuxiliaryi : int
|
||||
{
|
||||
|
@ -431,10 +421,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
EffectslotGain = 0x0002,
|
||||
}
|
||||
|
||||
#endregion Auxiliary Effect Slot
|
||||
|
||||
#region Filter Object
|
||||
|
||||
///<summary>A list of valid 32-bits Float Filter/GetFilter parameters</summary>
|
||||
public enum EfxFilterf : int
|
||||
{
|
||||
|
@ -475,6 +461,4 @@ namespace OpenTK.Audio.OpenAL
|
|||
///<summary>Currently not implemented. A band-pass filter is used to remove high and low frequency content from a signal.</summary>
|
||||
Bandpass = 0x0003,
|
||||
}
|
||||
|
||||
#endregion Filter Object
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* EfxPresets.cs
|
||||
/* EfxPresets.cs
|
||||
* C headers: \OpenAL 1.1 SDK\include\ "efx.h", "efx-creative.h", "Efx-Util.h"
|
||||
* Spec: Effects Extension Guide.pdf (bundled with OpenAL SDK)
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
|
@ -124,7 +122,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
|
||||
output.Gain = 0.32f; // todo, currently default
|
||||
output.GainHF = 0.89f; // todo, currently default
|
||||
output.GainLF = 1f;// todo, currently default
|
||||
output.GainLF = 1f; // todo, currently default
|
||||
|
||||
output.LFReference = input.LFReference;
|
||||
output.HFReference = input.HFReference;
|
||||
|
@ -199,7 +197,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
_EFXLOWPASSFILTER EFXLOWPASSFILTER;//, *LPEFXLOWPASSFILTER;
|
||||
|
||||
|
||||
|
||||
void ConvertReverbParameters(EAXREVERBPROPERTIES *pEAXProp, EFXEAXREVERBPROPERTIES *pEFXEAXReverb);
|
||||
void ConvertObstructionParameters(EAXOBSTRUCTIONPROPERTIES *pObProp, EFXLOWPASSFILTER *pDirectLowPassFilter);
|
||||
void ConvertExclusionParameters(EAXEXCLUSIONPROPERTIES *pExProp, EFXLOWPASSFILTER *pSendLowPassFilter);
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* XRamExtension.cs
|
||||
/* XRamExtension.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\xram.h
|
||||
* Spec: ?
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details (MIT)
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
|
@ -21,19 +19,8 @@ namespace OpenTK.Audio.OpenAL
|
|||
[CLSCompliant(true)]
|
||||
public sealed class XRamExtension
|
||||
{
|
||||
#region Instance state
|
||||
|
||||
private bool _valid = false;
|
||||
|
||||
/// <summary>Returns True if the X-Ram Extension has been found and could be initialized.</summary>
|
||||
public bool IsInitialized
|
||||
{
|
||||
get { return _valid; }
|
||||
}
|
||||
|
||||
#endregion Instance state
|
||||
|
||||
#region X-RAM Function pointer definitions
|
||||
public bool IsInitialized { get; } = false;
|
||||
|
||||
// [CLSCompliant(false)]
|
||||
private delegate bool Delegate_SetBufferMode(int n, ref uint buffers, int value);
|
||||
|
@ -48,25 +35,19 @@ namespace OpenTK.Audio.OpenAL
|
|||
//[CLSCompliant(false)]
|
||||
private Delegate_GetBufferMode Imported_GetBufferMode;
|
||||
|
||||
#endregion X-RAM Function pointer definitions
|
||||
|
||||
#region X-RAM Tokens
|
||||
|
||||
private int AL_EAX_RAM_SIZE, AL_EAX_RAM_FREE,
|
||||
AL_STORAGE_AUTOMATIC, AL_STORAGE_HARDWARE, AL_STORAGE_ACCESSIBLE;
|
||||
|
||||
#endregion X-RAM Tokens
|
||||
|
||||
#region Constructor / Extension Loading
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new XRamExtension instance.
|
||||
/// </summary>
|
||||
public XRamExtension()
|
||||
{ // Query if Extension supported and retrieve Tokens/Pointers if it is.
|
||||
_valid = false;
|
||||
IsInitialized = false;
|
||||
if (AL.IsExtensionPresent("EAX-RAM") == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AL_EAX_RAM_SIZE = AL.GetEnumValue("AL_EAX_RAM_SIZE");
|
||||
AL_EAX_RAM_FREE = AL.GetEnumValue("AL_EAX_RAM_FREE");
|
||||
|
@ -99,13 +80,9 @@ namespace OpenTK.Audio.OpenAL
|
|||
return;
|
||||
}
|
||||
|
||||
_valid = true;
|
||||
IsInitialized = true;
|
||||
}
|
||||
|
||||
#endregion Constructor / Extension Loading
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>Query total amount of X-RAM in bytes.</summary>
|
||||
public int GetRamSize
|
||||
{
|
||||
|
@ -175,9 +152,13 @@ namespace OpenTK.Audio.OpenAL
|
|||
int tempresult = Imported_GetBufferMode(buffer, IntPtr.Zero); // IntPtr.Zero due to the parameter being unused/reserved atm
|
||||
|
||||
if (tempresult == AL_STORAGE_ACCESSIBLE)
|
||||
{
|
||||
return XRamStorage.Accessible;
|
||||
}
|
||||
if (tempresult == AL_STORAGE_HARDWARE)
|
||||
{
|
||||
return XRamStorage.Hardware;
|
||||
}
|
||||
// default:
|
||||
return XRamStorage.Automatic;
|
||||
}
|
||||
|
@ -191,8 +172,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
uint temp = (uint)buffer;
|
||||
return GetBufferMode(ref temp);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlcFunctions.cs
|
||||
/* AlcFunctions.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
@ -14,33 +12,33 @@ using System.Runtime.InteropServices;
|
|||
using System.Security;
|
||||
|
||||
/* Type Mapping
|
||||
// 8-bit boolean
|
||||
// 8-bit boolean
|
||||
typedef char ALCboolean;
|
||||
* byte
|
||||
// character
|
||||
// character
|
||||
typedef char ALCchar;
|
||||
* byte
|
||||
// signed 8-bit 2's complement integer
|
||||
// signed 8-bit 2's complement integer
|
||||
typedef char ALCbyte;
|
||||
* byte
|
||||
|
||||
// unsigned 8-bit integer
|
||||
// unsigned 8-bit integer
|
||||
typedef unsigned char ALCubyte;
|
||||
* ubyte
|
||||
|
||||
// signed 16-bit 2's complement integer
|
||||
// signed 16-bit 2's complement integer
|
||||
typedef short ALCshort;
|
||||
* short
|
||||
|
||||
// unsigned 16-bit integer
|
||||
// unsigned 16-bit integer
|
||||
typedef unsigned short ALCushort;
|
||||
* ushort
|
||||
|
||||
// unsigned 32-bit integer
|
||||
// unsigned 32-bit integer
|
||||
typedef unsigned int ALCuint;
|
||||
* uint
|
||||
|
||||
// signed 32-bit 2's complement integer
|
||||
|
||||
// signed 32-bit 2's complement integer
|
||||
typedef int ALCint;
|
||||
* int
|
||||
// non-negative 32-bit binary integer size
|
||||
|
@ -57,11 +55,11 @@ typedef float ALCfloat;
|
|||
// 64-bit IEEE754 floating-point
|
||||
typedef double ALCdouble;
|
||||
* double
|
||||
|
||||
|
||||
// void type (for opaque pointers only)
|
||||
typedef void ALCvoid;
|
||||
* void
|
||||
|
||||
|
||||
* ALCdevice
|
||||
* ALCcontext *context
|
||||
* IntPtr
|
||||
|
@ -73,19 +71,11 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <summary>Alc = Audio Library Context</summary>
|
||||
public static class Alc
|
||||
{
|
||||
#region Constants
|
||||
|
||||
private const string Lib = AL.Lib;
|
||||
private const CallingConvention Style = CallingConvention.Cdecl;
|
||||
|
||||
#endregion Constants
|
||||
|
||||
#region Context Management
|
||||
|
||||
#region CreateContext
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcCreateContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity]
|
||||
unsafe static extern IntPtr sys_CreateContext([In] IntPtr device, [In] int* attrlist);
|
||||
private unsafe static extern IntPtr sys_CreateContext([In] IntPtr device, [In] int* attrlist);
|
||||
|
||||
/// <summary>This function creates a context using a specified device.</summary>
|
||||
/// <param name="device">a pointer to a device</param>
|
||||
|
@ -115,10 +105,8 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcMakeContextCurrent", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
static extern bool MakeContextCurrent(IntPtr context);
|
||||
private static extern bool MakeContextCurrent(IntPtr context);
|
||||
|
||||
/// <summary>This function makes a specified context the current context.</summary>
|
||||
/// <param name="context">A pointer to the new context.</param>
|
||||
|
@ -130,7 +118,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
// ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent( ALCcontext *context );
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcProcessContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
static extern void ProcessContext(IntPtr context);
|
||||
private static extern void ProcessContext(IntPtr context);
|
||||
|
||||
/// <summary>This function tells a context to begin processing. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. alcSuspendContext can be used to suspend a context, and then all the OpenAL state changes can be applied at once, followed by a call to alcProcessContext to apply all the state changes immediately. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the new context</param>
|
||||
|
@ -141,7 +129,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
// ALC_API void ALC_APIENTRY alcProcessContext( ALCcontext *context );
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcSuspendContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
static extern void SuspendContext(IntPtr context);
|
||||
private static extern void SuspendContext(IntPtr context);
|
||||
|
||||
/// <summary>This function suspends processing on a specified context. When a context is suspended, changes in OpenAL state will be accepted but will not be processed. A typical use of alcSuspendContext would be to suspend a context, apply all the OpenAL state changes at once, and then call alcProcessContext to apply all the state changes at once. In some cases, this procedure may be more efficient than application of properties in a non-suspended state. In some implementations, process and suspend calls are each a NOP.</summary>
|
||||
/// <param name="context">a pointer to the context to be suspended.</param>
|
||||
|
@ -152,7 +140,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
// ALC_API void ALC_APIENTRY alcSuspendContext( ALCcontext *context );
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcDestroyContext", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
static extern void DestroyContext(IntPtr context);
|
||||
private static extern void DestroyContext(IntPtr context);
|
||||
|
||||
/// <summary>This function destroys a context.</summary>
|
||||
/// <param name="context">a pointer to the new context.</param>
|
||||
|
@ -174,7 +162,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
// ALC_API ALCcontext * ALC_APIENTRY alcGetCurrentContext( void );
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetContextsDevice", ExactSpelling = true, CallingConvention = Alc.Style), SuppressUnmanagedCodeSecurity()]
|
||||
static extern IntPtr GetContextsDevice(IntPtr context);
|
||||
private static extern IntPtr GetContextsDevice(IntPtr context);
|
||||
|
||||
/// <summary>This function retrieves a context's device pointer.</summary>
|
||||
/// <param name="context">a pointer to a context.</param>
|
||||
|
@ -185,10 +173,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
// ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice( ALCcontext *context );
|
||||
|
||||
#endregion Context Management
|
||||
|
||||
#region Device Management
|
||||
|
||||
/// <summary>This function opens a device by name.</summary>
|
||||
/// <param name="devicename">a null-terminated string describing a device.</param>
|
||||
/// <returns>Returns a pointer to the opened device. The return value will be NULL if there is an error.</returns>
|
||||
|
@ -203,10 +187,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern bool CloseDevice([In] IntPtr device);
|
||||
// ALC_API ALCboolean ALC_APIENTRY alcCloseDevice( ALCdevice *device );
|
||||
|
||||
#endregion Device Management
|
||||
|
||||
#region Error support.
|
||||
|
||||
/// <summary>This function retrieves the current context error state.</summary>
|
||||
/// <param name="device">a pointer to the device to retrieve the error state from</param>
|
||||
/// <returns>Errorcode Int32.</returns>
|
||||
|
@ -214,10 +194,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern AlcError GetError([In] IntPtr device);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetError( ALCdevice *device );
|
||||
|
||||
#endregion Error support.
|
||||
|
||||
#region Extension support.
|
||||
|
||||
/// <summary>This function queries if a specified context extension is available.</summary>
|
||||
/// <param name="device">a pointer to the device to be queried for an extension.</param>
|
||||
/// <param name="extname">a null-terminated string describing the extension.</param>
|
||||
|
@ -242,10 +218,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
public static extern int GetEnumValue([In] IntPtr device, [In] string enumname);
|
||||
// ALC_API ALCenum ALC_APIENTRY alcGetEnumValue( ALCdevice *device, const ALCchar *enumname );
|
||||
|
||||
#endregion Extension support.
|
||||
|
||||
#region Query functions
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetString", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
private static extern IntPtr GetStringPrivate([In] IntPtr device, AlcGetString param);
|
||||
// ALC_API const ALCchar * ALC_APIENTRY alcGetString( ALCdevice *device, ALCenum param );
|
||||
|
@ -335,7 +307,7 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
|
||||
[DllImport(Alc.Lib, EntryPoint = "alcGetIntegerv", ExactSpelling = true, CallingConvention = Alc.Style, CharSet = CharSet.Ansi), SuppressUnmanagedCodeSecurity()]
|
||||
unsafe static extern void GetInteger(IntPtr device, AlcGetInteger param, int size, int* data);
|
||||
private unsafe static extern void GetInteger(IntPtr device, AlcGetInteger param, int size, int* data);
|
||||
// ALC_API void ALC_APIENTRY alcGetIntegerv( ALCdevice *device, ALCenum param, ALCsizei size, ALCint *buffer );
|
||||
|
||||
/// <summary>This function returns integers related to the context.</summary>
|
||||
|
@ -370,10 +342,6 @@ namespace OpenTK.Audio.OpenAL
|
|||
}
|
||||
}
|
||||
|
||||
#endregion Query functions
|
||||
|
||||
#region Capture functions
|
||||
|
||||
/// <summary>This function opens a capture device by name. </summary>
|
||||
/// <param name="devicename">a pointer to a device name string.</param>
|
||||
/// <param name="frequency">the frequency that the buffer should be captured at.</param>
|
||||
|
@ -467,14 +435,12 @@ namespace OpenTK.Audio.OpenAL
|
|||
/// <param name="buffer">a buffer, which must be large enough to accommodate the number of samples.</param>
|
||||
/// <param name="samples">the number of samples to be retrieved.</param>
|
||||
[CLSCompliant(false)]
|
||||
public static void CaptureSamples<T>(IntPtr device, T[, ,] buffer, int samples)
|
||||
public static void CaptureSamples<T>(IntPtr device, T[,,] buffer, int samples)
|
||||
where T : struct
|
||||
{
|
||||
CaptureSamples(device, ref buffer[0, 0, 0], samples);
|
||||
}
|
||||
|
||||
#endregion Capture functions
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -1,11 +1,9 @@
|
|||
#region --- OpenTK.OpenAL License ---
|
||||
/* AlcTokens.cs
|
||||
/* AlcTokens.cs
|
||||
* C header: \OpenAL 1.1 SDK\include\Alc.h
|
||||
* Spec: http://www.openal.org/openal_webstf/specs/OpenAL11Specification.pdf
|
||||
* Copyright (c) 2008 Christoph Brandtner and Stefanos Apostolopoulos
|
||||
* See license.txt for license details
|
||||
* http://www.OpenTK.net */
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue