diff options
author | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-06 13:46:20 +0000 |
---|---|---|
committer | chirs241097@gmail.com <chirs241097@gmail.com@c17bf020-1265-9734-9302-a83f62007ddb> | 2014-03-06 13:46:20 +0000 |
commit | 4b7f631edee3999571435b88b6916d94ac24b888 (patch) | |
tree | 3d8069c1c961cf9478fc4060c79a0646cd3385a0 | |
parent | 83370caa45373d6ae35f5363db42450aefc2386f (diff) | |
download | bullet-lab-remix-4b7f631edee3999571435b88b6916d94ac24b888.tar.xz |
This revision contains a fix to the bug in the Windows build caused by the difference between DirectX and OpenGL. Fixing PicBack, TDSky still not fixed.
-rw-r--r-- | background.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/background.h b/background.h index ae8fcdb..adac0b6 100644 --- a/background.h +++ b/background.h @@ -426,6 +426,11 @@ public: } void Render() { +#ifdef WIN32 + sky->SetTexture(0); + sky->SetTextureRect(0,0,800,600); + sky->SetBlendMode(BLEND_DEFAULT); +#endif sky->SetColor(colSkyTop.GetHWColor(), 0); sky->SetColor(colSkyTop.GetHWColor(), 1); sky->SetColor(colSkyBtm.GetHWColor(), 2); @@ -503,10 +508,22 @@ public: { quad.tex=hge->Texture_Load(tx);alim=_alim; Mode=_Mode;scale=1;quad.blend=BLEND_DEFAULT; +#ifdef WIN32 + vector2d srl=vector2d(hge->Texture_GetWidth(quad.tex,true), + hge->Texture_GetHeight(quad.tex,true)); + vector2d srm=vector2d(hge->Texture_GetWidth(quad.tex,false), + hge->Texture_GetHeight(quad.tex,false)); + srm.x=srl.x/srm.x;srm.y=srl.y/srm.y; + quad.v[0].tx=0;quad.v[0].ty=0; + quad.v[1].tx=srm.x;quad.v[1].ty=0; + quad.v[2].tx=srm.x;quad.v[2].ty=srm.y; + quad.v[3].tx=0;quad.v[3].ty=srm.y; +#else quad.v[0].tx=0,quad.v[0].ty=0; quad.v[1].tx=1,quad.v[1].ty=0; quad.v[2].tx=1,quad.v[2].ty=1; quad.v[3].tx=0,quad.v[3].ty=1; +#endif onfadein=onfadeout=false;alpha=0; } void Update() |