Wuvin commited on
Commit
8ff80ab
1 Parent(s): d3a448c

switch gl to cuda

Browse files
mesh_reconstruction/render.py CHANGED
@@ -14,7 +14,7 @@ def _warmup(glctx, device=None):
14
 
15
  class NormalsRenderer:
16
 
17
- _glctx:dr.RasterizeGLContext = None
18
 
19
  def __init__(
20
  self,
@@ -29,7 +29,7 @@ class NormalsRenderer:
29
  else:
30
  self._mvp = mvp
31
  self._image_size = image_size
32
- self._glctx = dr.RasterizeGLContext(output_db=False, device=device)
33
  _warmup(self._glctx, device)
34
 
35
  def render(self,
 
14
 
15
  class NormalsRenderer:
16
 
17
+ _glctx:dr.RasterizeCudaContext = None
18
 
19
  def __init__(
20
  self,
 
29
  else:
30
  self._mvp = mvp
31
  self._image_size = image_size
32
+ self._glctx = dr.RasterizeCudaContext(output_db=False, device=device)
33
  _warmup(self._glctx, device)
34
 
35
  def render(self,
scripts/project_mesh.py CHANGED
@@ -56,7 +56,7 @@ def _warmup(glctx, device=None):
56
 
57
  class Pix2FacesRenderer:
58
  def __init__(self, device="cuda"):
59
- self._glctx = dr.RasterizeGLContext(output_db=False, device=device)
60
  self.device = device
61
  _warmup(self._glctx, device)
62
 
 
56
 
57
  class Pix2FacesRenderer:
58
  def __init__(self, device="cuda"):
59
+ self._glctx = dr.RasterizeCudaContext(output_db=False, device=device)
60
  self.device = device
61
  _warmup(self._glctx, device)
62