diff --git a/README.md b/README.md index 78ed8c5..70c0efa 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,7 @@ is not maintained, it was only a test. * Get a solid GL3 driver working -* Make building everything a bit easier - # Building -Edit the makefile(s) and type 'make BUILD=gl3' +Get premake5. Generate a config, e.g. with ``premake5 gmake``, +and look in the build directory. diff --git a/premake5.lua b/premake5.lua index 533f53d..591ab10 100755 --- a/premake5.lua +++ b/premake5.lua @@ -40,6 +40,10 @@ workspace "librw" system "windows" filter { "platforms:linux*" } system "linux" + + filter "action:vs*" + buildoptions { "/wd4996" } + filter {} Libdir = "lib/%{cfg.platform}/%{cfg.buildcfg}" @@ -58,4 +62,4 @@ project "dumprwtree" files { "tools/dumprwtree/*" } includedirs { "." } libdirs { Libdir } - links { "librw" } \ No newline at end of file + links { "librw" } diff --git a/src/gl/gl3plugins.cpp b/src/gl/gl3plugins.cpp index 91cb3cb..f274f7b 100644 --- a/src/gl/gl3plugins.cpp +++ b/src/gl/gl3plugins.cpp @@ -76,7 +76,7 @@ matfxDefaultRender(InstanceDataHeader *header, InstanceData *inst) setTexture(0, m->texture); - rw::setRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); flushCache(); glDrawElements(header->primType, inst->numIndex, @@ -175,16 +175,16 @@ matfxEnvRender(InstanceDataHeader *header, InstanceData *inst) setTexture(0, env->tex); - rw::setRenderState(VERTEXALPHA, 1); - rw::setRenderState(SRCBLEND, BLENDONE); - rw::setRenderState(DESTBLEND, BLENDONE); + rw::SetRenderState(VERTEXALPHA, 1); + rw::SetRenderState(SRCBLEND, BLENDONE); + rw::SetRenderState(DESTBLEND, BLENDONE); flushCache(); glDrawElements(header->primType, inst->numIndex, GL_UNSIGNED_SHORT, (void*)(uintptr)inst->offset); - rw::setRenderState(SRCBLEND, BLENDSRCALPHA); - rw::setRenderState(DESTBLEND, BLENDINVSRCALPHA); + rw::SetRenderState(SRCBLEND, BLENDSRCALPHA); + rw::SetRenderState(DESTBLEND, BLENDINVSRCALPHA); } void @@ -200,8 +200,8 @@ matfxRenderCB(Atomic *atomic, InstanceDataHeader *header) InstanceData *inst = header->inst; int32 n = header->numMeshes; -// rw::setRenderState(ALPHATESTFUNC, 1); -// rw::setRenderState(ALPHATESTREF, 50); +// rw::SetRenderState(ALPHATESTFUNC, 1); +// rw::SetRenderState(ALPHATESTREF, 50); int32 fx; while(n--){ @@ -483,7 +483,7 @@ skinRenderCB(Atomic *atomic, InstanceDataHeader *header) setTexture(0, m->texture); - rw::setRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); flushCache(); glDrawElements(header->primType, inst->numIndex, diff --git a/src/gl/gl3render.cpp b/src/gl/gl3render.cpp index 7dc5dd9..90783b7 100644 --- a/src/gl/gl3render.cpp +++ b/src/gl/gl3render.cpp @@ -103,7 +103,7 @@ defaultRenderCB(Atomic *atomic, InstanceDataHeader *header) setTexture(0, m->texture); - rw::setRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); + rw::SetRenderState(VERTEXALPHA, inst->vertexAlpha || m->color.alpha != 0xFF); flushCache(); glDrawElements(header->primType, inst->numIndex,