|
@@ -9,12 +9,6 @@ namespace Core.BRG
|
|
|
{
|
|
{
|
|
|
public class BRGRender<T> : BRGRenderBasic where T : BGRGameObjectInfo
|
|
public class BRGRender<T> : BRGRenderBasic where T : BGRGameObjectInfo
|
|
|
{
|
|
{
|
|
|
- /// <summary>
|
|
|
|
|
- /// BRG容器对象
|
|
|
|
|
- /// </summary>
|
|
|
|
|
- // private BRGRenderBasic _mBrgRenderBasic;
|
|
|
|
|
-
|
|
|
|
|
- // private int m_itemCount;
|
|
|
|
|
public bool isUpdate = true;
|
|
public bool isUpdate = true;
|
|
|
|
|
|
|
|
public List<T> m_gameObjectInfos = new List<T>();
|
|
public List<T> m_gameObjectInfos = new List<T>();
|
|
@@ -27,11 +21,21 @@ namespace Core.BRG
|
|
|
{
|
|
{
|
|
|
this.m_gameObjectInfos = gameObjectInfos;
|
|
this.m_gameObjectInfos = gameObjectInfos;
|
|
|
|
|
|
|
|
|
|
+ for (int i = 0; i < m_gameObjectInfos.Count; i++)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_gameObjectInfos[i].initIndex = i;
|
|
|
|
|
+ }
|
|
|
int maxItemSize = samples.GetAllShaderValueSize();
|
|
int maxItemSize = samples.GetAllShaderValueSize();
|
|
|
Init(samples, gameObjectInfos.Count, maxItemSize);
|
|
Init(samples, gameObjectInfos.Count, maxItemSize);
|
|
|
UploadGpuData(gameObjectInfos.Count);
|
|
UploadGpuData(gameObjectInfos.Count);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public BatchShaderBind GetBatchShaderBind(string key)
|
|
|
|
|
+ {
|
|
|
|
|
+ m_batchShaderBindMap.TryGetValue(key, out var bind);
|
|
|
|
|
+ return bind;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
protected override NativeArray<MetadataValue> ProInitBatchMetadata(int startOffset, int m_maxInstancePerWindow)
|
|
protected override NativeArray<MetadataValue> ProInitBatchMetadata(int startOffset, int m_maxInstancePerWindow)
|
|
|
{
|
|
{
|
|
|
NativeArray<MetadataValue> metadataValues =
|
|
NativeArray<MetadataValue> metadataValues =
|