From 99e6abd89a07c1edefb1e9acbd3646687cd808c2 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 29 Jul 2020 11:46:11 +0800 Subject: [PATCH] add comments --- CMCMakeModule | 2 +- example/Vulkan/DrawTile.cpp | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMCMakeModule b/CMCMakeModule index b2676f3e..7eb1cafe 160000 --- a/CMCMakeModule +++ b/CMCMakeModule @@ -1 +1 @@ -Subproject commit b2676f3e15b059069611a20a4b998b2387dbe9c2 +Subproject commit 7eb1cafe575cc305a9d09fce66494a5445da5305 diff --git a/example/Vulkan/DrawTile.cpp b/example/Vulkan/DrawTile.cpp index 7e7b9935..9fca958b 100644 --- a/example/Vulkan/DrawTile.cpp +++ b/example/Vulkan/DrawTile.cpp @@ -90,7 +90,9 @@ private: bool InitTileTexture() { - tile_data=device->CreateTileData(FMT_A1RGB5,512,512,tile_list.GetCount()); + tile_data=device->CreateTileData( FMT_A1RGB5, //纹理格式,因VK不支持实时转换,所以提交的数据格式必须与此一致 + 512,512, //TILE大小 + tile_list.GetCount()); //TILE需求数量 if(!tile_data) return(false); @@ -114,14 +116,14 @@ private: for(int i=0;ito=tile_data->Add((*tb)->bmp); + (*tb)->to=tile_data->Add((*tb)->bmp); //添加一个tile图片 - vp=WriteRect(vp,left+BORDER, + vp=WriteRect(vp,left+BORDER, //产生绘制顶点信息 top +BORDER, view_size, view_size); - tp=WriteRect(tp,(*tb)->to->uv_float); + tp=WriteRect(tp,(*tb)->to->uv_float); //产生绘制纹理坐标信息 ++col; if(col==10)