add xml attributes for combobox node and add resolution selection for new doc

This commit is contained in:
2017-11-12 22:39:23 +00:00
parent 4473bc8bd4
commit 8bc440b9b8
11 changed files with 53 additions and 25 deletions

View File

@@ -88,6 +88,23 @@ glm::vec3 convert_rgb2hsv(const glm::vec3 c)
return glm::vec3(fabs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
std::vector<std::string> split(const std::string& subject, char d, int max_split/* = 0*/)
{
std::vector<std::string> ret;
int start = 0;
int n = subject.find_first_of(d);
while (n != std::string::npos)
{
ret.push_back(subject.substr(start, n - start));
start = n + 1;
if (max_split && ret.size() == max_split)
break;
n = subject.find_first_of(d, start);
}
ret.push_back(subject.substr(start));
return ret;
}
static const char* gl2str(GLenum err)
{
switch (err)