This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Using SDL3 | |
| #include <emscripten/html5.h> | |
| SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[]) | |
| { | |
| App *myApp = (App *)SDL_malloc(sizeof(App)); | |
| *appstate = myApp; // This makes the pointer available to all other callbacks | |
| if (!SDL_Init(SDL_INIT_VIDEO)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INFO:DLIB: Log server started on port 64055 | |
| INFO:ENGINE: Target listening with name: DESKTOP-IGQBLF4 - fe80::36b:885f:a063:a0c8 - Windows | |
| INFO:ENGINE: Engine service started on port 64056 | |
| INFO:GRAPHICS: Installed graphics device 'ADAPTER_FAMILY_OPENGL' | |
| INFO:ENGINE: Defold Engine 1.12.4 (402218d) | |
| INFO:PROFILER: Initialized Remotery (ws://127.0.0.1:17815/rmt) | |
| INFO:ENGINE: Loading data from: build/default | |
| INFO:JOLTEXTENSION: ConsoleDebugRenderer: Initialized successfully | |
| INFO:CRASH: Successfully wrote Crashdump to file: C:\Users\Ivan\AppData\Roaming/Defold/_crash | |
| ERROR:CRASH: CALL STACK: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.21) | |
| project(rectangle-sdl3-wasm-cpp LANGUAGES CXX) | |
| set(SDL3_DIR "C:/libs/SDL3-devel-4.0.15-wasm/lib/cmake/SDL3") | |
| find_package(SDL3 REQUIRED) | |
| add_executable(app src/main.cpp) | |
| target_link_libraries(app PRIVATE SDL3::SDL3) | |
| if(EMSCRIPTEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.21) | |
| project(rectangle-sdl3-wasm-c LANGUAGES C) | |
| set(SDL3_DIR "C:/libs/SDL3-devel-4.0.15-wasm/lib/cmake/SDL3") | |
| find_package(SDL3 REQUIRED) | |
| add_executable(app src/main.c) | |
| target_link_libraries(app PRIVATE SDL3::SDL3) | |
| if(EMSCRIPTEN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| To sort packages in your project directory: | |
| ``` | |
| pip install isort | |
| cd your_project_directory | |
| isort . | |
| ``` | |
| To detect unused packages in your project directory: | |
| ``` | |
| pip install pyflakes | |
| cd your_project_directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.21) | |
| project(play-audio-sdl3-c) | |
| add_executable(app) | |
| # Specify where the application source files are stored | |
| target_sources(app | |
| PRIVATE | |
| src/main.c | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install moderngl pygame numpy pyglm | |
| from typing import Optional, Tuple | |
| import glm | |
| import moderngl | |
| import numpy as np | |
| import pygame as pg | |
| # ---------------- TYPES ---------------- # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install moderngl pygame numpy pyglm | |
| from typing import Optional, Tuple | |
| import glm | |
| import moderngl | |
| import numpy as np | |
| import pygame as pg | |
| # ---------------- TYPES ---------------- # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| dist | |
| public/js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install PyOpenGL Pygame | |
| import pygame | |
| from OpenGL.GL import * | |
| from pygame.locals import * | |
| def main(): | |
| pygame.init() | |
| pygame.display.set_mode((350, 350), DOUBLEBUF | OPENGL) |
NewerOlder