Author Archives: dmitriano

How RenderDoc works with Vulkan app

Launching a Windows app

I built Vulkan samples for Windows as follows:

set MY_VS_GENERATOR="Visual Studio 17 2022"
set MY_DRIVE=D:
%MY_DRIVE%
cd \dev\build\v
set MY_CMAKE_EXE=%MY_DRIVE%\dev\tools\cmake-3.24.2-windows-x86_64\bin\cmake.exe
%MY_CMAKE_EXE% ..\..\repos\Vulkan -G %MY_VS_GENERATOR% -A x64
rem Open generated vulkanExamples.sln and build.

and launched bloom.exe with RenderDoc:

(more…)

How RenderDoc works with OpenGL app

I cloned RenderDoc’s repository:

git clone https://github.com/baldurk/renderdoc.git

easily built renderdoc\renderdoc.sln with MSVC2022 on my home machine, opened my Lines Game built on Windows with OpenGL:

(more…)

Setting up QT Creator with MinGW + CMake + Ninja

Add C and C++ compilers:

(more…)

Google Play Console displays std::exception message

My Android game crashed on a user’s device at the highlighted line:

GameMovement::GameMovement(GameField& field, CellCoord from, CellCoord to) :
    m_field(field),
    pBall(m_field.GetCell(from))
{
    GameGraph graph(&m_field, from, to);

    m_path.reserve(m_field.GetColumnCount() + m_field.GetRowCount());

    if (!graph.FindPath(m_path))
    {
        throw std::runtime_error("Path not found.");
    }

    if (m_path.size() < 2)
    {
        throw std::runtime_error("Wrong path.");
    }
}
(more…)

How I tried to fix “Suggested maximum image size is 2560 pixels” error in WordPress

While uploading an image I got:

(more…)

Building Vulkan samples for Android

Cloned the repository:

git clone https://github.com/SaschaWillems/Vulkan.git
git submodule init
git submodule update

Updated assets:

python.exe download_assets.py
(more…)

Installing Vulkan SDK on Windows

I downloaded Vulkan SDK and installed Vulkan Hardware Capability Viewer at C:\VulkanSDK\1.3.236.0\Bin\vulkanCapsViewer.exe:

(more…)

Building a C++ project with MinGW using Visual Studio Code

In CMake Tools extension settings I specified my CMake path:

and built my project with MSVC 2022 first and then switched to MinGW.

Building a project with MSVC 2022

On my machine with installed MSVC 2022 it automatically generated configuration file %LocalAppData%/CMakeTools/cmake-tools-kits.json:

[
  {
    "name": "Visual Studio Professional 2022 Release - amd64",
    "visualStudio": "04bbaecf",
    "visualStudioArchitecture": "x64",
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "x64",
      "toolset": "host=x64"
    }
  },
  {
    "name": "Visual Studio Professional 2022 Release - amd64_x86",
    "visualStudio": "04bbaecf",
    "visualStudioArchitecture": "x64",
    "preferredGenerator": {
      "name": "Visual Studio 17 2022",
      "platform": "win32",
      "toolset": "host=x64"
    }
  },
(more…)

Compiling a C++ source file in Visual Studio Code with MinGW

I followed this instruction and configured C/C++ extension as follows:

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "windowsSdkVersion": "10.0.19041.0",
            "compilerPath": "D:\\dev\\tools\\x86_64-12.2.0-release-win32-seh-rt_v10-rev0\\mingw64\\bin\\g++.exe",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "windows-gcc-x64"
        }
    ],
    "version": 4
}
(more…)

Building QT6.4.2 for MacOS and iOS

Build QT for MacOS separately in Debug and Release configuration:

tar xf qt-everywhere-src-6.4.2.tar.xz
cd ~/build/qt
export MY_QT_SRC_DIR=~/repos/qt-everywhere-src-6.4.2
export MY_MODE=release
#export MY_MODE=debug

export MY_INSTALL_PATH=~/libs/QT6.4/${MY_MODE}/MacOs
${MY_QT_SRC_DIR}/configure -prefix $MY_INSTALL_PATH -c++std c++20 -opensource -confirm-license \
  -static -static-runtime -${MY_MODE} -force-debug-info \
  -no-openssl -securetransport -DQT_NO_EXCEPTIONS=1 \
  -skip qt3d -skip qt5compat -skip qtactiveqt -skip qtcharts -skip qtcoap -skip qtconnectivity \
  -skip qtdatavis3d -skip qtdoc -skip qtlottie -skip qtmqtt -skip qtnetworkauth -skip qtopcua \
  -skip qtserialport -skip qtpositioning -skip qtquicktimeline -skip qtquick3d -skip qtremoteobjects \
  -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtvirtualkeyboard -skip qtwayland \
  -skip qtwebchannel -skip qtwebengine -skip qtwebview -skip qtquick3dphysics -skip qtspeech -skip qtlocation \
  -skip qthttpserver \
  -- -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
  && cmake --build . --parallel \
  && cmake --install .
(more…)