mirror of
https://github.com/4sval/FModel.git
synced 2026-04-25 15:39:01 -05:00
fixes
This commit is contained in:
parent
481d9d3032
commit
f98c8b34da
|
|
@ -86,7 +86,8 @@ public class CUE4ParseViewModel : ViewModel
|
||||||
{
|
{
|
||||||
return Application.Current.Dispatcher.Invoke(delegate
|
return Application.Current.Dispatcher.Invoke(delegate
|
||||||
{
|
{
|
||||||
return _snooper ??= new Snooper(GameWindowSettings.Default,
|
return _snooper ??= new Snooper(
|
||||||
|
new GameWindowSettings { RenderFrequency = 240 },
|
||||||
new NativeWindowSettings
|
new NativeWindowSettings
|
||||||
{
|
{
|
||||||
Size = new OpenTK.Mathematics.Vector2i(
|
Size = new OpenTK.Mathematics.Vector2i(
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
using CUE4Parse.UE4.Assets.Exports;
|
using CUE4Parse.UE4.Assets.Exports;
|
||||||
using CUE4Parse.UE4.Objects.Core.Math;
|
|
||||||
using CUE4Parse.UE4.Objects.Core.Misc;
|
using CUE4Parse.UE4.Objects.Core.Misc;
|
||||||
using FModel.Views.Snooper.Shading;
|
using FModel.Views.Snooper.Shading;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using CUE4Parse.UE4.Assets.Exports;
|
using CUE4Parse.UE4.Assets.Exports;
|
||||||
using CUE4Parse.UE4.Objects.Core.Math;
|
|
||||||
using CUE4Parse.UE4.Objects.Core.Misc;
|
using CUE4Parse.UE4.Objects.Core.Misc;
|
||||||
using FModel.Views.Snooper.Shading;
|
using FModel.Views.Snooper.Shading;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ public class Model : IDisposable
|
||||||
Type = export.ExportType;
|
Type = export.ExportType;
|
||||||
UvCount = 1;
|
UvCount = 1;
|
||||||
Box = new FBox(new FVector(-2f), new FVector(2f));
|
Box = new FBox(new FVector(-2f), new FVector(2f));
|
||||||
|
Sockets = Array.Empty<Socket>();
|
||||||
|
Morphs = Array.Empty<Morph>();
|
||||||
Transforms = new List<Transform>();
|
Transforms = new List<Transform>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,8 +99,6 @@ public class Model : IDisposable
|
||||||
if (export.Sockets[i].Load<UStaticMeshSocket>() is not { } socket) continue;
|
if (export.Sockets[i].Load<UStaticMeshSocket>() is not { } socket) continue;
|
||||||
Sockets[i] = new Socket(socket, Transforms[0]);
|
Sockets[i] = new Socket(socket, Transforms[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Morphs = Array.Empty<Morph>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public Model(USkeletalMesh export, CSkeletalMesh skeletalMesh) : this(export, skeletalMesh, Transform.Identity) {}
|
public Model(USkeletalMesh export, CSkeletalMesh skeletalMesh) : this(export, skeletalMesh, Transform.Identity) {}
|
||||||
|
|
@ -301,7 +301,7 @@ public class Model : IDisposable
|
||||||
public void Setup(Options options)
|
public void Setup(Options options)
|
||||||
{
|
{
|
||||||
_handle = GL.CreateProgram();
|
_handle = GL.CreateProgram();
|
||||||
var broken = GL.GetInteger(GetPName.MaxTextureUnits) == 0;
|
var broken = GL.GetInteger(GetPName.MaxTextureCoords) == 0;
|
||||||
|
|
||||||
_ebo = new BufferObject<uint>(Indices, BufferTarget.ElementArrayBuffer);
|
_ebo = new BufferObject<uint>(Indices, BufferTarget.ElementArrayBuffer);
|
||||||
_vbo = new BufferObject<float>(Vertices, BufferTarget.ArrayBuffer);
|
_vbo = new BufferObject<float>(Vertices, BufferTarget.ArrayBuffer);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ public class Shader : IDisposable
|
||||||
var handle = GL.CreateShader(type);
|
var handle = GL.CreateShader(type);
|
||||||
|
|
||||||
var content = reader.ReadToEnd();
|
var content = reader.ReadToEnd();
|
||||||
if (file.Equals("default.frag") && GL.GetInteger(GetPName.MaxTextureUnits) == 0)
|
if (file.Equals("default.frag") && GL.GetInteger(GetPName.MaxTextureCoords) == 0)
|
||||||
content = content.Replace("#define MAX_UV_COUNT 8", "#define MAX_UV_COUNT 1");
|
content = content.Replace("#define MAX_UV_COUNT 8", "#define MAX_UV_COUNT 1");
|
||||||
|
|
||||||
GL.ShaderSource(handle, content);
|
GL.ShaderSource(handle, content);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user