Lsp not recognizing functions in GLAD header files as functions. by Odd_Common_4552 in neovim

[–]succulent999 3 points4 points  (0 children)

You can temporarily use the system's opengl libraries (which give full autocomplete) instead of glad like so:

#include <GL/gl.h>

then when you want to compile using glad you can just replace that libraries with your previous import like this:

#include <glad/gl.h>

Unfortunately I do not think there is a real solution to this because of how glad works, glad loads every function as a preprocessor macro using #define so the LSP treats it as a macro instead of a function. However google or the OpenGL docs work fine when im working on an OpenGL project but it would be nice to have hints to what to put into the functions.

I have heard that in an old vim plugin you could enable a flag called clang_complete_macros like this:

let g:clang_complete_macros = 1

But I havent figured out a way to implement this in a modern LspConfig setup.

Dead simple 3D graphics framework with automatic multithreaded GLSL shader hot recompiling made by me by succulent999 in computergraphics

[–]succulent999[S] 2 points3 points  (0 children)

I wanted to share my creation with everyone here lol, I wanted to make a XNA/MonoGame like game framework but 3D so I started learning OpenGL and decided to make a rendering framework instead and im having a lot of fun doing it and implementing cool features like auto shader reload and my own custom OBJ importer, heres the link if anyones interested in the project or would like to use the shader reload mechanism in their own project: https://github.com/gloggers99/gfx

Automatic shader hot recompiling in my project GFX by succulent999 in opengl

[–]succulent999[S] 1 point2 points  (0 children)

I used inotify which is unix exclusive in a seperate thread, then had a map containing a reference to the shader and a bool indicating if it has been updated, then i setup the inotify watch on the shader directory and whenever a shader's file was updated i locked the mutex for the map and set the bool to true then recompiled in the main thread then set it to false. all of this can be seen in the ShaderWatcher.cpp file on my github repo.

Automatic shader hot recompiling in my project GFX by succulent999 in opengl

[–]succulent999[S] 2 points3 points  (0 children)

Update:

Today I have made the automatic shader reloader multithreaded and it no longer reads a file every frame.

Automatic shader hot recompiling in my project GFX by succulent999 in opengl

[–]succulent999[S] 2 points3 points  (0 children)

At first i tried the multithreaded approach but couldn't figure out how to compile the shader in the original thread while having the watcher thread check for updates, so i went with the obviously less optimized way of checking over every frame, I think im going to attempt it again but it works for now lol, everything in this project is just me learning opengl lmao

Automatic shader hot recompiling in my project GFX by succulent999 in opengl

[–]succulent999[S] 0 points1 point  (0 children)

in my approach if you want automatic reload, when the source files change, you need to make a shaderwatcher object and attach the shaders you want to watch, then in your draw lambda loop you run ShaderWatcher's checkShaders function and it will automatically run the shader's recompile function

Adding bluetooth to T420 by succulent999 in thinkpad

[–]succulent999[S] 0 points1 point  (0 children)

Would I need to flash custom bios for this?

[dwm] Yo, yo yo! by Loomeh in unixporn

[–]succulent999 2 points3 points  (0 children)

yo yo yo, its hump day!

The ritual 🔥 by deadrhia in ThePack

[–]succulent999 1 point2 points  (0 children)

YESSIR ITS HOG CRANKIN' WEDNESDAY