修改底层渲染为OpenGL
This commit is contained in:
@@ -85,6 +85,11 @@ typedef struct VecPos
|
||||
return *this;
|
||||
}
|
||||
|
||||
// 乘法
|
||||
VecPos operator*(float value) const
|
||||
{
|
||||
return VecPos(x * value, y * value);
|
||||
}
|
||||
} VecPos;
|
||||
|
||||
// 浮点数坐标向量
|
||||
@@ -195,6 +200,12 @@ typedef struct VecSize
|
||||
height -= other.height;
|
||||
return *this;
|
||||
}
|
||||
|
||||
// 乘法
|
||||
VecSize operator*(float value) const
|
||||
{
|
||||
return VecSize(width * value, height * value);
|
||||
}
|
||||
} VecSize;
|
||||
|
||||
typedef struct VecPos3
|
||||
@@ -247,4 +258,10 @@ typedef struct VecSpeed3
|
||||
{
|
||||
return x == other.x && y == other.y && z == other.z;
|
||||
}
|
||||
} VecSpeed3;
|
||||
} VecSpeed3;
|
||||
|
||||
enum LE_BlEND_MODE
|
||||
{
|
||||
NONE,
|
||||
LINEARDODGE
|
||||
};
|
||||
@@ -54,4 +54,19 @@ std::string Tool_TruncatePath(const std::string &path)
|
||||
|
||||
// 如果没有找到 '/',返回原字符串(或根据需求返回空)
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
int Tool_get_file_size(const std::string &path)
|
||||
{
|
||||
FILE *file = fopen(path.c_str(), "rb");
|
||||
if (file == nullptr)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
fseek(file, 0, SEEK_END);
|
||||
int size = ftell(file);
|
||||
fclose(file);
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
@@ -7,4 +7,6 @@ std::string Tool_toLowerCase(const std::string &str);
|
||||
|
||||
std::string Tool_RegRealPath(const std::string &Path);
|
||||
|
||||
std::string Tool_TruncatePath(const std::string &path);
|
||||
std::string Tool_TruncatePath(const std::string &path);
|
||||
|
||||
int Tool_get_file_size(const std::string &path);
|
||||
Reference in New Issue
Block a user