This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eric@erme-u1610:~/projects/tests/helloworld$ lldb-3.6 /home/eric/dotnet/dotnet /home/eric/dotnet/sdk/1.0.0-preview2-003121/csc.dll | |
(lldb) target create "/home/eric/dotnet/dotnet" | |
Current executable set to '/home/eric/dotnet/dotnet' (x86_64). | |
(lldb) settings set -- target.run-args "/home/eric/dotnet/sdk/1.0.0-preview2-003121/csc.dll" | |
(lldb) run | |
Process 18985 launching | |
Process 18985 launched: '/home/eric/dotnet/dotnet' (x86_64) | |
(lldb) | |
Unhandled Exception: terminate called after throwing an instance of 'PAL_SEHException' | |
Process 18985 stopped |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creating a new docker image for use in an official build | |
Our official build in VS Online builds coreclr in a docker container. The images for this are stored on Chris Costa's docker hub account: https://hub.docker.com/r/chcosta/dotnetcore/. When adding support for a new distro, you need to create a docker image with the appropriate prerequisites for use in building the coreclr repository. | |
Notes when making a new image: | |
Run the build steps that the official build uses to ensure that the image will work as expected. https://devdiv.visualstudio.com/DevDiv/_build/index?context=allDefinitions&path=%5C&definitionId=1713&_a=completed | |
Running dotnet commands will add a ton of binary data to your home directory. Delete the ~/.nuget directory to avoid bloating the size of the docker image. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C++ Code: | |
#include <complex> | |
#include <stdio.h> | |
using namespace std; | |
void DoTests(complex<double> c) | |
{ | |
auto sq = sqrt(c); | |
auto h = hypot(c.real(), c.imag()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 | |
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Metadata version: v4.0.22220 | |
.assembly extern System.Runtime | |
{ | |
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 | |
// Copyright (c) Microsoft Corporation. All rights reserved. | |
// Metadata version: v4.0.30319 | |
.assembly extern System.Runtime | |
{ | |
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Material material = rc.ResourceFactory.CreateMaterial(rc, | |
"vertex", "fragment", | |
new MaterialVertexInput(VertexPositionColor.SizeInBytes, | |
new MaterialVertexInputElement( | |
"Position", VertexSemanticType.Position, VertexElementFormat.Float3), | |
new MaterialVertexInputElement( | |
"Color", VertexSemanticType.Color, VertexElementFormat.Float4)), | |
new MaterialInputs<MaterialGlobalInputElement>( | |
new MaterialGlobalInputElement( | |
"ViewProjectionMatrix", MaterialInputType.Matrix4x4, viewProjection)), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); | |
OpenTKWindow window = new SameThreadWindow(); | |
RenderContext rc; | |
if (isWindows && !args.Contains("opengl")) | |
{ | |
rc = new D3DRenderContext(window) | |
} | |
else | |
{ | |
rc = new OpenGLRenderContext(window); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VertexBuffer vb = rc.ResourceFactory.CreateVertexBuffer( | |
Cube.Vertices, | |
new VertexDescriptor(VertexPositionColor.SizeInBytes, 2), | |
isDynamic:false); | |
IndexBuffer ib = rc.ResourceFactory.CreateIndexBuffer( | |
Cube.Indices, | |
isDynamic: false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DynamicDataProvider<Matrix4x4> viewProjection = new DynamicDataProvider<Matrix4x4>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while (window.Exists) | |
{ | |
InputSnapshot snapshot = window.GetInputSnapshot(); // Process window events. | |
rc.ClearBuffer(); // Clear the screen. | |
rc.SetViewport(0, 0, window.Width, window.Height); // Ensure the viewport covers the whole window, in case it was resized. | |
float timeFactor = Environment.TickCount / 1000f; // Get a rough time estimate. | |
viewProjection.Data = | |
// Create a rotated camera matrix based on the current time. | |
Matrix4x4.CreateLookAt( |