transparent-cube

Minimal cross-platform native/wasm graphics example.
git clone git://git.amin.space/transparent-cube.git
Log | Files | Refs | README | LICENSE

commit 1db4c4cfb547beacfa0dcf5481e277b6ac7eefcd
parent dcb96103bdb2ea281fed020c00b320cbe02eac78
Author: amin <dev@aminmesbah.com>
Date:   Sun,  3 Feb 2019 01:11:51 +0000

Ask for vsync

FossilOrigin-Name: 8db25841ff371d9cb43ef867262dbfc5e5f99d9682ad7c30e2123b0928fbdda3
Diffstat:
Msrc/game.c | 2+-
Msrc/platform_linux.c | 1+
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/game.c b/src/game.c @@ -164,7 +164,7 @@ void game_init(struct GameState *game_state, uint32_t screen_width, uint32_t scr void game_update_and_render(struct GameState *game_state, float dt, uint32_t screen_width, uint32_t screen_height) { glDepthMask(GL_TRUE); - glClearColor(0.1f, 0.1f, 0.1f, 1.0f); + glClearColor(0.2f, 0.2f, 0.3f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); //glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); diff --git a/src/platform_linux.c b/src/platform_linux.c @@ -54,6 +54,7 @@ int main(void) } glfwMakeContextCurrent(window); glfwSetFramebufferSizeCallback(window, framebuffer_size_callback); + glfwSwapInterval(1); if (!gladLoadGLLoader((GLADloadproc) glfwGetProcAddress)) {