Skip to content

Commit 5c8b966

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 1404e57 + 87cfe60 commit 5c8b966

File tree

101 files changed

+14730
-17425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+14730
-17425
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
*.tm text
1414
*.glsl text
1515
*.resx text
16+
*.yml text
1617

1718
*.dll binary
1819
*.exe binary

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: objective-c
2+
3+
env:
4+
global:
5+
- EnableNuGetPackageRestore=true
6+
matrix:
7+
- MONO_VER="2.10.11"
8+
- MONO_VER="3.2.6"
9+
10+
before_install:
11+
- wget "http://download.mono-project.com/archive/${MONO_VER}/macos-10-x86/MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.pkg" "http://download.mono-project.com/archive/${MONO_VER}/macos-10-x86/MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.dmg" || true
12+
- hdid "MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.dmg" || true
13+
- sudo installer -pkg "/Volumes/Mono Framework MDK ${MONO_VER}/MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.pkg" -target / || true
14+
- sudo installer -pkg "MonoFramework-MDK-${MONO_VER}.macos10.xamarin.x86.pkg" -target / || true
15+
16+
script:
17+
- xbuild && xbuild /p:Configuration=Release
18+

Documentation/Build.Docs.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
<None Include="Doxyfile" />
5858
</ItemGroup>
5959
<ItemGroup>
60-
<None Include="Changelog.txt" />
6160
<None Include="Contributors.txt" />
6261
<None Include="Instructions.txt" />
6362
<None Include="License.txt" />

Documentation/Changelog.txt

Lines changed: 0 additions & 5879 deletions
This file was deleted.

Documentation/Release.txt

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
The Open Toolkit 1.1
2-
15 February 2014
1+
The Open Toolkit 1.1.1
2+
15 March 2014
33

44
http://www.opentk.com
55
https://github.com/opentk/opentk
6+
https://www.nuget.org/packages/OpenTK/
67

78

89
[Overview]
910

10-
This is the first stable release for OpenTK 1.1
11-
12-
New features:
13-
1. support for OpenGL 4.4 and OpenGL ES 3.0
14-
2. strongly-typed enums for OpenGL ES 2.0 and 3.0
15-
3. new, faster OpenGL bindings based on hand-optimized IL
16-
4. a new SDL2 backend for improved platform compatibility
17-
5. new Joystick and GamePad APIs under OpenTK.Input
18-
6. improved startup time and reduced memory consumption
19-
7. inline documentation for all OpenGL and OpenGL ES core functions
20-
8. a greatly expanded math library
21-
9. numerous bugfixes for Mac OS X, Windows 8 and Linux
22-
10. ANGLE support for Windows systems without OpenGL drivers
23-
11. support for Retina / high-DPI monitors
24-
12. monolinker can now be used to reduce the size of OpenTK.dll
25-
13. precompiled binaries for optional dependencies (OpenAL, SDL2, monolinker)
26-
27-
Users of previous versions are strongly encouraged to upgrade to OpenTK 1.1
11+
This is the second stable release for OpenTK 1.1. It fixes various reported issues and synchronizes the OpenGL and OpenGL ES API with the March 2014 Khronos specifications.
12+
13+
Changelog:
14+
1. new OpenGL extensions:
15+
- INTEL_performance_query
16+
2. Debug builds will now throw exceptions on OpenGL errors (thanks Frassle!)
17+
3. OpenGL documentation tooltips now report expected array lengths (thanks Frassle!)
18+
4. OpenGL documentation is now generated from the new docbook 5 API reference
19+
3. OpenGL ES now works on more platforms, including Android
20+
4. keyboard events now report Alt, Ctrl, Shift key states
21+
5. GameWindow.Run() now respects TargetRenderFrequency setting
22+
6. GLControl now works on Mac OS X (thanks Sappharad!)
23+
7. external contexts no longer require an explicit call to Toolkit.Init()
24+
8. Joysticks now correctly report hat position on Windows
25+
9. Joysticks now correctly report +y as up and -y as down
26+
27+
OpenTK 1.1.1 is backwards compatible with 1.1.0. Users of previous versions are encouraged to upgrade.
2828

2929
Visit http://www.opentk.com for the latest news and information on the Open Toolkit library.
3030

3131

3232

3333
[Resolved issues]
3434

35-
Please refer to the following pages:
36-
- https://github.com/opentk/opentk/issues/closed
37-
- http://www.opentk.com/project/issues/opentk?sort=desc&order=Last+updated&text=&versions=1357%2C1395&states=2%2C7&submitted=&assigned=&participated=&form_token=a33a92f28934981edc50bea360f01762&form_id=project_issue_query
35+
Visit the following page for a complete list:
36+
- https://github.com/opentk/opentk/issues?milestone=2&page=1&state=closed
3837

3938

4039

@@ -54,17 +53,15 @@ Please refer to the following pages:
5453

5554
If you encounter an issue with OpenTK, please report it at https://github.com/opentk/opentk/issues
5655

57-
Dont forget to mention your operating system and GPU! If possible, try to attach a small, self-contained test case that reproduces the bug.
56+
Don't forget to mention your operating system and GPU! If possible, try to attach a small, self-contained test case that reproduces the bug.
5857

5958

6059

6160
[API compatibility]
6261

63-
Most projects will be able to upgrade to OpenTK 1.1 without any modifications. However, due to updates in the official OpenGL specification and due to bugfixes in the binding generator, a number of OpenGL signatures have changed between OpenTK 1.0 and 1.1.
64-
65-
Modified signatures have been marked with the [Obsolete] attribute. A warning message will be generated with instructions on a suggested replacement.
62+
OpenTK 1.1.1 is backwards compatible with 1.1.0.
6663

67-
In a small number of cases, using the original signature would lead to incorrect results or a crash. These cases will generate a compile-time error now. If you use any of the following signatures, please apply the suggested modification:
64+
OpenTK 1.1.0 is not backwards compatible with 1.0. Most projects will be able to upgrade without any modifications. Projects using the following signatures will have to implement the suggested changes:
6865

6966
Namespace OpenTK.Graphics.OpenGL
7067
Change signature:
@@ -145,4 +142,4 @@ Change `ref` parameters to `out`:
145142
Change namespace:
146143
- GL.DisableDriverControlQCOM -> GL.Qcom.DisableDriverControl
147144
- GL.GetDriverControlsQCOM -> GL.Qcom.GetDriverControls
148-
- GL.GetDriverControlStringQCOM -> GL.Qcom.GetDriverControlString
145+
- GL.GetDriverControlStringQCOM -> GL.Qcom.GetDriverControlString

OpenTK.sln

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK", "Source\OpenTK\Ope
99
EndProjectSection
1010
EndProject
1111
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Compatibility", "Source\Compatibility\OpenTK.Compatibility.csproj", "{62C0DB35-0000-0000-0000-000000000000}"
12+
ProjectSection(ProjectDependencies) = postProject
13+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
14+
EndProjectSection
1215
EndProject
1316
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.Examples", "Source\Examples\OpenTK.Examples.csproj", "{868E37B3-0000-0000-0000-000000000000}"
17+
ProjectSection(ProjectDependencies) = postProject
18+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
19+
EndProjectSection
1420
EndProject
1521
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenTK.GLControl", "Source\GLControl\OpenTK.GLControl.csproj", "{A625BE88-0000-0000-0000-000000000000}"
22+
ProjectSection(ProjectDependencies) = postProject
23+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
24+
EndProjectSection
1625
EndProject
1726
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nsis", "Installers\Nsis\Build.Installer.Nsis.csproj", "{ADC34399-7613-44D2-90B2-19250F06FE7A}"
1827
ProjectSection(ProjectDependencies) = postProject
@@ -25,10 +34,19 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nsis", "Ins
2534
EndProjectSection
2635
EndProject
2736
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Docs", "Documentation\Build.Docs.csproj", "{650C6F3D-33B5-4216-9536-956AB42C0624}"
37+
ProjectSection(ProjectDependencies) = postProject
38+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
39+
EndProjectSection
2840
EndProject
2941
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Bind", "Source\Bind\Generator.Bind.csproj", "{31D19132-0000-0000-0000-000000000000}"
42+
ProjectSection(ProjectDependencies) = postProject
43+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
44+
EndProjectSection
3045
EndProject
3146
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Convert", "Source\Converter\Generator.Convert.csproj", "{5FDFF4B6-0000-0000-0000-000000000000}"
47+
ProjectSection(ProjectDependencies) = postProject
48+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
49+
EndProjectSection
3250
EndProject
3351
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.UpdateVersion", "Source\Build.UpdateVersion\Build.UpdateVersion.csproj", "{75DC22B1-113F-4A66-96B9-2FF8208C10E8}"
3452
EndProject
@@ -52,6 +70,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build.Installer.Nuget", "In
5270
EndProjectSection
5371
EndProject
5472
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Generator.Rewrite", "Source\Generator.Rewrite\Generator.Rewrite.csproj", "{C426C9D1-8857-4E52-BAC7-4C05EE6070AB}"
73+
ProjectSection(ProjectDependencies) = postProject
74+
{75DC22B1-113F-4A66-96B9-2FF8208C10E8} = {75DC22B1-113F-4A66-96B9-2FF8208C10E8}
75+
EndProjectSection
5576
EndProject
5677
Global
5778
GlobalSection(SolutionConfigurationPlatforms) = preSolution

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ Features
1818

1919
OpenTK is available on Windows, Linux, Mac OS X, *BSD, SteamOS, Android and iOS. It can be used standalone or integrated into a GUI (Windows.Forms, WPF, GTK+, Qt, VTK, ...)
2020

21-
Binaries and NuGet packages available at http://www.opentk.com
22-
21+
Current Version 1.1 stable released 2014-Feb-10: http://www.opentk.com/news/opentk-1.1-stable-released
22+
23+
Binaries available at http://www.opentk.com
24+
25+
NuGet packages at http://www.nuget.org/packages/OpenTK/
2326

2427
Roadmap
2528
=======

Source/Bind/BindStreamWriter.cs

Lines changed: 47 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535

3636
namespace Bind
3737
{
38-
class BindStreamWriter : StreamWriter
38+
class BindStreamWriter : IDisposable
3939
{
40-
int indent_level = 0;
41-
Regex splitLines = new Regex(Environment.NewLine, RegexOptions.Compiled);
42-
//Regex splitLines = new Regex("(\r\n|\n\r|\n|\r)", RegexOptions.Compiled);
43-
40+
static readonly char[] SplitCharacters = new char[] { '\r', '\n' };
41+
readonly StreamWriter sw;
4442
public readonly string File;
4543

44+
int indent_level = 0;
45+
4646
public BindStreamWriter(string file)
47-
: base(file)
4847
{
4948
File = file;
49+
sw = new StreamWriter(file);
5050
}
5151

5252
public void Indent()
@@ -60,9 +60,10 @@ public void Unindent()
6060
--indent_level;
6161
}
6262

63-
public override void Write(string value)
63+
public void Write(string value)
6464
{
65-
var lines = splitLines.Split(value);
65+
var lines = value.Split(SplitCharacters,
66+
StringSplitOptions.RemoveEmptyEntries);
6667
bool is_multiline = lines.Length > 1;
6768
if (is_multiline)
6869
{
@@ -71,39 +72,60 @@ public override void Write(string value)
7172
{
7273
var line = lines[i];
7374
WriteIndentations();
74-
base.Write(line);
75-
base.Write(System.Environment.NewLine);
75+
sw.Write(line);
76+
sw.Write(System.Environment.NewLine);
7677
}
7778
// Write the last line without appending a newline
7879
WriteIndentations();
79-
base.Write(lines[lines.Length - 1]);
80+
sw.Write(lines[lines.Length - 1]);
8081
}
8182
else
8283
{
8384
WriteIndentations();
84-
base.Write(value);
85+
sw.Write(value);
8586
}
8687
}
8788

88-
public override void WriteLine(string value)
89+
public void Write(string format, params object[] args)
8990
{
90-
// The Mono implementation of WriteLine calls Write internally.
91-
// The .Net implementation does not.
92-
// If running on Mono, we must avoid indenting in WriteLine
93-
// because then we'll indent twice (once in WriteLine and once in Write).
94-
// If running on .Net we must indent in both WriteLine and Write.
95-
// Neat, no?
96-
if (System.Type.GetType("Mono.Runtime") == null)
97-
{
98-
WriteIndentations();
99-
}
100-
base.WriteLine(value);
91+
Write(String.Format(format, args));
92+
}
93+
94+
public void WriteLine()
95+
{
96+
sw.WriteLine();
97+
}
98+
99+
public void WriteLine(string value)
100+
{
101+
Write(value);
102+
WriteLine();
103+
}
104+
105+
public void WriteLine(string format, params object[] args)
106+
{
107+
WriteLine(String.Format(format, args));
108+
}
109+
110+
public void Flush()
111+
{
112+
sw.Flush();
113+
}
114+
115+
public void Close()
116+
{
117+
sw.Close();
101118
}
102119

103120
void WriteIndentations()
104121
{
105122
for (int i = indent_level; i > 0; i--)
106-
base.Write(" ");
123+
sw.Write(" ");
124+
}
125+
126+
public void Dispose()
127+
{
128+
sw.Dispose();
107129
}
108130
}
109131
}

Source/Bind/CSharpSpecWriter.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,12 @@ void WriteWrappers(BindStreamWriter sw, FunctionCollection wrappers,
173173
sw.WriteLine("{");
174174
sw.Indent();
175175
foreach (var d in delegates.Values.Select(d => d.First()))
176-
sw.WriteLine("\"{0}{1}\",", Settings.FunctionPrefix, d.Name);
176+
{
177+
if (!Settings.IsEnabled(Settings.Legacy.UseDllImports) || d.Extension != "Core")
178+
{
179+
sw.WriteLine("\"{0}{1}\",", Settings.FunctionPrefix, d.Name);
180+
}
181+
}
177182
sw.Unindent();
178183
sw.WriteLine("};");
179184
sw.WriteLine("EntryPoints = new IntPtr[EntryPointNames.Length];");
@@ -327,6 +332,16 @@ void WriteDocumentation(BindStreamWriter sw, Function f)
327332
docs[0] = docs[0].Insert(summary_start, category);
328333
}
329334

335+
foreach (var param in f.WrappedDelegate.Parameters)
336+
{
337+
var index = docs.IndexOf("/// <param name=\"" + param.Name +"\">");
338+
if (index != -1 && param.ComputeSize != "")
339+
{
340+
var compute_size = string.Format("[length: {0}]", param.ComputeSize);
341+
docs[index] = docs[index] + compute_size;
342+
}
343+
}
344+
330345
foreach (var doc in docs)
331346
{
332347
sw.WriteLine(doc);

Source/Bind/ES/ESGenerator.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ public ESGenerator(Settings settings, string dirName)
3333
// overloads using the "All" enum in addition to strongly-typed enums.
3434
// This can be disabled by passing "-o:-keep_untyped_enums" as a cmdline parameter.
3535
Settings.DefaultCompatibility |= Settings.Legacy.KeepUntypedEnums;
36+
Settings.DefaultCompatibility |= Settings.Legacy.UseDllImports;
3637
}
3738
}
3839
}

0 commit comments

Comments
 (0)