Skip to content

Commit

Permalink
basic startup for opengl
Browse files Browse the repository at this point in the history
[skip ci] GL* classes & frag / vert usage

[skip ci] use compute shader

[skip ci] really run shader
  • Loading branch information
archibate committed Feb 18, 2020
1 parent a5d6e04 commit 28f6b84
Show file tree
Hide file tree
Showing 9 changed files with 677 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cmake/TaichiCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ if (TI_WITH_CUDA)
target_link_libraries(${LIBRARY_NAME} ${llvm_ptx_libs})
endif()

#target_link_libraries(${LIBRARY_NAME} /usr/lib/libGL.so GL)
target_link_libraries(${LIBRARY_NAME} /usr/lib/libGLEW.so GLEW)
target_link_libraries(${LIBRARY_NAME} /usr/lib/libglfw.so glfw)

# add_executable(runtime runtime/runtime.cpp)

# Optional dependencies
Expand Down
3 changes: 3 additions & 0 deletions python/taichi/lang/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
x86_64 = core.x86_64
cuda = core.cuda
metal = core.metal
opengl = core.opengl
profiler_print = lambda: core.get_current_program().profiler_print()
profiler_clear = lambda: core.get_current_program().profiler_clear()

Expand Down Expand Up @@ -178,6 +179,8 @@ def supported_archs():
archs.append(cuda)
if ti.core.with_metal():
archs.append(metal)
if ti.core.with_opengl():
archs.append(opengl)
return archs

class _ArchCheckers(object):
Expand Down
Loading

0 comments on commit 28f6b84

Please sign in to comment.