windows enum refactor fixes

This commit is contained in:
Jack Andersen 2015-11-20 16:59:43 -10:00
parent c4f8743bf6
commit 18f708753d
5 changed files with 15 additions and 15 deletions

View File

@ -377,7 +377,7 @@ public:
/** Intermediate mesh representation prepared by blender from a single mesh object */ /** Intermediate mesh representation prepared by blender from a single mesh object */
struct Mesh struct Mesh
{ {
enum HMDLTopology topology; HMDLTopology topology;
/* Cumulative AABB */ /* Cumulative AABB */
Vector3f aabbMin; Vector3f aabbMin;

2
hecl/extern/libBoo vendored

@ -1 +1 @@
Subproject commit d040e20096d50d0f8af623f4d2bb05f5e5b0ba73 Subproject commit 84b78f2962a1d36694e000d7e151a44a64d3e24b

View File

@ -216,7 +216,7 @@ static inline FILE* Fopen(const SystemChar* path, const SystemChar* mode, FileLo
{ {
#if _WIN32 #if _WIN32
OVERLAPPED ov = {}; OVERLAPPED ov = {};
LockFileEx((HANDLE)(uintptr_t)_fileno(fp), (lock == LWRITE) ? LOCKFILE_EXCLUSIVE_LOCK : 0, 0, 0, 1, &ov); LockFileEx((HANDLE)(uintptr_t)_fileno(fp), (lock == FileLockType::Write) ? LOCKFILE_EXCLUSIVE_LOCK : 0, 0, 0, 1, &ov);
#else #else
if (flock(fileno(fp), ((lock == FileLockType::Write) ? LOCK_EX : LOCK_SH) | LOCK_NB)) if (flock(fileno(fp), ((lock == FileLockType::Write) ? LOCK_EX : LOCK_SH) | LOCK_NB))
LogModule.report(LogVisor::FatalError, "flock %s: %s", path, strerror(errno)); LogModule.report(LogVisor::FatalError, "flock %s: %s", path, strerror(errno));

View File

@ -15,11 +15,11 @@ std::string HLSL::EmitTexGenSource2(TexGenSrc src, int uvIdx) const
{ {
switch (src) switch (src)
{ {
case TG_POS: case TexGenSrc::Position:
return "v.posIn.xy\n"; return "v.posIn.xy\n";
case TG_NRM: case TexGenSrc::Normal:
return "v.normIn.xy\n"; return "v.normIn.xy\n";
case TG_UV: case TexGenSrc::UV:
return HECL::Format("v.uvIn[%u]", uvIdx); return HECL::Format("v.uvIn[%u]", uvIdx);
default: break; default: break;
} }
@ -30,11 +30,11 @@ std::string HLSL::EmitTexGenSource4(TexGenSrc src, int uvIdx) const
{ {
switch (src) switch (src)
{ {
case TG_POS: case TexGenSrc::Position:
return "float4(v.posIn, 1.0)\n"; return "float4(v.posIn, 1.0)\n";
case TG_NRM: case TexGenSrc::Normal:
return "float4(v.normIn, 1.0)\n"; return "float4(v.normIn, 1.0)\n";
case TG_UV: case TexGenSrc::UV:
return HECL::Format("float4(v.uvIn[%u], 0.0, 1.0)", uvIdx); return HECL::Format("float4(v.uvIn[%u], 0.0, 1.0)", uvIdx);
default: break; default: break;
} }
@ -284,8 +284,8 @@ struct HLSLBackendFactory : IShaderBackendFactory
ShaderCachedData dataOut(tag, cachedSz); ShaderCachedData dataOut(tag, cachedSz);
Athena::io::MemoryWriter w(dataOut.m_data.get(), dataOut.m_sz); Athena::io::MemoryWriter w(dataOut.m_data.get(), dataOut.m_sz);
w.writeUByte(m_backend.m_blendSrc); w.writeUByte(atUint8(m_backend.m_blendSrc));
w.writeUByte(m_backend.m_blendDst); w.writeUByte(atUint8(m_backend.m_blendDst));
if (vertBlob) if (vertBlob)
{ {
@ -399,8 +399,8 @@ struct HLSLBackendFactory : IShaderBackendFactory
ShaderCachedData dataOut(tag, cachedSz); ShaderCachedData dataOut(tag, cachedSz);
Athena::io::MemoryWriter w(dataOut.m_data.get(), dataOut.m_sz); Athena::io::MemoryWriter w(dataOut.m_data.get(), dataOut.m_sz);
w.writeUByte(m_backend.m_blendSrc); w.writeUByte(atUint8(m_backend.m_blendSrc));
w.writeUByte(m_backend.m_blendDst); w.writeUByte(atUint8(m_backend.m_blendDst));
if (vertBlob) if (vertBlob)
{ {

View File

@ -118,8 +118,8 @@ ShaderCacheManager::ShaderCacheManager(const FileStoreManager& storeMgr,
m_factory.reset(_NewGLSLBackendFactory(gfxFactory)); m_factory.reset(_NewGLSLBackendFactory(gfxFactory));
break; break;
#if _WIN32 #if _WIN32
case boo::IGraphicsDataFactory::PlatformD3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::PlatformD3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
m_factory.reset(_NewHLSLBackendFactory(gfxFactory)); m_factory.reset(_NewHLSLBackendFactory(gfxFactory));
break; break;
#elif __APPLE__ && HECL_HAS_METAL #elif __APPLE__ && HECL_HAS_METAL