Merge pull request #449 from sqlpxc/main
fix wsl2 eglInitialize() failed
This commit is contained in:
@@ -12,11 +12,11 @@ def _warmup(glctx, device=None):
|
||||
tri = tensor([[0, 1, 2]], dtype=torch.int32)
|
||||
dr.rasterize(glctx, pos, tri, resolution=[256, 256])
|
||||
|
||||
glctx = dr.RasterizeGLContext(output_db=False, device="cuda")
|
||||
glctx = dr.RasterizeCudaContext(device="cuda")
|
||||
|
||||
class NormalsRenderer:
|
||||
|
||||
_glctx:dr.RasterizeGLContext = None
|
||||
_glctx:dr.RasterizeCudaContext = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -68,7 +68,7 @@ def _warmup(glctx, device=None):
|
||||
|
||||
class Pix2FacesRenderer:
|
||||
def __init__(self, device="cuda"):
|
||||
self._glctx = dr.RasterizeGLContext(output_db=False, device=device)
|
||||
self._glctx = dr.RasterizeCudaContext(device=device)
|
||||
self.device = device
|
||||
_warmup(self._glctx, device)
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class FlexiCubesRenderer:
|
||||
'''
|
||||
v_pos_clip = util.xfm_points(mesh.vertices.unsqueeze(0), mvp) # Rotate it to camera coordinates
|
||||
rast, db = dr.rasterize(
|
||||
dr.RasterizeGLContext(), v_pos_clip, mesh.faces.int(), iter_res)
|
||||
dr.RasterizeCudaContext(), v_pos_clip, mesh.faces.int(), iter_res)
|
||||
|
||||
alpha_index = rast[..., -1:] > 0
|
||||
inv_alpha_index = rast[..., -1:] <= 0
|
||||
|
||||
@@ -987,7 +987,7 @@ class Mesh_Orbit_Renderer:
|
||||
"render_background_color_r": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}),
|
||||
"render_background_color_g": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}),
|
||||
"render_background_color_b": ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1.0, "step": 0.001}),
|
||||
"force_cuda_rasterize": ("BOOLEAN", {"default": False},),
|
||||
"force_cuda_rasterize": ("BOOLEAN", {"default": True},),
|
||||
},
|
||||
|
||||
"optional": {
|
||||
@@ -1302,7 +1302,7 @@ class Fitting_Mesh_With_Multiview_Images:
|
||||
"ms_ssim_loss_weight": ("FLOAT", {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.01}),
|
||||
"remesh_after_n_iteration": ("INT", {"default": 512, "min": 128, "max": 100000}),
|
||||
"invert_background_probability": ("FLOAT", {"default": 0.5, "min": 0.0, "max": 1.0, "step": 0.1}),
|
||||
"force_cuda_rasterize": ("BOOLEAN", {"default": False},),
|
||||
"force_cuda_rasterize": ("BOOLEAN", {"default": True},),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user