This commit is contained in:
2020-01-03 14:32:45 +01:00
parent f4bf6c4066
commit a60bb85aa7
2 changed files with 11 additions and 6 deletions

View File

@@ -37,12 +37,17 @@ Namespace AssimpModule
Public Class AssimpLoader
Public Shared Event LoadingAssimpLibs()
Public Shared Event LoadedAssimpLibs()
Public Shared Property PathToAssimpLib32 As String = "Assimp32.dll"
Public Shared Property PathToAssimpLib64 As String = "Assimp64.dll"
Friend Shared Sub LoadAssimpLibs()
If Not AssimpLibrary.Instance.IsLibraryLoaded Then
RaiseEvent LoadingAssimpLibs()
AssimpLibrary.Instance.LoadLibrary(PathToAssimpLib32, PathToAssimpLib64)
RaiseEvent LoadedAssimpLibs()
End If
End Sub
@@ -200,9 +205,9 @@ Namespace AssimpModule
Dim cc As New ConversionContext(ac.ImportFile(fileName, PostProcessPreset.TargetRealTimeMaximumQuality Or PostProcessSteps.Triangulate), UpAxis)
Dim newObj = cc.newObj
Dim daeMdl = cc.daeMdl
Dim channelIndicies = cc.channelIndicies
Dim newObj = cc.NewObj
Dim daeMdl = cc.DaeMdl
Dim channelIndicies = cc.ChannelIndicies
For Each et As EmbeddedTexture In daeMdl.Textures
If et.HasCompressedData Then

View File

@@ -301,9 +301,9 @@ Namespace ObjModule
Case line.ToLower.StartsWith("kd ")
Dim splitColor() As String = line.Substring(3).Split(" "c)
Dim col As Color = Color.FromArgb(
Convert.ToSingle(Math.Round(255 * splitColor(0))),
Convert.ToSingle(Math.Round(255 * splitColor(1))),
Convert.ToSingle(Math.Round(255 * splitColor(2))))
Convert.ToSingle(Math.Round(CInt(splitColor(0)))),
Convert.ToSingle(Math.Round(CInt(splitColor(1)))),
Convert.ToSingle(Math.Round(CInt(splitColor(2)))))
curMat.Color = col
Case line.ToLower.StartsWith("d ")