mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 14:43:34 +00:00
adding secret bindings
This commit is contained in:
0
in_depth_features/build.sh → in_depth_features/GetProcAddr/build.sh
git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.executable_file, template.HTML=git.filemode.normal_file)
0
in_depth_features/build.sh → in_depth_features/GetProcAddr/build.sh
git.filemode.changed_filemode%!(EXTRA template.HTML=git.filemode.executable_file, template.HTML=git.filemode.normal_file)
28
in_depth_features/GetProcAddr/main.c
git.filemode.normal_file
28
in_depth_features/GetProcAddr/main.c
git.filemode.normal_file
@@ -0,0 +1,28 @@
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
#include "../../includes/mlx.h"
|
||||
#include "../../includes/mlx_extended.h"
|
||||
|
||||
#include <vulkan/vulkan_core.h>
|
||||
|
||||
typedef VkInstance (*PFN_mlx_get_vk_instance)(mlx_context mlx);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
mlx_context mlx = mlx_init();
|
||||
|
||||
mlx_window_create_info info = { 0 };
|
||||
info.title = "My window";
|
||||
info.width = 400;
|
||||
info.height = 400;
|
||||
info.is_resizable = true;
|
||||
mlx_window win = mlx_new_window(mlx, &info);
|
||||
|
||||
PFN_mlx_get_vk_instance mlx_get_vk_instance = (PFN_mlx_get_vk_instance)mlx_get_proc_addr(mlx, "mlx_get_vk_instance");
|
||||
printf("%p\n", mlx_get_vk_instance(mlx));
|
||||
|
||||
mlx_destroy_window(mlx, win);
|
||||
mlx_destroy_context(mlx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
11
in_depth_features/RTT/build.sh
git.filemode.executable_file
11
in_depth_features/RTT/build.sh
git.filemode.executable_file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -e a.out ]; then
|
||||
rm a.out
|
||||
fi
|
||||
|
||||
if [ $(uname -s) = 'Darwin' ]; then
|
||||
clang main.c ../../libmlx.dylib -L /opt/homebrew/lib -lSDL2 -lm -g;
|
||||
else
|
||||
clang main.c ../../libmlx.so -lSDL2 -g -Wall -Wextra -Werror -lm;
|
||||
fi
|
||||
4
in_depth_features/RTT/run.sh
git.filemode.executable_file
4
in_depth_features/RTT/run.sh
git.filemode.executable_file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
bash ./build.sh
|
||||
./a.out
|
||||
Reference in New Issue
Block a user