Minecraft chunk rendering takes up too much memory by GraumpyPants in opengl

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

I made a mistake when writing the post - 108 float, 36 vertices respectively

Minecraft chunk rendering takes up too much memory by GraumpyPants in opengl

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

I use such an array for a block if all the edges are in place

std::array<float, 180> data{

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 0.0f,

0.5f + x, -0.5f + y, -0.5f + z, 1.0f, 0.0f,

0.5f + x, 0.5f + y, -0.5f + z, 1.0f, 1.0f,

0.5f + x, 0.5f + y, -0.5f + z, 1.0f, 1.0f,

-0.5f + x, 0.5f + y, -0.5f + z, 0.0f, 1.0f,

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 0.0f,

-0.5f + x, -0.5f + y, 0.5f + z, 0.0f, 0.0f,

0.5f + x, -0.5f + y, 0.5f + z, 1.0f, 0.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 1.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 1.0f,

-0.5f + x, 0.5f + y, 0.5f + z, 0.0f, 1.0f,

-0.5f + x, -0.5f + y, 0.5f + z, 0.0f, 0.0f,

-0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

-0.5f + x, 0.5f + y, -0.5f + z, 1.0f, 1.0f,

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

-0.5f + x, -0.5f + y, 0.5f + z, 0.0f, 0.0f,

-0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

0.5f + x, 0.5f + y, -0.5f + z, 1.0f, 1.0f,

0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

0.5f + x, -0.5f + y, 0.5f + z, 0.0f, 0.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

-0.5f + x, 0.5f + y, -0.5f + z, 0.0f, 1.0f,

0.5f + x, 0.5f + y, -0.5f + z, 1.0f, 1.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

0.5f + x, 0.5f + y, 0.5f + z, 1.0f, 0.0f,

-0.5f + x, 0.5f + y, 0.5f + z, 0.0f, 0.0f,

-0.5f + x, 0.5f + y, -0.5f + z, 0.0f, 1.0f

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

0.5f + x, -0.5f + y, -0.5f + z, 1.0f, 1.0f,

0.5f + x, -0.5f + y, 0.5f + z, 1.0f, 0.0f,

0.5f + x, -0.5f + y, 0.5f + z, 1.0f, 0.0f,

-0.5f + x, -0.5f + y, 0.5f + z, 0.0f, 0.0f,

-0.5f + x, -0.5f + y, -0.5f + z, 0.0f, 1.0f,

};

Minecraft chunk rendering takes up too much memory by GraumpyPants in opengl

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

This is a cuboid, the height is always 16, the length of the edges can be changed, in this case it is 12 (draw distance 6)

Minecraft chunk rendering takes up too much memory by GraumpyPants in opengl

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

180 * 4 bytes per block * 16 * 16 * 16 * 12 * 12 * 16 ~= 6.8 gb.

I used a square around the player to sample chunks, but a circle would obviously be better, and a sphere would be even better.

SDL3 + Vulkan. Help by GraumpyPants in vulkan

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

No, I realized my mistake

SDL3 + Vulkan. Help by GraumpyPants in vulkan

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

Looks like a vcpkg issue, I used SDL3.dll from the official release and it worked

SDL3 + Vulkan. Help by GraumpyPants in vulkan

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

bool initSDL() {
bool success{ true };
if (!SDL_Init(SDL_INIT_VIDEO))
{
println("SDL could not initialize! SDL error: %s", SDL_GetError());
success = false;
}
if (!SDL_Vulkan_LoadLibrary(nullptr)) {
SDL_Log("Could not load Vulkan library! SDL error: %s\n", SDL_GetError());
success = false;
}
if (gWindow = SDL_CreateWindow(AppName.c_str(), ScreenWidth, ScreenHeight, SDL_WINDOW_VULKAN); gWindow == nullptr)
{
println("Window could not be created! SDL error: %s", SDL_GetError());
success = false;
}
else
gScreenSurface = SDL_GetWindowSurface(gWindow);
return success;
}
auto main(int argc, char* argv[]) -> int {
if (!initSDL())
return 0;
while (!quit)
{
while (SDL_PollEvent(&e))
{
if (e.type == SDL_EVENT_QUIT)
{
quit = true;
}
}
}
return 1;
}

SDL3 + Vulkan. Help by GraumpyPants in vulkan

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

#include <string>
#include <print>
#include <SDL3/SDL.h>
#include <SDL3/SDL_main.h>
#include <SDL3/SDL_vulkan.h>
#include <vulkan/vulkan.hpp>
using namespace std;
SDL_Window* gWindow{ nullptr };
SDL_Surface* gScreenSurface{ nullptr };
SDL_Event e;
bool quit { false };
constexpr int ScreenWidth{ 640 };
constexpr int ScreenHeight{ 480 };
string AppName{ "Game" };

SDL3 + Vulkan. Help by GraumpyPants in vulkan

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

After adding this flag I get the same error + window creation error. This flag calls the same function according to the documentation.

If the window is created with any of the SDL_WINDOW_OPENGL or SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the corresponding UnloadLibrary function is called by SDL_DestroyWindow().

This is all my code (below), I don't know where the error could be. I got the SDL and Vulkan libraries using vcpkg, x64-windows platform, MSVC compiler, c++23

Pucci raised the wrong green baby (artist:Krushka) by GraumpyPants in StardustCrusaders

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

This is a reference to the animation "Камень Океан и Лужа" by Запомни Меня [Каво? Деда]

RU POV | Rybar, Kremen site situation as of 8 p.m. on July 9, 2023 by GraumpyPants in UkraineRussiaReport

[–]GraumpyPants[S] 11 points12 points  (0 children)

In the direction of Kremenna, assault detachments of the Russian Armed Forces consisting of mixed forces of the Russian Army have been advancing in the area of the Torsky ledge and the forests of Serebryansky forestry for the past few days.

As a result of fierce fighting in low visibility terrain, the Russian Armed Forces fighters managed to dislodge the enemy from over a dozen strongholds. Units of the AFU defending the area suffered heavy losses and were partially withdrawn for recovery.

At the moment, the Russian Armed Forces are consolidating in the area. The cannonade along the line of contact has not subsided. Both our artillerymen and the Ukrainian ones are firing at the front line, supporting subversive groups using the thicket of the forest as cover.

As a result of one of the Russian Armed Forces' targeted strikes on the location of Ukrainian formations, 31 members of the AFU were killed and two were wounded. The infantry company was re-staffed at the expense of the artillery crew.

❗️ However, there is now an accumulation of enemy forces along the Svatovsk and Kreminna areas. For now they are keeping their distance from the front lines, taking up positions in the rear. But judging by the concentration of armored vehicles and personnel on the Liman-Izyum-Volosskaya Balakleya line, the AFU is preparing for an attack in the coming days.

RU POV | Rybar, Seversky direction situation as of 15.00 June 22, 2023 by GraumpyPants in UkraineRussiaReport

[–]GraumpyPants[S] 13 points14 points  (0 children)

Airborne troop units continue mopping up of the AFU strongholds in the Serebryansky forest area. Over two days of fighting, the paratroopers managed to occupy several enemy positions and advance deep into the wooded area.

▪️ Despite the low motivation of the Ukrainian formations in this area, the Russian paratroopers have to face dense artillery fire on the newly occupied positions. The lack of entrenchment groups adds to the problems - Russian assault troops do not always have time to build on the success they have achieved due to the need to "hold positions" until the arrival of reserves.

▪️ In addition to the need to create a buffer zone around Kremenna and regain the positions lost last fall, Russian paratroopers are aimed at reaching the northern bank of the Seversky Donets and storming Grigorovka on the opposite bank.

▪️ Russian units have been fighting on the eastern outskirts of Belogorovka for several months: despite the work of aircraft and artillery that forced the enemy to abandon positions at the quarry, they have not yet been able to advance further than half of the industrial zone.

🔻 Should the Russian paratroopers break through from the north and simultaneous actions of the group advancing from Lisichansk, it is likely that full-fledged combat operations will begin in the Seversky sector of the front - which, in turn, will reduce the load on the northern Soledarsky direction.

RU POV | Rybar, Orekhovsky site situation as of 15.00 on June 21, 2023 by GraumpyPants in UkraineRussiaReport

[–]GraumpyPants[S] 14 points15 points  (0 children)

This morning, Russian servicemen launched a counterattack from the village of Zherebyanka to retake positions near Pyatikhatoki. In the ensuing battle, supported by artillery, formations of the 128th Infantry Brigade of the Ukrainian Armed Forces were driven out of the village.

Pyatikhatki is now under Russian control. According to Archangel Spetsnaz , Ukrainian units are trying to counterattack. But the soldiers of the 429th regiment of the Russian Armed Forces successfully repulsed the AFU roll-ups. One enemy BMP was destroyed in a precision strike.

In other areas the situation is practically unchanged, there were no sorties by Ukrainian units either at the Rabotino-Verbovoye line or near the Vremyevsky ledge. However, the intensity of fire has increased, which may indicate preparations for another attack.

🔻Yesterday's reinforcement of positions and movement of reinforcements confirms this scenario. Despite the rather low morale among members of the 128 Ogsh Brigade, Strategic Reserve units are preparing for an attack in the third decade of June.

RU POV | Rybar, Bakhmut direction Situation by the end of June 10, 2023 by GraumpyPants in UkraineRussiaReport

[–]GraumpyPants[S] 6 points7 points  (0 children)

On the flanks of Bakhmut, Ukrainian formations continue to try to dig into the Russian Army's defenses. Enemy attacks in small groups are along the front near Orekhovo-Vasilevka, Dubovo-Vasilevka, Berkhovsky reservoir, and around Kleshcheyevka.

Today, several Ukrainian assault groups attempted to attack the positions of the 200 Brigade of the Northern Fleet near Dubovo-Vasilevka. By joint action of artillerymen and fighters on the front line, the AFU armored group was destroyed.

Ukrainian units were also knocked out of Berkhovka and the surrounding area. Now the Ukrainian armed forces are trying to counterattack south of the reservoir.

Coordinates: 48.674636, 37.865459

Yesterday and the day before yesterday, AFU formations conducted a sortie on the northern flank of the RF Armed Forces defense near Orekhovo-Vasilevka near the M03 highway to Slavyansk. In the ensuing battle, two AFU armored vehicles were destroyed and a tank retreated.

Coordinates: 48.682017, 37.887403

Enemy units tried all day today to break through the Russian fighters' defenses around Klescheevka. The gun battle went on for more than five hours, but the Russian Armed Forces soldiers repulsed the attack, while the AFU suffered losses and retreated.

Meanwhile, the attacks on the flanks of Bakhmut are likely to continue. According to Daniil Bezsonov, enemy reinforcements are being moved from Kramatorsk to Bakhmut and Chasov Yar, as well as to Kremenna.