Project Description

This project was initially created for my graduation project. Currently, I've finished some basic functions required by a simple game engine. I use this project to learn modern OpenGL and C, and implemented some basic functions required by a game engine.

Currently, I've finished the Linux, Winodws and Android support of this project.

Goal for this Hackweek

I will continue developing this project during this HackWeek, improve its stability, and fix some bugs and implement more functions required by a game engine.

Resources

  • OpenGL ES 3.0
  • cglm
  • Assimp
  • stb_image
  • GLAD
  • GLFW
  • ffmpeg
  • openAL
  • freeALUT

Looking for hackers with the skills:

opengl

This project is part of:

Hack Week 21

Activity

  • over 2 years ago: dsterba liked this project.
  • over 2 years ago: tdz liked this project.
  • over 2 years ago: StarryWang started this project.
  • over 2 years ago: StarryWang added keyword "opengl" to this project.
  • over 2 years ago: StarryWang liked this project.
  • over 2 years ago: StarryWang originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    RISC-V emulator in GLSL capable of running Linux by favogt

    Description

    There are already numerous ways to run Linux and some programs through emulation in a web browser (e.g. x86 and riscv64 on https://bellard.org/jslinux/), but none use WebGL/WebGPU to run the emulation on the GPU.

    I already made a PoC of an AArch64 (64-bit Arm) emulator in OpenCL which is unfortunately hindered by a multitude of OpenCL compiler bugs on all platforms (Intel with beignet or the new compute runtime and AMD with Mesa Clover and rusticl). With more widespread and thus less broken GLSL vs. OpenCL and the less complex implementation requirements for RV32 (especially 32bit integers instead of 64bit), that should not be a major problem anymore.

    Goals

    Write an RISC-V system emulator in GLSL that is capable of booting Linux and run some userspace programs interactively. Ideally it is small enough to work on online test platforms like Shaderoo with a custom texture that contains bootstrap code, kernel and initrd.

    Minimum:

    riscv32 without FPU (RV32 IMA) and MMU (µClinux), running Linux in M-mode and userspace in U-mode.

    Stretch goals:

    FPU support, S-Mode support with MMU, SMP. Custom web frontend with more possibilities for I/O (disk image, network?).

    Resources

    RISC-V ISA Specifications
    Shaderoo
    OpenGL 4.5 Quick Reference Card

    Result as of Hackweek 2024

    WebGL turned out to be insufficient, it only supports OpenGL ES 3.0 but imageLoad/imageStore needs ES 3.1. So we switched directions and had to write a native C++ host for the shaders.

    As of Hackweek Friday, the kernel attempts to boot and outputs messages, but panics due to missing memory regions.

    Since then, some bugs were fixed and enough hardware emulation implemented, so that now Linux boots with framebuffer support and it's possible to log in and run programs!

    The repo with a demo video is available at https://github.com/Vogtinator/risky-v