How+I+rewrote+my+C+++game+engine+or+framework+in+C
How+I+rewrote+my+C+++game+engine+or+framework+in+C
typedef
struct
https://md2pdf.netlify.app 1/6
16/04/2022, 13:39 How I rewrote my C++ game engine or framework in C.
// C++
int array[10] = { 0 };
// C
int array[10];
for (int i = 0; i < 10; i++) {
array[i] = 0;
}
class Character {
public:
Character(int x, int y, int z, const std::string& name);
~Character();
int GetZ();
private:
int x, y z;
std::string name;
};
typedef struct {
int x, y, z;
const char * name;
} Character;
GLFWwindow * window
Program Props:
VBO, IBO, VAO = { 1, 1, 1 }:
https://md2pdf.netlify.app 3/6
16/04/2022, 13:39 How I rewrote my C++ game engine or framework in C.
Init();
Update();
Render();
Clean();
Init();
Update();
Render();
Clean();
Init();
Update();
Render();
Clean();
https://md2pdf.netlify.app 4/6
16/04/2022, 13:39 How I rewrote my C++ game engine or framework in C.
https://md2pdf.netlify.app 5/6
16/04/2022, 13:39 How I rewrote my C++ game engine or framework in C.
https://md2pdf.netlify.app 6/6