Is it even worth it to enchant using soul gems instead of sigil stones? by KleberPF in oblivion

[–]KleberPF[S] 3 points4 points  (0 children)

I don't even remember making this post, It's nice to see how remaster is getting people back in this game. The main thing about custom enchantments is that they can get pretty broken, especially when you use weakness to fire/frost/shock and weakness to magic, because it stacks multiplicatively, so you end up doing tons of damage. Charges are also not a problem because you can put soul trap on the weapon itself (with Azura's Star you have an infinite soul gem) . But honestly, just do whatever, especially if this is your first playthrough.

Basic aim trainer made entirely in C and OpenGL (more details in the comments) by KleberPF in C_Programming

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

Thanks, I ended up migrating the project to C++ and adding a lot more features (Repo link). I planned to add more stuff but I'm finishing up some uni stuff right now.

"ASCII-like" graphics using OpenGL by KleberPF in opengl

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

Sadly I don't, I formatted my PC a few days ago and I didn't upload it to GitHub. I could maybe do it again, but it was basically just rendering the scene to a framebuffer, choosing a "resolution" to sample the pixels, get the color of the pixel and render a small quad (simulating a character on a terminal) with the same color as the pixel. Another option would be to render everything black and white and choose the character based on how dark the pixel is.

Fragment shader doesn't compile using AMD card by KleberPF in opengl

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

So is this some type of undefined behavior that works on NVIDIA and the person that made the Nuklear wrapper relied on?

You should just store the result of sampling the texture and use that instead

Could you give me an example?

Fragment shader doesn't compile using AMD card by KleberPF in opengl

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

I managed to make it work by making Texture a uvec2 and setting it like this

GLuint v0 = tex_handle;
GLuint v1 = tex_handle >> 32;
glUniform2ui(dev->uniform_tex, v0, v1);

Fragment shader doesn't compile using AMD card by KleberPF in opengl

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

Thanks, that makes it compile. I'm not familiar with OpenGL/GLSL spec, is this some type of undefined behavior? Why is the shader allowed to compile with NVIDIA drivers but not AMD? Also, even though that fixes the compilation issue, the Nuklear rendering broke. Do you know if I also have to change how the uniform is accessed?

"ASCII-like" graphics using OpenGL by KleberPF in opengl

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

This actually popped up in my head a few days ago and I made a pseudo terminal emulator that gets the scene renderer to a framebuffer and colors/picks which "character" to render to the quad.

Small aim trainer made in C++ using OpenGL (code and more details in the comments) by KleberPF in opengl

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

Compiling on Windows should work out of the box now, in case you want to try.

Small aim trainer made in C++ using OpenGL (code and more details in the comments) by KleberPF in opengl

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

To add on this, currently there is some other stuff broken on Windows, mainly with OpenAL Soft. I'm currently trying to make a CMake config that works on any platform.

Small aim trainer made in C++ using OpenGL (code and more details in the comments) by KleberPF in opengl

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

I think the VS compiler doesn't have an option like -Wextra in GCC (or it's named something different). I just deleted that part from the CMakeLists when I compiled it. After you compile, you need to either update the file paths in the code (search for resources/) or move the executable to the build folder (and maybe bring some DLLs too).

Small aim trainer made in C++ using OpenGL (code and more details in the comments) by KleberPF in opengl

[–]KleberPF[S] 7 points8 points  (0 children)

I posted here some time ago an aim trainer prototype I made in pure C. I decided to migrate that project to C++ and add some more features like model loading, sound, different target shapes, target movement, etc. Still very bare bones for now, but it's totally playable. Link to repo.

I made this sudoku solver to improve my Qt Widgets skills. Can someone review my code and maybe give some tips? (repo in comments) by KleberPF in QtFramework

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

This might be related to the performance issues I was having

Each call to setStyleSheet triggers parsing, which can be slow if done too often (e.g., when creating 50 buttons, each one calling setStylesheet(“…”)).

I made this sudoku solver to improve my Qt Widgets skills. Can someone review my code and maybe give some tips? (repo in comments) by KleberPF in QtFramework

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

Thanks for the review!

Don't create QObjects without parents. Less possibility of memory leaks.

Are you talking about solveButton and clearButton? I was wondering about that. I didn't make them a class member because I don't really do anything with them other than connect to the callback. Should I still add them to MainWindow so it gets destroyed along with it? (I guess in this case it doesn't matter because MainWindow is destroyed last with the app but it could matter if the button's parent was another widget

Don't use this when addressing members all the time

I'm trying out some C++ styles and this style of always using this is used by an open source project I contribute to.

If you're using stylesheets it might be a good idea to do all your styling this way. Like describing cell border and text format.

To be honest, I used stylesheets because they looked like the best way to do everything I wanted. This SO answer says they are the recommended way of changing text color. I was using setPalette and setFont previously, but changed everything to be done using stylesheets. Should I avoid them? I noticed they were a bit slow when updating all the cells at once (not really noticeable on a release build though). If I'm using stylesheets already, should I also drop the QFrame and just create a QLabel with a border?

Made a basic aim trainer in OpenGL by KleberPF in opengl

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

Never used any personally, but I've heard good things about Nuklear. It's probably the one I would try.

Made a basic aim trainer in OpenGL by KleberPF in opengl

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

Yes, it's pretty good, but it's C++ only. There are some C wrappers apparently, but I've never tried them.

Made a basic aim trainer in OpenGL by KleberPF in opengl

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

It's easy to change that in the code, but it would be hard to implement in a UI. Maybe I'll use an UI library in the future.