浏览代码

get max dynamic verts in script

you can now get the max dynamic vertices in script.
Nathan Bowhay 10 年之前
父节点
当前提交
df2ca75b13
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      Engine/source/console/consoleFunctions.cpp

+ 8 - 0
Engine/source/console/consoleFunctions.cpp

@@ -37,6 +37,7 @@
 #include "console/compiler.h"
 #include "platform/platformInput.h"
 #include "core/util/journal/journal.h"
+#include "gfx/gfxEnums.h"
 #include "core/util/uuid.h"
 
 #ifdef TORQUE_DEMO_PURCHASE
@@ -3065,3 +3066,10 @@ DefineEngineFunction( isToolBuild, bool, (),,
    return false;
 #endif
 }
+
+DefineEngineFunction( getMaxDynamicVerts, S32, (),,
+	"Get max number of allowable dynamic vertices in a single vertex buffer.\n\n"
+	"@return the max number of allowable dynamic vertices in a single vertex buffer" )
+{
+	return MAX_DYNAMIC_VERTS / 2;
+}