mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-05-27 22:00:23 -04:00
Fixed #223
This commit is contained in:
parent
e0dcd6ac10
commit
a3e430d98d
@ -841,9 +841,13 @@ namespace AssetStudio
|
|||||||
var m_Mesh = new Mesh(asset, true);
|
var m_Mesh = new Mesh(asset, true);
|
||||||
if (m_Mesh.m_VertexCount > 0)
|
if (m_Mesh.m_VertexCount > 0)
|
||||||
{
|
{
|
||||||
glControl1.Visible = true;
|
|
||||||
viewMatrixData = Matrix4.CreateRotationY(-(float)Math.PI / 4) * Matrix4.CreateRotationX(-(float)Math.PI / 6);
|
viewMatrixData = Matrix4.CreateRotationY(-(float)Math.PI / 4) * Matrix4.CreateRotationX(-(float)Math.PI / 6);
|
||||||
#region Vertices
|
#region Vertices
|
||||||
|
if (m_Mesh.m_Vertices == null || m_Mesh.m_Vertices.Length == 0)
|
||||||
|
{
|
||||||
|
StatusStripUpdate("Mesh can't be previewed.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
int count = 3;
|
int count = 3;
|
||||||
if (m_Mesh.m_Vertices.Length == m_Mesh.m_VertexCount * 4)
|
if (m_Mesh.m_Vertices.Length == m_Mesh.m_VertexCount * 4)
|
||||||
{
|
{
|
||||||
@ -970,6 +974,7 @@ namespace AssetStudio
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
glControl1.Visible = true;
|
||||||
createVAO();
|
createVAO();
|
||||||
}
|
}
|
||||||
StatusStripUpdate("Using OpenGL Version: " + GL.GetString(StringName.Version) + "\n"
|
StatusStripUpdate("Using OpenGL Version: " + GL.GetString(StringName.Version) + "\n"
|
||||||
|
@ -178,6 +178,10 @@ namespace AssetStudio
|
|||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.AppendLine("g " + m_Mesh.m_Name);
|
sb.AppendLine("g " + m_Mesh.m_Name);
|
||||||
#region Vertices
|
#region Vertices
|
||||||
|
if (m_Mesh.m_Vertices == null || m_Mesh.m_Vertices.Length == 0)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
int c = 3;
|
int c = 3;
|
||||||
if (m_Mesh.m_Vertices.Length == m_Mesh.m_VertexCount * 4)
|
if (m_Mesh.m_Vertices.Length == m_Mesh.m_VertexCount * 4)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user