m1 macのc++でOpenGLを使ってテトリスを作ってみた

2022/08/21

m1 mac の、c++と OpenGL で簡易的なテトリスを作りました。

目次

リポジトリ

動作環境

  • m1 mac
uname -a
Darwin mac.local 21.6.0 Darwin Kernel Version 21.6.0:
Sat Jun 18 17:05:47 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T8101 arm64

❯ brew config
HOMEBREW_VERSION: 3.5.9
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
macOS: 12.5-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: 13.4.1
Rosetta 2: false

Install〜実行

GLFW をインストール

brwe install glfw
vim ~/.zshrc
# 下記を追加
export CPATH=/opt/homebrew/include
export LIBRARY_PATH=/opt/homebrew/lib

リポジトリを clone

git clone https://github.com/edo1z/cpp-opengl-tetris.git

bin ディレクトリ作成、make、実行

cd cpp-opengl-tetris
mkdir bin
make
./bin/main
Rust🦀, Network⚡, PostgreSQL🐘, Unity🎮

Tags

rust  (9)
rocket  (7)
svelte  (5)
c++  (4)
ethereum  (3)
solidity  (3)
vscode  (3)
sqlx  (3)
glfw  (2)
opengl  (2)
nestjs  (2)
graphql  (2)
render  (2)
wsl2  (2)
truffle  (1)
goerli  (1)
geth  (1)
hardhat  (1)
nft  (1)
gui  (1)
tetris  (1)
next.js  (1)
jwt  (1)
nextauth  (1)
node.js  (1)
prisma  (1)
passport  (1)
urql  (1)
codegen  (1)
mdsvex  (1)
markdown  (1)
tmux  (1)
nvim  (1)
axum  (1)
atcoder  (1)
vim  (1)
pacman  (1)
tracing  (1)
Cursor  (1)
VSCode  (1)
PHP  (1)
Laravel  (1)