Quellcode durchsuchen

On Windows + OpenGL make sure not applying D3D9 pixel adjustment

Josh Engebretson vor 8 Jahren
Ursprung
Commit
fc8855c8f1

+ 1 - 1
Source/AtomicWebView/UIWebView.cpp

@@ -114,7 +114,7 @@ public:
 
 #ifdef ATOMIC_PLATFORM_WINDOWS
 
-#ifndef ATOMIC_D3D11
+#if !defined(ATOMIC_D3D11) && !defined(ATOMIC_OPENGL)
         //Direct3D9 Adjustment
         x += 0.5f;
         y += 0.5f;

+ 0 - 8
Source/AtomicWebView/WebTexture2D.cpp

@@ -390,14 +390,6 @@ void WebTexture2D::SetSize(int width, int height)
 
 #endif
 
-#if defined(ATOMIC_OPENGL) && defined(ATOMIC_PLATFORM_WINDOWS) 
-    //Force width and height to multiples of 2 so that we don't squish pixels
-    //This doesn't seem to make the text completely sharp but it makes it usable for now.
-    width = (width | 2) + 1;
-    height = (height | 2) + 1;
-    texture_->SetFilterMode(TextureFilterMode::FILTER_NEAREST);
-#endif
-
     if (!texture_->SetSize(width, height, format, textureUsage))
     {
         ATOMIC_LOGERRORF("Unable to set WebTexture2D size to %i x %i", width, height);

+ 4 - 0
Source/ThirdParty/TurboBadger/CMakeLists.txt

@@ -9,6 +9,10 @@ endif(APPLE)
 add_definitions(-DTB_FONT_RENDERER_FREETYPE)
 #add_definitions(-DTB_FONT_RENDERER_STB)
 
+if (ATOMIC_OPENGL)
+    add_definitions(-DATOMIC_OPENGL=1)
+endif ()
+
 # Define source files
 file (GLOB C_FILES *.cpp image/*.cpp animation/*.cpp parser/*.cpp renderers/*.cpp utf8/*.cpp)
 file (GLOB H_FILES *.h image/*.h animation/*.h parser/*.h renderers/*.h utf8/*.h)