Skip to content

Commit

Permalink
dxFontRender: Apply offset to OpenGL renderer.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Mar 24, 2016
1 parent b54afed commit a954329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Layers/xrRender/dxFontRender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void dxFontRender::OnRender(CGameFont &owner)
clr2 = color_rgba (_R,_G,_B,_A);
}

#if defined(USE_DX10) || defined(USE_DX11) // Vertex shader will cancel a DX9 correction, so make fake offset
#if defined(USE_DX10) || defined(USE_DX11) || defined(USE_OGL) // Vertex shader will cancel a DX9 correction, so make fake offset
X -= 0.5f;
Y -= 0.5f;
Y2 -= 0.5f;
Expand All @@ -117,7 +117,7 @@ void dxFontRender::OnRender(CGameFont &owner)
// tv = ( l.y / owner.vTS.y ) + ( 0.5f / owner.vTS.y );
tu = ( l.x / owner.vTS.x );
tv = ( l.y / owner.vTS.y );
#if !defined(USE_DX10) && !defined(USE_DX11)
#if !defined(USE_DX10) && !defined(USE_DX11) && !defined(USE_OGL)
// Make half pixel offset for 1 to 1 mapping
tu +=( 0.5f / owner.vTS.x );
tv +=( 0.5f / owner.vTS.y );
Expand Down

0 comments on commit a954329

Please sign in to comment.