This file contains 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
abstract type ContextCall{FN,MOD,C} end | |
abstract type Context{C} end | |
Context{C}(x) where C = x | |
# desired output for macro | |
# @mfunction AAA(a::Int64,b::Int64) = a+b | |
# | |
@generated ContextCall{:AAA,:Main,C}(a::Int64,b::Int64) where C = begin | |
code = quote |
This file contains 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
using ModernGL | |
function gen_buffer(f,n::Integer) | |
res = Array{GLuint}(n) | |
f(n,res) | |
if any(res .<= 0) | |
error("invalid id. OpenGL Context active?") | |
end | |
return res | |
end |
This file contains 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
function parseini(fname::String) | |
initxt = Dict{String,Dict{String,Any}}(); | |
fid = open(fname) | |
blockname = "default" | |
seekstart(fid) | |
lines = eachline(fid) | |
lastkey = "" | |
for line in lines | |
# skip comments and newlines |
This file contains 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
function parseini(fname::String) | |
initxt = Dict{String,Dict{String,Any}}(); | |
fid = open(fname) | |
blockname = "default" | |
seekstart(fid) | |
lines = eachline(fid) | |
lastkey = "" | |
for line in lines | |
# skip comments and newlines |