support String
This commit is contained in:
parent
2a1a79c736
commit
5427d10e8d
@ -2,7 +2,7 @@
|
|||||||
#define HGL_GRAPH_TEXTURE_LOADER_INCLUDE
|
#define HGL_GRAPH_TEXTURE_LOADER_INCLUDE
|
||||||
|
|
||||||
#include<hgl/io/InputStream.h>
|
#include<hgl/io/InputStream.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/graph/Bitmap.h>
|
#include<hgl/graph/Bitmap.h>
|
||||||
namespace hgl
|
namespace hgl
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#include<hgl/type/Color3f.h>
|
#include<hgl/type/Color3f.h>
|
||||||
#include<hgl/type/Color4f.h>
|
#include<hgl/type/Color4f.h>
|
||||||
#include<hgl/type/RectScope.h>
|
#include<hgl/type/RectScope.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/graph/VertexAttribData.h>
|
#include<hgl/graph/VertexAttribData.h>
|
||||||
#include<hgl/log/LogInfo.h>
|
#include<hgl/log/LogInfo.h>
|
||||||
namespace hgl
|
namespace hgl
|
||||||
|
@ -122,9 +122,9 @@ namespace hgl
|
|||||||
int sl_v_r2l();
|
int sl_v_r2l();
|
||||||
int sl_v_l2r();
|
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:
|
protected:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define HGL_GRAPH_MATERIAL_INCLUDE
|
#define HGL_GRAPH_MATERIAL_INCLUDE
|
||||||
|
|
||||||
#include<hgl/graph/material/Component.h>
|
#include<hgl/graph/material/Component.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
|
|
||||||
MATERIAL_NAMESPACE_BEGIN
|
MATERIAL_NAMESPACE_BEGIN
|
||||||
enum class BlendMode
|
enum class BlendMode
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/type/List.h>
|
#include<hgl/type/List.h>
|
||||||
#include<hgl/type/StringList.h>
|
#include<hgl/type/StringList.h>
|
||||||
#include<hgl/graph/vulkan/VKFormat.h>
|
#include<hgl/graph/vulkan/VKFormat.h>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define HGL_GRAPH_RENDER_SURFACE_INCLUDE
|
#define HGL_GRAPH_RENDER_SURFACE_INCLUDE
|
||||||
|
|
||||||
#include<hgl/type/List.h>
|
#include<hgl/type/List.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/type/Map.h>
|
#include<hgl/type/Map.h>
|
||||||
#include<hgl/type/RectScope.h>
|
#include<hgl/type/RectScope.h>
|
||||||
#include<hgl/platform/Window.h>
|
#include<hgl/platform/Window.h>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
|
#ifndef HGL_GRAPH_VULKAN_INSTANCE_INCLUDE
|
||||||
#define 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/type/List.h>
|
||||||
#include<hgl/platform/Window.h>
|
#include<hgl/platform/Window.h>
|
||||||
#include<hgl/graph/vulkan/VKPhysicalDevice.h>
|
#include<hgl/graph/vulkan/VKPhysicalDevice.h>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/type/Map.h>
|
#include<hgl/type/Map.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
class DescriptorSetLayoutCreater;
|
class DescriptorSetLayoutCreater;
|
||||||
using ShaderModuleMap=hgl::Map<VkShaderStageFlagBits,const ShaderModule *>;
|
using ShaderModuleMap=hgl::Map<VkShaderStageFlagBits,const ShaderModule *>;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
|
#define HGL_GRAPH_VULKAN_MATERIAL_INSTANCE_INCLUDE
|
||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
class MaterialInstance
|
class MaterialInstance
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/type/Set.h>
|
#include<hgl/type/Set.h>
|
||||||
|
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/graph/vulkan/VKBuffer.h>
|
#include<hgl/graph/vulkan/VKBuffer.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/math/Math.h>
|
#include<hgl/math/Math.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
/**
|
/**
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/type/Map.h>
|
#include<hgl/type/Map.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
|
|
||||||
class ShaderResource;
|
class ShaderResource;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include<hgl/graph/vulkan/VKMemory.h>
|
#include<hgl/graph/vulkan/VKMemory.h>
|
||||||
#include<hgl/graph/vulkan/VKImageView.h>
|
#include<hgl/graph/vulkan/VKImageView.h>
|
||||||
#include<hgl/graph/Bitmap.h>
|
#include<hgl/graph/Bitmap.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
|
|
||||||
BitmapData *LoadBitmapFromFile(const OSString &filename);
|
BitmapData *LoadBitmapFromFile(const OSString &filename);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#define HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
|
#define HGL_GRAPH_VULKAN_VERTEX_ATTRIBUTE_BINDING_INCLUDE
|
||||||
|
|
||||||
#include<hgl/graph/vulkan/VK.h>
|
#include<hgl/graph/vulkan/VK.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
VK_NAMESPACE_BEGIN
|
VK_NAMESPACE_BEGIN
|
||||||
/**
|
/**
|
||||||
* 顶点输入状态实例<br>
|
* 顶点输入状态实例<br>
|
||||||
@ -10,7 +10,6 @@ VK_NAMESPACE_BEGIN
|
|||||||
*/
|
*/
|
||||||
class VertexAttributeBinding
|
class VertexAttributeBinding
|
||||||
{
|
{
|
||||||
VertexShaderModule *vsm;
|
|
||||||
uint32_t attr_count;
|
uint32_t attr_count;
|
||||||
VkVertexInputBindingDescription *binding_list;
|
VkVertexInputBindingDescription *binding_list;
|
||||||
VkVertexInputAttributeDescription *attribute_list;
|
VkVertexInputAttributeDescription *attribute_list;
|
||||||
@ -19,24 +18,17 @@ private:
|
|||||||
|
|
||||||
friend class VertexShaderModule;
|
friend class VertexShaderModule;
|
||||||
|
|
||||||
VertexAttributeBinding(VertexShaderModule *);
|
VertexAttributeBinding(const uint32_t,const VkVertexInputBindingDescription *,const VkVertexInputAttributeDescription *);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
~VertexAttributeBinding();
|
~VertexAttributeBinding();
|
||||||
|
|
||||||
const uint GetStageInputBinding(const AnsiString &name); ///<取得一个变量的绑定点
|
|
||||||
|
|
||||||
bool SetInstance(const uint binding,bool instance);
|
bool SetInstance(const uint binding,bool instance);
|
||||||
bool SetStride (const uint binding,const uint32_t & stride);
|
bool SetStride (const uint binding,const uint32_t & stride);
|
||||||
bool SetFormat (const uint binding,const VkFormat & format);
|
bool SetFormat (const uint binding,const VkFormat & format);
|
||||||
bool SetOffset (const uint binding,const uint32_t offset);
|
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;
|
void Write(VkPipelineVertexInputStateCreateInfo &vis)const;
|
||||||
};//class VertexAttributeBinding
|
};//class VertexAttributeBinding
|
||||||
VK_NAMESPACE_END
|
VK_NAMESPACE_END
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include<string>
|
#include<string>
|
||||||
#include<json/json.h>
|
#include<json/json.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
|
|
||||||
const std::string JsonToString(const Json::Value &jv_root);
|
const std::string JsonToString(const Json::Value &jv_root);
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include<hgl/graph/vulkan/VKPipeline.h>
|
#include<hgl/graph/vulkan/VKPipeline.h>
|
||||||
#include<hgl/type/BaseString.h>
|
#include<hgl/type/String.h>
|
||||||
#include<hgl/io/MemoryOutputStream.h>
|
#include<hgl/io/MemoryOutputStream.h>
|
||||||
#include<hgl/io/DataOutputStream.h>
|
#include<hgl/io/DataOutputStream.h>
|
||||||
#include<hgl/io/MemoryInputStream.h>
|
#include<hgl/io/MemoryInputStream.h>
|
||||||
|
@ -129,7 +129,7 @@ namespace hgl
|
|||||||
return(true);
|
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
|
// if(mc<=0
|
||||||
// ||!str
|
// ||!str
|
||||||
@ -226,7 +226,7 @@ namespace hgl
|
|||||||
* 简易文本排版。无任何特殊处理,不支持任何转义符,不支持\r\n
|
* 简易文本排版。无任何特殊处理,不支持任何转义符,不支持\r\n
|
||||||
*/
|
*/
|
||||||
template<typename T>
|
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)
|
if(!tr)
|
||||||
return(-1);
|
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);}
|
int TextLayout::SimpleLayout(TextRenderable *tr,TileFont *tf,const UTF32String &str){return this->SimpleLayout<u32char>(tr,tf,str);}
|
||||||
|
|
||||||
//template<typename T>
|
//template<typename T>
|
||||||
//int TextLayout::SimpleLayout(TileFont *tf,const StringList<BaseString<T>> &sl)
|
//int TextLayout::SimpleLayout(TileFont *tf,const StringList<String<T>> &sl)
|
||||||
//{
|
//{
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user