[Bf-blender-cvs] [f82744f] cycles-ptex-06: Add MLoopPtex
Nicholas Bishop
noreply at git.blender.org
Thu Jan 15 20:13:18 CET 2015
Commit: f82744f3382eb3f67446d64ab3fd5f646859b739
Author: Nicholas Bishop
Date: Mon Jan 12 13:52:11 2015 +0100
Branches: cycles-ptex-06
https://developer.blender.org/rBf82744f3382eb3f67446d64ab3fd5f646859b739
Add MLoopPtex
===================================================================
M source/blender/makesdna/DNA_meshdata_types.h
===================================================================
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index 3304980..c5a2d02 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -280,6 +280,41 @@ typedef struct MVertSkin {
int flag;
} MVertSkin;
+typedef enum PtexChannelDataType {
+ MPTEX_DATA_TYPE_UINT8 = 0,
+ MPTEX_DATA_TYPE_UINT16 = 1,
+ /* Reserved for compatibility with Ptex file format
+ * specification */
+ /* MPTEX_DATA_TYPE_FLOAT16 = 2, */
+ MPTEX_DATA_TYPE_FLOAT32 = 3,
+} PtexChannelDataType;
+
+/* Ptex texture data attached to mesh poly loops
+ *
+ * The texture is rectanglular (doesn't have to be square), and the
+ * number of pixels on each side must be a power of two. The number of
+ * texels in the texture is (2^u_res * 2^v_res).
+ *
+ * All channels have the same data type and resolution, so the data
+ * array's length in bytes is:
+ * num_texels *
+ * num_channels *
+ * data_type_size_in_bytes
+ */
+typedef struct MLoopPtex {
+ /* Channel data array */
+ void *data;
+
+ int pad;
+
+ /* enum PtexChannelDataType */
+ unsigned char data_type;
+
+ unsigned char num_channels;
+ unsigned char u_res;
+ unsigned char v_res;
+} MLoopPtex;
+
typedef struct FreestyleEdge {
char flag;
char pad[3];
More information about the Bf-blender-cvs
mailing list