Browse Source

Use haxe short version for 5.0 feature

Yuxiao Mao 6 tháng trước cách đây
mục cha
commit
b0c7e93ef1
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      h3d/impl/DX12Driver.hx
  2. 1 1
      h3d/impl/GlDriver.hx

+ 1 - 1
h3d/impl/DX12Driver.hx

@@ -1113,7 +1113,7 @@ class DX12Driver extends h3d.impl.Driver {
 	}
 
 	inline function unsafeCastTo<T,R>( v : T, c : Class<R> ) : R {
-		#if (haxe < version("5.0.0-alpha.1"))
+		#if (haxe_ver < 5)
 		var arr = new hl.NativeArray<T>(1);
 		arr[0] = v;
 		return (cast arr : hl.NativeArray<R>)[0];

+ 1 - 1
h3d/impl/GlDriver.hx

@@ -826,7 +826,7 @@ class GlDriver extends Driver {
 		#else
 
 		var fallback = true;
-		#if (haxe >= version("5.0.0-alpha.1"))
+		#if (haxe_ver >= 5)
 		var extension:js.html.webgl.extension.WEBGLPolygonMode =  cast gl.getExtension("WEBGL_polygon_mode");
 		if(extension != null) {
 			if(wireframe) {