Skip to content

Commit a954329

Browse files
committed
dxFontRender: Apply offset to OpenGL renderer.
1 parent b54afed commit a954329

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Layers/xrRender/dxFontRender.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ void dxFontRender::OnRender(CGameFont &owner)
9494
clr2 = color_rgba (_R,_G,_B,_A);
9595
}
9696

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

0 commit comments

Comments
 (0)