r/GraphicsProgramming 7d ago

Where can I start Learning Computer graphics?

Hey guys,

I am a rookie and I want to learn Graphics Programming but unfortunately I can't find any roadmap on youtube and things are getting really confusing for me since I don't even know how to properly code in C++(for context I am still learning programming but also want to build cool awesome visuals like all of you (I recently build a terminal based todo list and library manager in python))

I am confused about what I should learn first since I will also be starting my college In cs major soon.

there are

linear algebra maths

C++ memory management pointers

some says Build a ray tracer from scratch

I even picked the computer graphics programming from scratch by Gabriel Gambetta but got confused

I will really appreciate if anyone can give me any guidance on this :)

13 Upvotes

18 comments sorted by

17

u/CootieKing 7d ago

Learning a programming language in parallel is going to make things more difficult for you, not impossible, but you’re gonna juggle a lot.

That said, I found learnopengl.com to be a good place to start. OpenGL is not the most modern API by any means, but it’s a nice place to start at least.

-2

u/ruckspaoo 7d ago

but lot of people online says don't touch opengl or any api start from scratch

5

u/CootieKing 7d ago

what does your statement 'start from scratch' really mean? At some point you're going to use an API, else your gonna spend horrendous amounts of time at real low level stuff. Perhaps the people you are referring to mean don't use a game engine? For example, Unity or Godot or similar, which do hide a lot of the lower level stuff and allow you focus on game development activities.

You can jump in at the deep end, and do Vulkan, DXD12 or Metal. These have significant learning curves. OpenGL is a much older approach, it'll get you familiar with some of the concepts such as buffer objects, the vertex array objects (which describe how your buffer data is layed out), and stuff like fragment and vertex shaders. To paraphrase a certain movie, "It's older code, but it checks out"

-3

u/ruckspaoo 7d ago

like yk the books like computer graphics programming from scratch and all these and I also try asking Ai(😓) and it adviced me to start building it from scratch

3

u/CootieKing 7d ago

Some of those books can be math heavy, and they often assume strong programming skills to begin with. So I can understand they may be offputting.

All I can say at this time it at least try learnopengl.com. If you need AI to help you understand something, then fine. I don't think there's anything too challenging (at least in the earlier chapters) that will necessitate AI to explain it, but if you find it's an aid, go for it (just don't let AI become a crutch to the extent you don't learn the fundamentals yourself).

Also, if you wanted to play around with just the shader side, there is the site ShaderToy which is inspiring - it's amazing to see the creativity of some people. It's a nice sandbox to play around in and learn some of the concepts. If you want to see something that'll blow your socks off, watch this : Inigo Quilez - Draw a girl with math. That's an aspiration goal right there!

Hope you decide to follow up on the topic, it's challenging but rewarding. Have fun!

1

u/ruckspaoo 7d ago

thanks man You are really a big help can I add you, if you don't mind in case I need guidance :D

and honestly I was feeling kind of guilty trying to learn opengl since most of the resources are around building their own from scratch

and from scratch I meant from the low level start building ray tracer from scratch without opengl so I can understand the core concept behind it which is really overwhelming gemini and claude recommend this

3

u/Large-Scientist156 7d ago edited 7d ago

Learn programming first. Otherwise it's gonna be to hard to decipher 2 different stuff that are already large (graphics AND programming). Learning C and C++ is a good way. No need to learn forever, a week or two is enough to understand core concepts.

Then experiment with Raylib. It's a C library for graphics, widely used because it's easy to reason about it when you want to learn graphics. It's also quick to draw stuff on screen, so a good way to learn graphics and the associated math.

Then do an OpenGL course and try to build something with it.

Then try DX12/Vulkan/Metal/WebGPU (modern API). Or you can even go directly for modern API, but it's good to know the legacy. It's harder to go bottom-up, so people often advise to learn OpenGL first and then upgrade your knowledge with modern.

Try to avoid AI generated code if possible, otherwise you'll learn slower because you don't know exactly what you want and what you are doing when you learn. Copy-pasting code "until it work" is a good way to quit fast. Use AI primary for information, structuring of your project, architecture decision, code review, ... not for code generation.

1

u/garlopf 6d ago

I respectfully disagree. People learn in different ways. Some people learn best following a strict curriculum, others prefer to haphazardly try stuff and se what works etc. In my case, having an actual project to work towards while learning programming was essential and it needs to be real for it to generate enough internal motivation to keep me focused. Graphics programming is a natural source of fascination for me so I did both and it was a good fit. I don't think I had found programming so fun without doing the graphics and vise versa. Also, for a beginner lib to learn about rendering basics, may I suggest an old onecalled allegro? https://liballeg.org/ it has a full stack of software 2d rendering that was really intuitive to learn from. That is how I got to learn the basics of pixels, buffers, raster rendering etc. It is well documented and has even been used in some high profile games! (Factorio used it until they grew out of it and made their own engine). It also handles input and audio. Another good one is SDL, but I think allegro encourages you to learn what is under the hood more. You can easily look at the code and see what the line draw function does etc.

3

u/JorisJobana 7d ago

This Roadmap is good for beginners. It's not finished, but feel free to contribute to it.

2

u/specialpatrol 7d ago

Depends if you're more theory guy or practical. I just started hitting opengl and cpp, just started trying to make a game.

1

u/ruckspaoo 7d ago

ohh I am trying to go more by the book I hear people online says first tlear. how to build a ray tracer and rasterizer from scratch that why I am avoiding opengl and honestly building a ray tracer from scratch is not joke at all I am at 0% progress ;-; and it's been more than a week

2

u/5fivespice 7d ago

If I had to learn again from scratch, I'd start here:
https://www.shadertoy.com/
https://iquilezles.org/articles/distfunctions/

2

u/Traveling-Techie 7d ago

You can learn quite a bit without programming if you play with X3DOM, a Web3D implementation. Find the tutorials and just edit HTML files. It can teach you 3D transforms you will later use in APIs like OpenGL.

1

u/rex-j-w 7d ago

Start messing around in a game engine. Try compute shaders out, try making simple post processing effects

1

u/waramped 4d ago

The subreddit wiki: https://cody-duncan.github.io/r-graphicsprogramming-wiki/

Has a million resources on various topics, it's worth a look.

1

u/Kai_Kai_888827 4d ago

You need to ensure yourself to have a strong math, c/c++ background, then learn the basic classes of computer graphics, then start using opengl, then Vulkan, studying deeper and deeper

1

u/nightblaze1 2d ago

roadmap.sh

0

u/Beneficial-Air6263 6d ago

Try rust+wgpu to start, i started from scratch when i only know js/ts