1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-13 08:34:32 +02:00

update d3d9 version

This commit is contained in:
XProger
2018-10-18 06:26:27 +03:00
parent c59459235b
commit 6f39bdd045
3 changed files with 4 additions and 8 deletions

View File

@@ -770,12 +770,7 @@ struct WaterCache {
Core::setBlendMode(bmAdd);
Core::setCullMode(cmBack);
Core::setDepthWrite(false);
//Core::setDepthTest(false);
//glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
//game->getMesh()->renderBox();
game->getMesh()->renderWaterVolume(item.to);
//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
//Core::setDepthTest(true);
Core::setDepthWrite(true);
Core::setCullMode(cmFront);
Core::setBlendMode(bmNone);

View File

@@ -226,6 +226,7 @@ namespace GAPI {
int bpp;
D3DFORMAT format;
} formats[FMT_MAX] = {
{ 8, D3DFMT_L8 },
{ 32, D3DFMT_A8R8G8B8 },
{ 16, D3DFMT_R5G6B5 },
{ 16, D3DFMT_A1R5G5B5 },
@@ -296,8 +297,8 @@ namespace GAPI {
bool mipmaps = (Core::settings.detail.filter > Core::Settings::MEDIUM) && (opt & OPT_MIPMAPS);
bool aniso = filter && mipmaps && (Core::support.maxAniso > 0);
device->SetSamplerState(sampler, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
device->SetSamplerState(sampler, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);
device->SetSamplerState(sampler, D3DSAMP_ADDRESSU, (opt & OPT_REPEAT) ? D3DTADDRESS_WRAP : D3DTADDRESS_CLAMP);
device->SetSamplerState(sampler, D3DSAMP_ADDRESSV, (opt & OPT_REPEAT) ? D3DTADDRESS_WRAP : D3DTADDRESS_CLAMP);
if (aniso) {
device->SetSamplerState(sampler, D3DSAMP_MINFILTER, D3DTEXF_ANISOTROPIC);

View File

@@ -55,7 +55,7 @@ struct Texture : GAPI::Texture {
}
#endif
#ifdef _DEBUG
#if defined(_DEBUG) && defined(_OS_WIN) && defined(_GAPI_GL)
void dump(const char *fileName) {
bind(0);
int size = width *height * 4;