*/}}
소스 검색

Windows fixes

YimingWu 1 주 전
부모
커밋
541c52f9f2
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      ouroperations.c
  2. 3 0
      ourshader.cpp

+ 4 - 0
ouroperations.c

@@ -24,6 +24,10 @@
 #include <unistd.h>
 #include <libgen.h>
 #endif
+#ifdef _WIN32
+#include <malloc.h> // _alloca()
+#define alloca _alloca
+#endif
 
 OurPaint *Our;
 extern LA MAIN;

+ 3 - 0
ourshader.cpp

@@ -749,6 +749,9 @@ PixType PixelAvg4H(PixType a, PixType b, PixType c, PixType d){
 
 #endif // desktop gl
 
+)"
+R"(
+
 PixType GetSubPixelH2(highp usampler2D tex, ivec2 uv, int offset){
     if(uv.x>=textureSize(tex,0).x-offset) return fetchpix(tex,ivec2(uv.x-offset,uv.y),0);
     if(uv.x<=offset) return fetchpix(tex,ivec2(uv.x+offset,uv.y),0);