How to Program Graphics and Input in C Without Any Libraries?

0
0
Asked By CuriousCoder42 On

I'm really interested in diving deep into programming graphics and handling keyboard/mouse inputs without using any libraries at all, including OpenGL, SDL, or even the standard library. My goal is to understand how these libraries were initially created by exploring low-level programming in C or assembly language. Can anyone point me to resources or GitHub examples that demonstrate this level of programming?

3 Answers

Answered By TechSavant88 On

It's tough to program without libraries on modern systems because you typically need to go through the OS for hardware access. If you're using Linux, check out the X Window System or Wayland protocol specifications—they're complex, but they show how GUIs work at a low level. You could technically recreate these with raw syscalls, but it's a massive undertaking. Windows and MacOS systems are trickier since their protocols aren't open-source, so it might be hard to find detailed info there.

Answered By PixelPioneer99 On

Writing something like DirectX from scratch is quite a task! Just starting out, maybe look into embedded graphics or simpler projects. You'll want to build your knowledge gradually instead of jumping straight into complex graphics programming.

Answered By GadgetGuru12 On

I love Ben Eater's YouTube series! He does an awesome job showing how to construct things like a simple 'Hello, World' program from scratch in assembly, and even builds a computer step by step. It's a fantastic resource for low-level programming.

CuriousCoder42 -

Thanks for the recommendation! I’ll definitely check out his series.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.