Skip to content

Commit

Permalink
CloudManager: use ptr() to take addr of a temp
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Jul 8, 2023
1 parent 7cb27a9 commit 081b9b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OVP/D3D9Client/CloudMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ void CloudManager::RenderTile (int lvl, int hemisp, int ilat, int nlat, int ilng
VBMESH &mesh = PATCH_TPL[lvl][ilat]; // patch template

if (range.tumin == 0 && range.tumax == 1) {
HR(FX->SetVector(eTexOff, &D3DXVECTOR4(1.0f, 0.0f, 1.0f, 0.0f)));
HR(FX->SetVector(eTexOff, ptr(D3DXVECTOR4(1.0f, 0.0f, 1.0f, 0.0f))));
}
else {
float tuscale = range.tumax-range.tumin, tuofs = range.tumin;
float tvscale = range.tvmax-range.tvmin, tvofs = range.tvmin;
HR(FX->SetVector(eTexOff, &D3DXVECTOR4(tuscale,tuofs,tvscale,tvofs)));
HR(FX->SetVector(eTexOff, ptr(D3DXVECTOR4(tuscale,tuofs,tvscale,tvofs))));
}
HR(FX->SetMatrix(eW, &mWorld));
HR(FX->SetTexture(eTex0, tex)); // Diffuse Texture
Expand Down

0 comments on commit 081b9b1

Please sign in to comment.