Welcome,
Guest
. Please
login
or
register
.
December 12, 2024, 12:32:12 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Half-Pixel-Offset still being applied in 3.7.1 when using -force-opengl
« previous
next »
Print
Pages: [
1
]
Author
Topic: Half-Pixel-Offset still being applied in 3.7.1 when using -force-opengl (Read 1739 times)
Wisteso
Full Member
Thank You
-Given: 21
-Receive: 3
Posts: 103
Half-Pixel-Offset still being applied in 3.7.1 when using -force-opengl
«
on:
August 30, 2014, 09:36:51 PM »
I've been using this fix for UIPanel.Awake() in my own code since 3.5.8 and have had no issues, and I suggested it a while back, but I'm still not seeing the following change in NGUI 3.7.1 and was curious why...
if
(
mHalfPixelOffset
)
mHalfPixelOffset
=
(
SystemInfo
.
graphicsShaderLevel
<
40
)
&&
(
SystemInfo
.
graphicsDeviceVersion
.
Contains
(
"Direct3D"
)
)
;
Otherwise the half-pixel-offset is applied when the Windows-based Players/Editor is run with -force-opengl when it should only be applied to DirectX APIs.
There might be a better way to determine if Direct3D API is active, but I've only found the above solution to be effective per the information here...
http://docs.unity3d.com/ScriptReference/SystemInfo-graphicsDeviceVersion.html
«
Last Edit: August 31, 2014, 03:53:11 AM by Wisteso
»
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Half-Pixel-Offset still being applied in 3.7.1 when using -force-opengl
«
Reply #1 on:
August 31, 2014, 03:00:07 PM »
That seems like a fine change, thanks.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Half-Pixel-Offset still being applied in 3.7.1 when using -force-opengl