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
using ImGuiNET; | |
using Veldrid; | |
using Veldrid.StartupUtilities; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
VeldridStartup.CreateWindowAndGraphicsDevice( | |
new WindowCreateInfo(100, 100, 1280, 720, Veldrid.WindowState.Normal, "ImGui Example"), |
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
using System; | |
using System.Reflection; | |
using System.Runtime.InteropServices; | |
using System.Windows; | |
using System.Windows.Media; | |
namespace Veldrid.WPF | |
{ | |
// This extends from the "Win32HwndControl" from the SharpDX example code. | |
public class VeldridComponent : Win32HwndControl |
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
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
private static readonly Dictionary<int, Func<int, int>> _funcs = new Dictionary<int, Func<int, int>>(); | |
static void Main(string[] args) | |
{ | |
for (int iter = 0; iter < 1000000; iter++) |
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
<?xml version="1.0" encoding="utf-8"?> | |
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd"> | |
<metadata minClientVersion="2.12"> | |
<id>Microsoft.NETFramework.Compatibility</id> | |
<version>2.1.0-preview1-25713-0</version> | |
<title>Microsoft.NETFramework.Compatibility</title> | |
<authors>Microsoft</authors> | |
<owners>microsoft,dotnetframework</owners> | |
<requireLicenseAcceptance>false</requireLicenseAcceptance> | |
<licenseUrl>https://github.com/dotnet/corefx/blob/master/LICENSE.TXT</licenseUrl> |
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
(lldb) clrstack -f | |
OS Thread Id: 0xa9068 (1) | |
Child SP IP Call Site | |
00007FFF5D4ADAA8 00007FFF90D4CC86 libsystem_kernel.dylib!__psynch_cvwait + 10 | |
00007FFF5D4ADAB0 00007FFF90E3696A libsystem_pthread.dylib!_pthread_cond_wait + 712 | |
00007FFF5D4ADB50 0000000102A1BB62 libcoreclr.dylib!CorUnix::CPalSynchronizationManager::ThreadNativeWait(CorUnix::_ThreadNativeWaitData*, unsigned int, CorUnix::ThreadWakeupReason*, unsigned int*) + 338 | |
00007FFF5D4ADBB0 0000000102A1B788 libcoreclr.dylib!CorUnix::CPalSynchronizationManager::BlockThread(CorUnix::CPalThread*, unsigned int, bool, bool, CorUnix::ThreadWakeupReason*, unsigned int*) + 440 | |
00007FFF5D4ADC10 0000000102A206A9 libcoreclr.dylib!CorUnix::InternalWaitForMultipleObjectsEx(CorUnix::CPalThread*, unsigned int, void* const*, int, unsigned int, int) + 1833 | |
00007FFF5D4ADDA0 0000000102BA2B05 libcoreclr.dylib!Thread::DoAppropriateWaitWorker(int, void**, int, unsigned int, WaitMode) + 1957 | |
00007FFF5D4ADE80 0000000102B9D680 libcoreclr.dylib!Thread::DoAppro |
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
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Audio; | |
using Microsoft.Xna.Framework.Content; | |
using Microsoft.Xna.Framework.Graphics; | |
using Microsoft.Xna.Framework.Input; | |
using ImGuiNET; |
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
using System; | |
using System.Numerics; | |
using static System.Numerics.Complex; | |
namespace ConsoleApp | |
{ | |
public class Program | |
{ | |
// This is the largest x for which 2 x^2 will not overflow. It is used for branching inside Asin and Acos. | |
private static readonly double s_asinOverflowThreshold = Math.Sqrt(double.MaxValue) / 2.0; |
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
public override void DrawIndexedPrimitives(int count, int startingIndex, int startingVertex) | |
{ | |
_deviceContext.DrawIndexed(count, startingIndex, startingVertex); | |
} |
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
public override void DrawIndexedPrimitives(int count, int startingIndex) | |
{ | |
PreDrawCommand(); | |
DrawElementsType elementsType = ((OpenGLIndexBuffer)IndexBuffer).ElementsType; | |
int indexSize = OpenGLFormats.GetIndexFormatSize(elementsType); | |
GL.DrawElements(_primitiveType, count, elementsType, new IntPtr(startingIndex * indexSize)); | |
} |
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
rc.DrawIndexedPrimitives(Cube.Indices.Length); // Draw the cube. |
NewerOlder