Browse Source
Implemented uploading of skin texture data to Unity, and linking loaded alias models to their primary skin texture
console
Implemented uploading of skin texture data to Unity, and linking loaded alias models to their primary skin texture
console
11 changed files with 161 additions and 20 deletions
-
6Assets/Scripts/Data/QConstants.cs
-
3Assets/Scripts/Data/QConstants.cs.meta
-
27Assets/Scripts/Data/QModel.cs
-
57Assets/Scripts/Data/QTexture.cs
-
3Assets/Scripts/Data/QTexture.cs.meta
-
2Assets/Scripts/Modules/AliasModel.cs
-
24Assets/Scripts/Modules/RenderModule.Interop.cs
-
46Assets/Scripts/Modules/RenderModule.cs
-
2engine/Quake/gl_texmgr.c
-
2engine/Quake/gl_texmgr.h
-
7engine/UniQuake/gl_uniquake.c
@ -0,0 +1,6 @@ |
|||
public static class QConstants |
|||
{ |
|||
public const int MaxQPath = 64; // Should correspond to MAX_QPATH
|
|||
public const int MaxMapHulls = 4; // Should correspond to MAX_MAP_HULLS
|
|||
public const int MaxSkins = 32; // Should correspond to MAX_SKINS
|
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d507e6306af34f16916b95a6b6427762 |
|||
timeCreated: 1619100138 |
|||
@ -0,0 +1,57 @@ |
|||
using System; |
|||
using System.Runtime.InteropServices; |
|||
|
|||
/// <summary>
|
|||
/// Managed equivalent of gltexture_t
|
|||
/// </summary>
|
|||
[StructLayout(LayoutKind.Sequential, Pack = 0, CharSet = CharSet.Ansi)] |
|||
public class QGLTexture |
|||
{ |
|||
public uint texNum; |
|||
public IntPtr next; |
|||
public IntPtr owner; |
|||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string name; |
|||
public uint width; |
|||
public uint height; |
|||
public QTexPrefs flags; |
|||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = QConstants.MaxQPath)] public string sourceFile; |
|||
public UIntPtr sourceOffset; |
|||
public QTexSourceFormat sourceFormat; |
|||
public uint sourceWidth; |
|||
public uint sourceHeight; |
|||
public ushort sourceCrc; |
|||
public char shirt; |
|||
public char pants; |
|||
public int visFrame; |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Managed equivalent of srcformat
|
|||
/// </summary>
|
|||
public enum QTexSourceFormat |
|||
{ |
|||
Indexed, |
|||
Lightmap, |
|||
Rgba, |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Managed equivalent of TEXPRF_ defines
|
|||
/// </summary>
|
|||
[Flags] |
|||
public enum QTexPrefs: uint |
|||
{ |
|||
None = 0x0000, |
|||
Mipmap = 0x0001, |
|||
Linear = 0x0002, |
|||
Nearest = 0x0004, |
|||
Alpha = 0x0008, |
|||
Pad = 0x0010, |
|||
Persist = 0x0020, |
|||
Overwrite = 0x0040, |
|||
NoPicMip = 0x0080, |
|||
FullBright = 0x0100, |
|||
NoBright = 0x0200, |
|||
ConChars = 0x0400, |
|||
WarpImage = 0x0800, |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 08aab07be00d450fb56bcfa0c24a1b99 |
|||
timeCreated: 1619095043 |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue