Данная лабораторная работа посвещена изучению систем документирования исходного кода на примере Doxygen
$ open https://www.stack.nl/~dimitri/doxygen/manual/index.html
I wanted to start building the GUI parts of the game, but create it in such a way that I will have a network interface that I can later replace with the actual implementation.
I created a LoginClient
that provides an interface to the login server functions. This client works in an asynchronous manner. Login requests gets queued, which then gets processed by a thread. The fun part was in the details, which I will explain here.
I feel this is one of the things that has been least documented in Godot's documentation and few people in Godot's Discord channel have knowledge of how this works.
The general code to create and run a method in a thread looks like this:
Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
Latest revision: 2021-12-05.
Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04
. Alternatively, you can simply run docker run -it ubuntu:18.04 bash
.
NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>)
after each failed service <service name> stop
to kill it.
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
#define INPUTPLANE 1 | |
precision highp float; | |
uniform sampler2D tex; | |
uniform mat3 weight[128]; | |
uniform vec2 pixSize; | |
uniform float bias; | |
varying vec2 uv; | |
void main() { | |
vec4 inputOffset[1]; | |
inputOffset[0] = vec4(0,0,0.062499,0.124999); |
*.spv |
set disassembly-flavor intel | |
set disassemble-next-line on | |
set history save on | |
set print pretty on | |
set pagination off | |
set confirm off | |
define xxd | |
dump binary memory dump.bin $arg0 $arg0+$arg1 |
Ext.define('Ext.enhance.data.Store', { | |
override: 'Ext.data.Store', | |
constructor: function(config) { | |
var me = this; | |
me.callParent([config]); | |
me.on({ | |
'beforeload': function(store, operation) { | |
// keep the operation which has request object | |
store.lastOperation = operation; | |
} |
// | |
// Compile for emscripten using | |
// emcc -Iinclude SingleFileOpenGLTex.cpp \ | |
-O2 -std=c++14 -s TOTAL_MEMORY=33554432 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS='["png"]' --preload-file examples/data -s USE_SDL=2 -o html/SingleFileOpenGLTex.html | |
// where the following images must be located in a subfolder | |
// - examples/data/test.png | |
// - examples/data/cartman.png | |
// - examples/data/cube-negx.png | |
// - examples/data/cube-negz.png | |
// |