Pure glfw bindings for c3 programming language
To include these bindings into your project, do:
$ git clone https://github.com/vssukharev/glfw.c3l.git # Clone repo somewhere
$ make # Create archive (make sure 'zip' is installed)
$ mv glfw.c3l /path/to/project/libraries # Move archive to libraries directory of your project
Or just:
$ git clone https://github.com/vssukharev/glfw.c3l.git /path/to/project/libraries/glfw.c3l # Add dependency without zip compression
Then you need to modify your project.json
:
{
// some stuff
"dependencies": [ "glfw", /* Some other dependencies */ ],
// some other stuff
}
Simply do c3c run
to check whether everything is fine (make sure to have glfw
installed on your system).
To use specific features of GLFW for Vulkan (e.g., glfwCreateWindowSurface
), you need to define env::GLFW_INCLUDE_VULKAN
as though:
module std::core::env;
const bool GLFW_INCLUDE_VULKAN = true
module yourmodule;
import glfw;
// ...
Just use it, I haven't tested yet)
- All functions are renamed from
glfwSomeStuff
tosomeStuff
and called asglfw::someStuff
- All types are renamed from
GLFWsometype
toSomeType
- All constants are renamed form
GLFW_SOME_CONSTANT
toSOME_CONSTANT
and accesed throguhglfw::SOME_CONSTANT
- All functions, taking
void
as parameter, now take no parameters (due to C3 rules)