wip
parent
bfacc111a4
commit
803afffce6
|
@ -611,8 +611,8 @@ path current_path()
|
||||||
path current_path(std::error_code& ec)
|
path current_path(std::error_code& ec)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::wstring p(MAX_PATH + 1, 0);
|
std::wstring buffer(MAX_PATH + 1, 0);
|
||||||
DWORD r = GetModuleFileNameW(nullptr, &p[0], MAX_PATH);
|
DWORD r = GetModuleFileNameW(nullptr, &buffer[0], MAX_PATH);
|
||||||
if (r == 0)
|
if (r == 0)
|
||||||
{
|
{
|
||||||
ec = std::error_code(errno, std::system_category());
|
ec = std::error_code(errno, std::system_category());
|
||||||
|
@ -621,14 +621,14 @@ path current_path(std::error_code& ec)
|
||||||
auto pos = buffer.find_last_of(L"\\/");
|
auto pos = buffer.find_last_of(L"\\/");
|
||||||
return buffer.substr(0, pos);
|
return buffer.substr(0, pos);
|
||||||
#else
|
#else
|
||||||
std::string p(256, 0);
|
std::string buffer(256, 0);
|
||||||
char *r = getcwd(&p[0], p.size());
|
char *r = getcwd(&buffer[0], p.size());
|
||||||
if (r == nullptr)
|
if (r == nullptr)
|
||||||
{
|
{
|
||||||
ec = std::error_code(errno, std::system_category());
|
ec = std::error_code(errno, std::system_category());
|
||||||
return path();
|
return path();
|
||||||
}
|
}
|
||||||
return p;
|
return buffer;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,10 @@ std::ofstream hdrlog;
|
||||||
#endif
|
#endif
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
#ifndef alloca
|
||||||
#define alloca(s) _alloca(s)
|
#define alloca(s) _alloca(s)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace cmod;
|
using namespace cmod;
|
||||||
using namespace Eigen;
|
using namespace Eigen;
|
||||||
|
|
|
@ -131,7 +131,7 @@ void VertexObject::enableAttribArrays() noexcept
|
||||||
auto n = t.first;
|
auto n = t.first;
|
||||||
auto& p = t.second;
|
auto& p = t.second;
|
||||||
glEnableVertexAttribArray(n);
|
glEnableVertexAttribArray(n);
|
||||||
glVertexAttribPointer(n, p.count, p.type, p.normalized, p.stride, (GLvoid*) p.offset);
|
glVertexAttribPointer(n, p.count, p.type, p.normalized, p.stride, (GLvoid*) (size_t) p.offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue