added code to generate a mesh to render; rendering not yet fully implemented
This commit is contained in:
@@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EngineSharp.Core", "EngineS
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EngineSharp", "..\EngineSharp\EngineSharp.csproj", "{1D984FEE-1A61-4E35-9D00-0264D92A31F4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EngineSharp.Extensions", "..\EngineSharp.Extensions\EngineSharp.Extensions.csproj", "{61306157-AA01-4899-8F80-50D6E76FEBB0}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -18,5 +20,9 @@ Global
|
||||
{1D984FEE-1A61-4E35-9D00-0264D92A31F4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1D984FEE-1A61-4E35-9D00-0264D92A31F4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1D984FEE-1A61-4E35-9D00-0264D92A31F4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{61306157-AA01-4899-8F80-50D6E76FEBB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{61306157-AA01-4899-8F80-50D6E76FEBB0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{61306157-AA01-4899-8F80-50D6E76FEBB0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{61306157-AA01-4899-8F80-50D6E76FEBB0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
|
||||
@@ -4,9 +4,9 @@ namespace EngineSharp.Core.Rendering;
|
||||
|
||||
public class Mesh
|
||||
{
|
||||
public Vector3D<float>[] Vertices { get; set; }
|
||||
public Vector3D<float>[] Normals { get; set; }
|
||||
public uint[] Indices { get; set; }
|
||||
public Vector3D<float>[] Vertices { get; set; } = [];
|
||||
public Vector3D<float>[] Normals { get; set; } = [];
|
||||
public uint[] Indices { get; set; } = [];
|
||||
|
||||
// TODO: Add uv textures but make them nullable; MeshRenderer should then only send uv data to shader if specified
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace EngineSharp.Core.Rendering;
|
||||
|
||||
public class MeshRenderer : RenderComponent
|
||||
{
|
||||
public Mesh Mesh { get; set; }
|
||||
public required Mesh Mesh { get; set; }
|
||||
|
||||
private uint vao, vbo, ebo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user