Category : debugging

I want to write a C++ program that solves a given nonogram recursively using backtracking. The nonogram is just a grid defined with using grid = vector<vector>; in which ‘#’ represents a marked cell. I defined two function that check if the current row and column is correct, given that there’s the current position is ..

Read more

I made a project that is using SFML library on linux, it’s working pretty fine. I start it by launching this script: g++ -c main.cpp -I/usr/include g++ main.o -o sfml-app -L/usr/lib -lsfml-graphics -lsfml-window -lsfml-system export LD_LIBRARY_PATH=/usr/lib && ./sfml-app And here is the code de in the main.cpp file: #include <SFML/Graphics.hpp> int main() { sf::RenderWindow window(sf::VideoMode(200, ..

Read more

I’m writing OpenGL code for a project, using Visual Studio and C++. I have created a shader that contains a Uniform Block correctly linked and initialized in the source code. This is the source code part: unsigned int sunLightUBO; glGenBuffers(1, &sunLightUBO); glBindBuffer(GL_UNIFORM_BUFFER, sunLightUBO); glBufferData(GL_UNIFORM_BUFFER, 48, NULL, GL_STATIC_DRAW); glBufferSubData(GL_UNIFORM_BUFFER, 0, 12, &sunDirection); glBufferSubData(GL_UNIFORM_BUFFER, 12, 12, &sunAmbient); ..

Read more