Merge remote-tracking branch 'mellinoe/drawlist'

internals
Eric Mellino 8 years ago
commit 499fb6902b
  1. BIN
      deps/cimgui/ubuntu.14.04-x64/cimgui.so
  2. 3
      global.json
  3. 6
      src/ImGui.NET.SampleProgram.Net46/App.config
  4. 52
      src/ImGui.NET.SampleProgram.Net46/ImGui.NET.SampleProgram.Net46.csproj
  5. 4
      src/ImGui.NET.SampleProgram.Net46/packages.config
  6. 51
      src/ImGui.NET.SampleProgram/ImGui.NET.SampleProgram.csproj
  7. 25
      src/ImGui.NET.SampleProgram/project.json
  8. 178
      src/ImGui.NET.sln
  9. 2
      src/ImGui.NET/DrawData.cs
  10. 88
      src/ImGui.NET/DrawList.cs
  11. 53
      src/ImGui.NET/ImGui.NET.Net46.csproj
  12. 71
      src/ImGui.NET/ImGui.NET.csproj
  13. 68
      src/ImGui.NET/ImGui.cs
  14. 113
      src/ImGui.NET/ImGuiNative.cs
  15. 2
      src/ImGui.NET/TextInputBuffer.cs
  16. 33
      src/ImGui.NET/project.json
  17. 28
      src/imgui.net.dotnet.sln

Binary file not shown.

@ -1,3 +0,0 @@
{
"projects": [ "src" ]
}

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
</startup>
</configuration>

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{47EF850E-D555-49E7-814B-68372123CB25}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ImGuiNET</RootNamespace>
<AssemblyName>SampleGUIProgram</AssemblyName>
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
<PlatformTarget>x64</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\ImGui.NET.SampleProgram\Program.cs" />
<Compile Include="..\ImGui.NET.SampleProgram\SampleWindow.cs" />
<Compile Include="..\ImGui.NET.SampleProgram\MemoryEditor.cs" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' " />
<ItemGroup>
<Reference Include="OpenTK, Version=1.1.0.0, Culture=neutral, PublicKeyToken=bad199fe84eb3df4, processorArchitecture=MSIL">
<HintPath>..\packages\OpenTK.1.1.1589.5942\lib\NET40\OpenTK.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Numerics" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../ImGui.NET/ImGui.NET.Net46.csproj">
<Name>ImGUI.NET</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\deps\cimgui\win7-x64\cimgui.dll">
<Link>cimgui.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="OpenTK" version="1.1.1589.5942" targetFramework="net46" />
</packages>

@ -1,48 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition="'$(Configuration)' == '' And '$(OS)' != 'Windows_NT'">Ubuntu_Debug</Configuration>
<Configuration Condition="'$(Configuration)' == ''">Windows_Debug</Configuration>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ProjectGuid>{AE9BC745-284F-42F3-8236-C43F00000000}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>ImGuiNET</RootNamespace>
<AssemblyName>SampleGUIProgram</AssemblyName>
<TargetFramework>netcoreapp1.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NuGetTargetMoniker>.NETCoreApp,Version=v1.0</NuGetTargetMoniker>
<BaseNuGetRuntimeIdentifier Condition="'$(OSTarget)' == 'Windows_NT'">win7</BaseNuGetRuntimeIdentifier>
<DebugType>portable</DebugType>
<AssemblyName>ImGui.NET.SampleProgram</AssemblyName>
<OutputType>Exe</OutputType>
<RuntimeIdentifiers>win7-x64;ubuntu.14.04-x64</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<Compile Include="MemoryEditor.cs" />
<Compile Include="Program.cs" />
<Compile Include="SampleWindow.cs" />
<None Include="..\..\deps\cimgui\win7-x64\cimgui.dll" Link="cimgui.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Windows_Debug|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Windows_Release|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ubuntu_Debug|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ubuntu_Release|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'OSX_Debug|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'OSX_Release|x64' " />
<ItemGroup>
<None Include="project.json" />
<ProjectReference Include="..\ImGui.NET\ImGui.NET.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="../ImGui.NET/ImGui.NET.csproj">
<Name>ImGUI.NET</Name>
</ProjectReference>
<PackageReference Include="OpenTK.NETCore" Version="1.1.2364.6424" />
</ItemGroup>
<ItemGroup>
<Content Include="..\..\deps\cimgui\win7-x64\cimgui.dll" Condition="'$(OSTarget)' == 'Windows_NT'">
<Link>cimgui.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\deps\cimgui\ubuntu14.04-x64\cimgui.so" Condition="'$(OSTarget)' == 'Ubuntu'">
<Link>cimgui.so</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>
</Project>

@ -1,25 +0,0 @@
{
"buildOptions": {
"allowUnsafe": true,
"emitEntryPoint": true,
"debugType": "portable"
},
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0"
},
"ImGui.NET": { "target": "project" },
"OpenTK.NETCore": "1.1.2364.6424"
},
"frameworks": {
"netcoreapp1.0": {}
},
"runtimes": {
"win7-x64": {},
"ubuntu.14.04-x64": {}
},
"content": [
"cimgui.dll",
"cimgui.so"
]
}

@ -1,164 +1,46 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
# Visual Studio 15
VisualStudioVersion = 15.0.26120.4
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET.SampleProgram", "ImGui.NET.SampleProgram\ImGui.NET.SampleProgram.csproj", "{AE9BC745-284F-42F3-8236-C43F00000000}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET", "ImGui.NET\ImGui.NET.csproj", "{BD7ACEC1-4B57-491F-833A-8542FB824F84}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET", "ImGui.NET\ImGui.NET.csproj", "{2665014F-0FEC-4268-8F77-7B029921AB09}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET.Net46", "ImGui.NET\ImGui.NET.Net46.csproj", "{576DC8D0-57D6-499B-A8B1-3B43808B63A6}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET.SampleProgram.Net46", "ImGui.NET.SampleProgram.Net46\ImGui.NET.SampleProgram.Net46.csproj", "{47EF850E-D555-49E7-814B-68372123CB25}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET.SampleProgram", "ImGui.NET.SampleProgram\ImGui.NET.SampleProgram.csproj", "{79FCECB1-6190-41CF-BAF5-2D0906A59F02}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
OSX_Debug|Any CPU = OSX_Debug|Any CPU
OSX_Debug|x64 = OSX_Debug|x64
OSX_Release|Any CPU = OSX_Release|Any CPU
OSX_Release|x64 = OSX_Release|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Ubuntu_Debug|Any CPU = Ubuntu_Debug|Any CPU
Ubuntu_Debug|x64 = Ubuntu_Debug|x64
Ubuntu_Release|Any CPU = Ubuntu_Release|Any CPU
Ubuntu_Release|x64 = Ubuntu_Release|x64
Windows_Debug|Any CPU = Windows_Debug|Any CPU
Windows_Debug|x64 = Windows_Debug|x64
Windows_Release|Any CPU = Windows_Release|Any CPU
Windows_Release|x64 = Windows_Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{AE9BC745-284F-42F3-8236-C43F00000000}.Debug|Any CPU.ActiveCfg = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Debug|Any CPU.Build.0 = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Debug|x64.ActiveCfg = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Debug|x64.Build.0 = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Debug|Any CPU.ActiveCfg = OSX_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Debug|Any CPU.Build.0 = OSX_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Debug|x64.ActiveCfg = OSX_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Debug|x64.Build.0 = OSX_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Release|Any CPU.ActiveCfg = OSX_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Release|Any CPU.Build.0 = OSX_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Release|x64.ActiveCfg = OSX_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.OSX_Release|x64.Build.0 = OSX_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Release|Any CPU.ActiveCfg = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Release|Any CPU.Build.0 = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Release|x64.ActiveCfg = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Release|x64.Build.0 = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Debug|Any CPU.ActiveCfg = Ubuntu_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Debug|Any CPU.Build.0 = Ubuntu_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Debug|x64.ActiveCfg = Ubuntu_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Debug|x64.Build.0 = Ubuntu_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Release|Any CPU.ActiveCfg = Ubuntu_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Release|Any CPU.Build.0 = Ubuntu_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Release|x64.ActiveCfg = Ubuntu_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Ubuntu_Release|x64.Build.0 = Ubuntu_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Debug|Any CPU.ActiveCfg = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Debug|Any CPU.Build.0 = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Debug|x64.ActiveCfg = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Debug|x64.Build.0 = Windows_Debug|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Release|Any CPU.ActiveCfg = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Release|Any CPU.Build.0 = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Release|x64.ActiveCfg = Windows_Release|x64
{AE9BC745-284F-42F3-8236-C43F00000000}.Windows_Release|x64.Build.0 = Windows_Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Debug|x64.ActiveCfg = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Debug|x64.Build.0 = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Debug|Any CPU.Build.0 = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Debug|x64.ActiveCfg = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Debug|x64.Build.0 = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Release|Any CPU.ActiveCfg = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Release|Any CPU.Build.0 = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Release|x64.ActiveCfg = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.OSX_Release|x64.Build.0 = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Release|Any CPU.Build.0 = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Release|x64.ActiveCfg = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Release|x64.Build.0 = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Debug|Any CPU.Build.0 = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Debug|x64.ActiveCfg = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Debug|x64.Build.0 = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Release|Any CPU.ActiveCfg = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Release|Any CPU.Build.0 = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Release|x64.ActiveCfg = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Ubuntu_Release|x64.Build.0 = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Debug|Any CPU.Build.0 = Debug|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Debug|x64.ActiveCfg = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Debug|x64.Build.0 = Debug|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Release|Any CPU.ActiveCfg = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Release|Any CPU.Build.0 = Release|Any CPU
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Release|x64.ActiveCfg = Release|x64
{2665014F-0FEC-4268-8F77-7B029921AB09}.Windows_Release|x64.Build.0 = Release|x64
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Debug|x64.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Debug|x64.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Debug|Any CPU.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Debug|x64.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Debug|x64.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Release|Any CPU.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Release|Any CPU.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Release|x64.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.OSX_Release|x64.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Release|Any CPU.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Release|x64.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Release|x64.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Debug|Any CPU.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Debug|x64.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Debug|x64.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Release|Any CPU.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Release|Any CPU.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Release|x64.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Ubuntu_Release|x64.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Debug|Any CPU.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Debug|Any CPU.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Debug|x64.ActiveCfg = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Debug|x64.Build.0 = Debug|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Release|Any CPU.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Release|Any CPU.Build.0 = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Release|x64.ActiveCfg = Release|Any CPU
{576DC8D0-57D6-499B-A8B1-3B43808B63A6}.Windows_Release|x64.Build.0 = Release|Any CPU
{47EF850E-D555-49E7-814B-68372123CB25}.Debug|Any CPU.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Debug|Any CPU.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Debug|x64.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Debug|x64.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Debug|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Debug|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Debug|x64.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Debug|x64.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Release|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Release|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Release|x64.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.OSX_Release|x64.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Release|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Release|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Release|x64.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Release|x64.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Debug|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Debug|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Debug|x64.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Debug|x64.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Release|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Release|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Release|x64.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Ubuntu_Release|x64.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Debug|Any CPU.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Debug|Any CPU.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Debug|x64.ActiveCfg = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Debug|x64.Build.0 = Debug|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Release|Any CPU.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Release|Any CPU.Build.0 = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Release|x64.ActiveCfg = Release|x64
{47EF850E-D555-49E7-814B-68372123CB25}.Windows_Release|x64.Build.0 = Release|x64
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|x64.ActiveCfg = Debug|x64
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|x64.Build.0 = Debug|x64
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|x86.ActiveCfg = Debug|x86
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Debug|x86.Build.0 = Debug|x86
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|Any CPU.Build.0 = Release|Any CPU
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|x64.ActiveCfg = Release|x64
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|x64.Build.0 = Release|x64
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|x86.ActiveCfg = Release|x86
{BD7ACEC1-4B57-491F-833A-8542FB824F84}.Release|x86.Build.0 = Release|x86
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|x64.ActiveCfg = Debug|x64
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|x64.Build.0 = Debug|x64
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|x86.ActiveCfg = Debug|x86
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Debug|x86.Build.0 = Debug|x86
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|Any CPU.Build.0 = Release|Any CPU
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|x64.ActiveCfg = Release|x64
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|x64.Build.0 = Release|x64
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|x86.ActiveCfg = Release|x86
{79FCECB1-6190-41CF-BAF5-2D0906A59F02}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -12,7 +12,7 @@ namespace ImGuiNET
/// Only valid after Render() is called and before the next NewFrame() is called.
/// </summary>
public byte Valid;
public DrawList** CmdLists;
public NativeDrawList** CmdLists;
public int CmdListsCount;
/// <summary>
/// For convenience, sum of all cmd_lists vtx_buffer.Size

@ -1,8 +1,94 @@
using System;
using System.Buffers;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
namespace ImGuiNET
{
public unsafe struct DrawList
{
private readonly NativeDrawList* _nativeDrawList;
public DrawList(NativeDrawList* nativeDrawList)
{
_nativeDrawList = nativeDrawList;
}
public static DrawList GetForCurrentWindow()
{
return new DrawList(ImGuiNative.igGetWindowDrawList());
}
public void AddLine(Vector2 a, Vector2 b, uint color, float thickness)
{
ImGuiNative.ImDrawList_AddLine(_nativeDrawList, a, b, color, thickness);
}
public void AddRect(Vector2 a, Vector2 b, uint color, float rounding, int rounding_corners, float thickness)
{
ImGuiNative.ImDrawList_AddRect(_nativeDrawList, a, b, color, rounding, rounding_corners, thickness);
}
public void AddRectFilled(Vector2 a, Vector2 b, uint color, float rounding, int rounding_corners = ~0)
{
ImGuiNative.ImDrawList_AddRectFilled(_nativeDrawList, a, b, color, rounding, rounding_corners);
}
public void AddRectFilledMultiColor(
Vector2 a,
Vector2 b,
uint colorUpperLeft,
uint colorUpperRight,
uint colorBottomRight,
uint colorBottomLeft)
{
ImGuiNative.ImDrawList_AddRectFilledMultiColor(
_nativeDrawList,
a,
b,
colorUpperLeft,
colorUpperRight,
colorBottomRight,
colorBottomLeft);
}
public void AddCircle(Vector2 center, float radius, uint color, int numSegments, float thickness)
{
ImGuiNative.ImDrawList_AddCircle(_nativeDrawList, center, radius, color, numSegments, thickness);
}
public unsafe void AddText(Vector2 position, string text, uint color)
{
int bytes = Encoding.UTF8.GetByteCount(text);
byte[] tempBytes = ArrayPool<byte>.Shared.Rent(bytes);
Encoding.UTF8.GetBytes(text, 0, text.Length, tempBytes, 0);
fixed (byte* bytePtr = &tempBytes[0])
{
ImGuiNative.ImDrawList_AddText(_nativeDrawList, position, color, bytePtr, bytePtr + bytes);
}
}
public void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentClipRect)
{
ImGuiNative.ImDrawList_PushClipRect(_nativeDrawList, min, max, intersectWithCurrentClipRect ? (byte)1 : (byte)0);
}
public void PushClipRectFullScreen()
{
ImGuiNative.ImDrawList_PushClipRectFullScreen(_nativeDrawList);
}
public void PopClipRect()
{
ImGuiNative.ImDrawList_PopClipRect(_nativeDrawList);
}
public void AddDrawCmd()
{
ImGuiNative.ImDrawList_AddDrawCmd(_nativeDrawList);
}
}
/// <summary>
/// Draw command list
/// This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering.
@ -12,7 +98,7 @@ namespace ImGuiNET
/// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions).
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public unsafe struct DrawList
public unsafe struct NativeDrawList
{
// This is what you have to render

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ProjectGuid>{576DC8D0-57D6-499B-A8B1-3B43808B63A6}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ImGui</RootNamespace>
<AssemblyName>ImGui.NET</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<ResolveNuGetPackages>false</ResolveNuGetPackages>
</PropertyGroup>
<ItemGroup>
<Compile Include="Align.cs" />
<Compile Include="ColorTarget.cs" />
<Compile Include="TreeNodeFlags.cs" />
<Compile Include="IntStructs.cs" />
<Compile Include="MouseCursorKind.cs" />
<Compile Include="NativeIO.cs" />
<Compile Include="SelectableFlags.cs" />
<Compile Include="StyleVar.cs" />
<Compile Include="Style.cs" />
<Compile Include="WindowFlags.cs" />
<Compile Include="ColorEditMode.cs" />
<Compile Include="GuiKey.cs" />
<Compile Include="DrawCmd.cs" />
<Compile Include="DrawData.cs" />
<Compile Include="DrawList.cs" />
<Compile Include="DrawVert.cs" />
<Compile Include="Font.cs" />
<Compile Include="FontAtlas.cs" />
<Compile Include="FontConfig.cs" />
<Compile Include="ImGui.cs" />
<Compile Include="IO.cs" />
<Compile Include="Storage.cs" />
<Compile Include="NativeStyle.cs" />
<Compile Include="ImVector.cs" />
<Compile Include="InputTextFlags.cs" />
<Compile Include="ImGuiNative.cs" />
<Compile Include="SetCondition.cs" />
<Compile Include="TextEditCallback.cs" />
<Compile Include="TextEditCallbackData.cs" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Numerics" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

@ -1,51 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<ProjectGuid>{2665014F-0FEC-4268-8F77-7B029921AB09}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>ImGuiNET</RootNamespace>
<AssemblyName>ImGui.NET</AssemblyName>
<Description>A .NET wrapper for the dear ImGui library.</Description>
<VersionPrefix>0.1.6</VersionPrefix>
<Authors>Eric Mellino</Authors>
<TargetFramework>netstandard1.1</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<NuGetTargetMoniker>.NETStandard,Version=v1.1</NuGetTargetMoniker>
<DebugType>portable</DebugType>
<AssemblyName>ImGui.NET</AssemblyName>
<PackageId>ImGui.NET</PackageId>
<PackageTags>ImGui ImGui.NET Immediate Mode GUI</PackageTags>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageProjectUrl>https://github.com/mellinoe/imgui.net</PackageProjectUrl>
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<DocumentationFile Condition="'$(Configuration)' == 'Release'">bin\Release\ImGui.NET.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Compile Include="Align.cs" />
<Compile Include="ColorTarget.cs" />
<Compile Include="TreeNodeFlags.cs" />
<Compile Include="IntStructs.cs" />
<Compile Include="MouseCursorKind.cs" />
<Compile Include="NativeIO.cs" />
<Compile Include="SelectableFlags.cs" />
<Compile Include="StyleVar.cs" />
<Compile Include="Style.cs" />
<Compile Include="TextInputBuffer.cs" />
<Compile Include="WindowFlags.cs" />
<Compile Include="ColorEditMode.cs" />
<Compile Include="GuiKey.cs" />
<Compile Include="DrawCmd.cs" />
<Compile Include="DrawData.cs" />
<Compile Include="DrawList.cs" />
<Compile Include="DrawVert.cs" />
<Compile Include="Font.cs" />
<Compile Include="FontAtlas.cs" />
<Compile Include="FontConfig.cs" />
<Compile Include="ImGui.cs" />
<Compile Include="IO.cs" />
<Compile Include="Storage.cs" />
<Compile Include="NativeStyle.cs" />
<Compile Include="ImVector.cs" />
<Compile Include="InputTextFlags.cs" />
<Compile Include="ImGuiNative.cs" />
<Compile Include="SetCondition.cs" />
<Compile Include="TextEditCallback.cs" />
<Compile Include="TextEditCallbackData.cs" />
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
<PackageReference Include="System.Numerics.Vectors" Version="4.3.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.3.0" />
<PackageReference Include="System.Runtime.Extensions" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Buffers" Version="4.3.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' " />
<ItemGroup>
<None Include="project.json" />
<Content Include="..\..\deps\cimgui\win7-x64\cimgui.dll">
<PackagePath>runtimes/win7-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
<Content Include="..\..\deps\cimgui\ubuntu.14.04-x64\cimgui.so">
<PackagePath>runtimes/ubuntu.14.04-x64/native</PackagePath>
<Pack>true</Pack>
</Content>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

@ -147,6 +147,7 @@ namespace ImGuiNET
return ImGuiNative.igCollapsingHeader(label, (defaultOpen ? default_open_flags : 0));
}
public static bool CollapsingHeader(string label, TreeNodeFlags flags)
{
return ImGuiNative.igCollapsingHeader(label, flags);
@ -420,6 +421,11 @@ namespace ImGuiNET
ImGuiNative.igSetNextWindowSize(size, condition);
}
public static void SetNextWindowFocus()
{
ImGuiNative.igSetNextWindowFocus();
}
public static void SetNextWindowPos(Vector2 position, SetCondition condition)
{
ImGuiNative.igSetNextWindowPos(position, condition);
@ -446,7 +452,7 @@ namespace ImGuiNET
{
for (int i = 0; i < drawData->CmdListsCount; i++)
{
DrawList* cmd_list = drawData->CmdLists[i];
NativeDrawList* cmd_list = drawData->CmdLists[i];
for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
{
DrawCmd* drawCmdList = (DrawCmd*)cmd_list->CmdBuffer.Data;
@ -474,6 +480,14 @@ namespace ImGuiNET
return size;
}
public static Vector2 GetWindowPosition()
{
Vector2 pos;
ImGuiNative.igGetWindowPos(out pos);
return pos;
}
public static void SetWindowSize(Vector2 size, SetCondition cond = 0)
{
ImGuiNative.igSetWindowSize(size, cond);
@ -507,9 +521,9 @@ namespace ImGuiNET
return ImGuiNative.igBeginMenu(label, enabled);
}
public static void BeginMenuBar()
public static bool BeginMenuBar()
{
ImGuiNative.igBeginMenuBar();
return ImGuiNative.igBeginMenuBar();
}
public static void CloseCurrentPopup()
@ -637,6 +651,25 @@ namespace ImGuiNET
ImGuiNative.igEndChildFrame();
}
public static unsafe void ColorConvertRGBToHSV(float r, float g, float b, out float h, out float s, out float v)
{
float h2, s2, v2;
ImGuiNative.igColorConvertRGBtoHSV(r, g, b, &h2, &s2, &v2);
h = h2;
s = s2;
v = v2;
}
public static unsafe void ColorConvertHSVToRGB(float h, float s, float v, out float r, out float g, out float b)
{
float r2, g2, b2;
ImGuiNative.igColorConvertHSVtoRGB(h, s, v, &r2, &g2, &b2);
r = r2;
g = g2;
b = b2;
}
public static int GetKeyIndex(GuiKey key)
{
//TODO this got exported by later version of cimgui, call ImGuiNative after upgrading
@ -689,9 +722,14 @@ namespace ImGuiNET
return ImGuiNative.igIsMouseHoveringAnyWindow();
}
public static bool IsWindowFocused()
{
return ImGuiNative.igIsWindowFocused();
}
public static bool IsMouseHoveringRect(Vector2 minPosition, Vector2 maxPosition, bool clip)
{
return IsMouseHoveringRect(minPosition, maxPosition, clip);
return ImGuiNative.igIsMouseHoveringRect(minPosition, maxPosition, clip);
}
public static bool IsMouseDragging(int button, float lockThreshold)
@ -744,6 +782,18 @@ namespace ImGuiNET
return retVal;
}
public static unsafe Vector2 GetCursorScreenPos()
{
Vector2 retVal;
ImGuiNative.igGetCursorScreenPos(&retVal);
return retVal;
}
public static void SetCursorScreenPos(Vector2 pos)
{
ImGuiNative.igSetCursorScreenPos(pos);
}
public static bool BeginChild(string id, bool border = false, WindowFlags flags = 0)
{
return BeginChild(id, new Vector2(0, 0), border, flags);
@ -957,6 +1007,16 @@ namespace ImGuiNET
ImGuiNative.igSameLine(localPositionX, spacingW);
}
public static void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentCliRect)
{
ImGuiNative.igPushClipRect(min, max, intersectWithCurrentCliRect ? (byte)1 : (byte)0);
}
public static void PopClipRect()
{
ImGuiNative.igPopClipRect();
}
public static bool IsLastItemHovered()
{
return ImGuiNative.igIsItemHovered();

@ -69,7 +69,7 @@ namespace ImGuiNET
public static extern float igGetWindowContentRegionWidth();
[DllImport(cimguiLib)]
public static extern DrawList* igGetWindowDrawList();
public static extern NativeDrawList* igGetWindowDrawList();
[DllImport(cimguiLib)]
public static extern void igSetWindowFontScale(float scale);
[DllImport(cimguiLib)]
@ -604,6 +604,12 @@ namespace ImGuiNET
//public static extern void igLogText(string fmt, ...);
public static extern void igLogText(string fmt);
// Clipping
[DllImport(cimguiLib)]
public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect);
[DllImport(cimguiLib)]
public static extern void igPopClipRect();
// Utilities
[DllImport(cimguiLib)]
[return: MarshalAs(UnmanagedType.I1)]
@ -783,20 +789,113 @@ namespace ImGuiNET
public static extern void ImGuiIO_AddInputCharactersUTF8(string utf8_chars);
[DllImport(cimguiLib)]
public static extern int ImDrawList_GetVertexBufferSize(DrawList* list);
public static extern int ImDrawList_GetVertexBufferSize(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern DrawVert* ImDrawList_GetVertexPtr(DrawList* list, int n);
public static extern DrawVert* ImDrawList_GetVertexPtr(NativeDrawList* list, int n);
[DllImport(cimguiLib)]
public static extern int ImDrawList_GetIndexBufferSize(DrawList* list);
public static extern int ImDrawList_GetIndexBufferSize(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern ushort* ImDrawList_GetIndexPtr(DrawList* list, int n);
public static extern ushort* ImDrawList_GetIndexPtr(NativeDrawList* list, int n);
[DllImport(cimguiLib)]
public static extern int ImDrawList_GetCmdSize(DrawList* list);
public static extern int ImDrawList_GetCmdSize(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern DrawCmd* ImDrawList_GetCmdPtr(DrawList* list, int n);
public static extern DrawCmd* ImDrawList_GetCmdPtr(NativeDrawList* list, int n);
[DllImport(cimguiLib)]
public static extern void ImDrawData_DeIndexAllBuffers(DrawData* drawData);
[DllImport(cimguiLib)]
public static extern void ImDrawList_Clear(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_ClearFreeMemory(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PushClipRect(NativeDrawList* list, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PushClipRectFullScreen(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PopClipRect(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PushTextureID(NativeDrawList* list, void* texture_id);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PopTextureID(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddLine(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddRect(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddRectFilled(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddRectFilledMultiColor(NativeDrawList* list, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left);
[DllImport(cimguiLib)]
public static extern void ImDrawLust_AddQuad(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawLust_AddQuadFilled(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddTriangle(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, uint col, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddTriangleFilled(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddCircle(NativeDrawList* list, Vector2 centre, float radius, uint col, int num_segments, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddCircleFilled(NativeDrawList* list, Vector2 centre, float radius, uint col, int num_segments);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddText(NativeDrawList* list, Vector2 pos, uint col, byte* text_begin, byte* text_end);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddTextExt(NativeDrawList* list, NativeFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddImage(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 uv0, Vector2 uv1, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddPolyline(NativeDrawList* list, Vector2* points, int num_points, uint col, byte closed, float thickness, byte anti_aliased);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddConvexPolyFilled(NativeDrawList* list, Vector2* points, int num_points, uint col, byte anti_aliased);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddBezierCurve(NativeDrawList* list, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathClear(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathLineTo(NativeDrawList* list, Vector2 pos);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathLineToMergeDuplicate(NativeDrawList* list, Vector2 pos);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathFill(NativeDrawList* list, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathStroke(NativeDrawList* list, uint col, byte closed, float thickness);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathArcTo(NativeDrawList* list, Vector2 centre, float radius, float a_min, float a_max, int num_segments);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathArcToFast(NativeDrawList* list, Vector2 centre, float radius, int a_min_of_12, int a_max_of_12);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathBezierCurveTo(NativeDrawList* list, Vector2 p1, Vector2 p2, Vector2 p3, int num_segments);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PathRect(NativeDrawList* list, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners);
[DllImport(cimguiLib)]
public static extern void ImDrawList_ChannelsSplit(NativeDrawList* list, int channels_count);
[DllImport(cimguiLib)]
public static extern void ImDrawList_ChannelsMerge(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_ChannelsSetCurrent(NativeDrawList* list, int channel_index);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddCallback(NativeDrawList* list, ImDrawCallback callback, void* callback_data);
[DllImport(cimguiLib)]
public static extern void ImDrawList_AddDrawCmd(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimReserve(NativeDrawList* list, int idx_count, int vtx_count);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimRect(NativeDrawList* list, Vector2 a, Vector2 b, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimRectUV(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimQuadUV(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimVtx(NativeDrawList* list, Vector2 pos, Vector2 uv, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimWriteVtx(NativeDrawList* list, Vector2 pos, Vector2 uv, uint col);
[DllImport(cimguiLib)]
public static extern void ImDrawList_PrimWriteIdx(NativeDrawList* list, ushort idx);
[DllImport(cimguiLib)]
public static extern void ImDrawList_UpdateClipRect(NativeDrawList* list);
[DllImport(cimguiLib)]
public static extern void ImDrawList_UpdateTextureID(NativeDrawList* list);
}
public delegate bool ItemSelectedCallback(IntPtr data, int index, string out_text);
public unsafe delegate void ImDrawCallback(DrawList* parent_list, DrawCmd* cmd);
}

@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
@ -91,6 +92,7 @@ namespace ImGuiNET
}
set
{
Debug.Assert(value != null);
if (value.Length > Length) // Doesn't fit into current buffer
{
FreeNativeBuffer();

@ -1,33 +0,0 @@
{
"version": "0.1.5-*",
"description": "A .NET wrapper for the dear ImGui library.",
"projectUrl": "https://github.com/mellinoe/imgui.net",
"authors": [
"Eric Mellino"
],
"packOptions": {
"tags": [
"ImGui ImGui.NET Immediate Mode GUI"
]
},
"buildOptions": {
"allowUnsafe": true,
"debugType": "portable"
},
"dependencies": {
"System.Diagnostics.Debug": "4.0.11",
"System.Numerics.Vectors": "4.1.1",
"System.Runtime.CompilerServices.Unsafe": "4.0.0",
"System.Runtime.Extensions": "4.1.0",
"System.Runtime.InteropServices": "4.1.0"
},
"frameworks": {
"netstandard1.1": {}
},
"packInclude": {
"runtimes/osx.10.10-x64/native/": "../../deps/cimgui/osx.10.10-x64/cimgui.dylib",
"runtimes/win7-x64/native/": "../../deps/cimgui/win7-x64/cimgui.dll",
"runtimes/ubuntu.14.04-x64/native/": "../../deps/cimgui/ubuntu.14.04-x64/cimgui.so",
"runtimes/ubuntu.15.04-x64/native/": "../../deps/cimgui/ubuntu.14.04-x64/cimgui.so"
}
}

@ -1,28 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImGui.NET", "D:\OSS\imgui.net\src\ImGui.NET\ImGui.NET.xproj", "{96D9B05A-94DA-426D-AE09-DC5346F834CB}"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "ImGui.NET.SampleProgram", "D:\OSS\imgui.net\src\ImGui.NET.SampleProgram\ImGui.NET.SampleProgram.xproj", "{8C3965D6-CC79-450B-BA6F-7B5F57B90AA7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{96D9B05A-94DA-426D-AE09-DC5346F834CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{96D9B05A-94DA-426D-AE09-DC5346F834CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{96D9B05A-94DA-426D-AE09-DC5346F834CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{96D9B05A-94DA-426D-AE09-DC5346F834CB}.Release|Any CPU.Build.0 = Release|Any CPU
{8C3965D6-CC79-450B-BA6F-7B5F57B90AA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C3965D6-CC79-450B-BA6F-7B5F57B90AA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C3965D6-CC79-450B-BA6F-7B5F57B90AA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8C3965D6-CC79-450B-BA6F-7B5F57B90AA7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading…
Cancel
Save