Created
August 9, 2020 23:42
-
-
Save XANOZOID/b45baff2b0824b8e1567c05c329d8d3b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template do_draw(w:int, color:uint, body:untyped) = | |
kinc_g4_begin(w) | |
body | |
kinc_g4_end(w) | |
kinc_g4_swap_buffers() | |
proc nim_update() {.exportc.} = | |
do_draw 0, 0: | |
nimPipeline.kinc_g4_set_pipeline() | |
var matrix:KincMatrix3x3 = kinc_matrix3x3_identity() | |
kinc_g4_set_vertex_buffer(nVertices) | |
kinc_g4_set_index_buffer(nIndices) | |
kinc_g4_set_matrix3(nOffset, matrix) | |
kinc_g4_set_texture(nTexunit, nimTexture) | |
kinc_g4_draw_indexed_vertices() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment