vassvik / odin-gl Goto Github PK
View Code? Open in Web Editor NEWodin-gl
License: MIT License
odin-gl
License: MIT License
I don't yet know function pointers in Odin, so I just copied the code snipped from the readme. However, it doesn't compile.
I'm not really sure what's supposed to happen here. I assume that glfw.GetProcAddress retrieves a pointer to a function. And then it get's assigned to the pointer(p) that was passed to set_proc_address. But it seems you have to do some kind of complicated cast for it to work. Which doesn't compile. And I tried removing all the casts, at which point things compile, but segfault.
C:\Projects\Odin\shared\odin-gl\gl.odin(1654:75) Cannot convert 'COMPUTE_SHADER' to 'Shader_Type'
compute_shader_id, ok1 := compile_shader_from_source(string(cs_data), COMPUTE_SHADER);
should probably be:
compute_shader_id, ok1 := compile_shader_from_source(string(cs_data), Shader_Type.COMPUTE_SHADER);
gl.GetStringi()
returns u8, while it should return cstring
(same as gl.GetString()
)
Relevant lines:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.