support String

This commit is contained in:
hyzboy 2020-09-05 17:54:21 +08:00
parent 2a1a79c736
commit 5427d10e8d
17 changed files with 21 additions and 29 deletions

View File

@ -2,7 +2,7 @@
#define HGL_GRAPH_TEXTURE_LOADER_INCLUDE
#include<hgl/io/InputStream.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/graph/Bitmap.h>
namespace hgl
{

View File

@ -4,7 +4,7 @@
#include<hgl/type/Color3f.h>
#include<hgl/type/Color4f.h>
#include<hgl/type/RectScope.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/graph/VertexAttribData.h>
#include<hgl/log/LogInfo.h>
namespace hgl

View File

@ -122,9 +122,9 @@ namespace hgl
int sl_v_r2l();
int sl_v_l2r();
template<typename T> int SimpleLayout(TextRenderable *,TileFont *,const BaseString<T> &); ///<简易排版
template<typename T> int SimpleLayout(TextRenderable *,TileFont *,const String<T> &); ///<简易排版
// template<typename T> int SimpleLayout(TileFont *,const StringList<BaseString<T>> &); ///<简易排版
// template<typename T> int SimpleLayout(TileFont *,const StringList<String<T>> &); ///<简易排版
protected:

View File

@ -2,7 +2,7 @@
#define HGL_GRAPH_MATERIAL_INCLUDE
#include<hgl/graph/material/Component.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
MATERIAL_NAMESPACE_BEGIN
enum class BlendMode

View File

@ -1,5 +1,5 @@
#pragma once
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/type/List.h>
#include<hgl/type/StringList.h>
#include<hgl/graph/vulkan/VKFormat.h>

View File

@ -2,7 +2,7 @@
#define HGL_GRAPH_RENDER_SURFACE_INCLUDE
#include<hgl/type/List.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/type/Map.h>
#include<hgl/type/RectScope.h>
#include<hgl/platform/Window.h>

View File

@ -1,7 +1,7 @@
#ifndef HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
#define HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/type/List.h>
#include<hgl/platform/Window.h>
#include<hgl/graph/vulkan/VKPhysicalDevice.h>

View File

@ -3,7 +3,7 @@
#include<hgl/graph/vulkan/VK.h>
#include<hgl/type/Map.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
VK_NAMESPACE_BEGIN
class DescriptorSetLayoutCreater;
using ShaderModuleMap=hgl::Map<VkShaderStageFlagBits,const ShaderModule *>;

View File

@ -2,7 +2,7 @@
#define HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
#include<hgl/graph/vulkan/VK.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
VK_NAMESPACE_BEGIN
class MaterialInstance
{

View File

@ -1,7 +1,7 @@
#pragma once
#include<hgl/graph/vulkan/VK.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/type/Set.h>
VK_NAMESPACE_BEGIN

View File

@ -3,7 +3,7 @@
#include<hgl/graph/vulkan/VK.h>
#include<hgl/graph/vulkan/VKBuffer.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/math/Math.h>
VK_NAMESPACE_BEGIN
/**

View File

@ -3,7 +3,7 @@
#include<hgl/graph/vulkan/VK.h>
#include<hgl/type/Map.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
VK_NAMESPACE_BEGIN
class ShaderResource;

View File

@ -5,7 +5,7 @@
#include<hgl/graph/vulkan/VKMemory.h>
#include<hgl/graph/vulkan/VKImageView.h>
#include<hgl/graph/Bitmap.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
VK_NAMESPACE_BEGIN
BitmapData *LoadBitmapFromFile(const OSString &filename);

View File

@ -2,7 +2,7 @@
#define HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
#include<hgl/graph/vulkan/VK.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
VK_NAMESPACE_BEGIN
/**
* <br>
@ -10,7 +10,6 @@ VK_NAMESPACE_BEGIN
*/
class VertexAttributeBinding
{
VertexShaderModule *vsm;
uint32_t attr_count;
VkVertexInputBindingDescription *binding_list;
VkVertexInputAttributeDescription *attribute_list;
@ -19,24 +18,17 @@ private:
friend class VertexShaderModule;
VertexAttributeBinding(VertexShaderModule *);
VertexAttributeBinding(const uint32_t,const VkVertexInputBindingDescription *,const VkVertexInputAttributeDescription *);
public:
~VertexAttributeBinding();
const uint GetStageInputBinding(const AnsiString &name); ///<取得一个变量的绑定点
bool SetInstance(const uint binding,bool instance);
bool SetStride (const uint binding,const uint32_t & stride);
bool SetFormat (const uint binding,const VkFormat & format);
bool SetOffset (const uint binding,const uint32_t offset);
bool SetInstance(const AnsiString &name,bool instance){return SetInstance(GetStageInputBinding(name),instance);}
bool SetStride (const AnsiString &name,const uint32_t &stride ){return SetStride (GetStageInputBinding(name),stride);}
bool SetFormat (const AnsiString &name,const VkFormat &format ){return SetFormat (GetStageInputBinding(name),format);}
bool SetOffset (const AnsiString &name,const uint32_t offset ){return SetOffset (GetStageInputBinding(name),offset);}
void Write(VkPipelineVertexInputStateCreateInfo &vis)const;
};//class VertexAttributeBinding
VK_NAMESPACE_END

View File

@ -1,7 +1,7 @@
#pragma once
#include<string>
#include<json/json.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
const std::string JsonToString(const Json::Value &jv_root);

View File

@ -1,5 +1,5 @@
#include<hgl/graph/vulkan/VKPipeline.h>
#include<hgl/type/BaseString.h>
#include<hgl/type/String.h>
#include<hgl/io/MemoryOutputStream.h>
#include<hgl/io/DataOutputStream.h>
#include<hgl/io/MemoryInputStream.h>

View File

@ -129,7 +129,7 @@ namespace hgl
return(true);
}
//int TextLayout::Layout(const int mc,const BaseString<T> &str)
//int TextLayout::Layout(const int mc,const String<T> &str)
//{
// if(mc<=0
// ||!str
@ -226,7 +226,7 @@ namespace hgl
* \r\n
*/
template<typename T>
int TextLayout::SimpleLayout(TextRenderable *tr,TileFont *tf,const BaseString<T> &str)
int TextLayout::SimpleLayout(TextRenderable *tr,TileFont *tf,const String<T> &str)
{
if(!tr)
return(-1);
@ -279,7 +279,7 @@ namespace hgl
int TextLayout::SimpleLayout(TextRenderable *tr,TileFont *tf,const UTF32String &str){return this->SimpleLayout<u32char>(tr,tf,str);}
//template<typename T>
//int TextLayout::SimpleLayout(TileFont *tf,const StringList<BaseString<T>> &sl)
//int TextLayout::SimpleLayout(TileFont *tf,const StringList<String<T>> &sl)
//{
//}