Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions Examples/ExampleMonoGame/DrawVertDeclaration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Hexa.NET.ImGui;
using Microsoft.Xna.Framework.Graphics;

namespace ExampleMonoGame;

public static class DrawVertDeclaration
{
public static readonly VertexDeclaration Declaration;

public static readonly int Size;

static unsafe DrawVertDeclaration()
{
Size = sizeof(ImDrawVert);

VertexElement position = new VertexElement(0, VertexElementFormat.Vector2, VertexElementUsage.Position, 0);
VertexElement uv = new VertexElement(8, VertexElementFormat.Vector2, VertexElementUsage.TextureCoordinate, 0);
VertexElement color = new VertexElement(16, VertexElementFormat.Color, VertexElementUsage.Color, 0);

Declaration = new VertexDeclaration(Size, position, uv, color);
}
}
21 changes: 21 additions & 0 deletions Examples/ExampleMonoGame/ExampleMonoGame.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RollForward>Major</RollForward>
<PublishReadyToRun>false</PublishReadyToRun>
<TieredCompilation>false</TieredCompilation>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<!-- package reference for StrBuilder. If not using it, don't need it-->
<PackageReference Include="Hexa.NET.Utilities" Version="2.2.2" />
<PackageReference Include="MonoGame.Framework.DesktopGL" Version="3.8.*" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Hexa.NET.ImGui\Hexa.NET.ImGui.csproj" />
</ItemGroup>
</Project>
Loading