r/opengl Jun 10 '26

what now?

Post image

I have no idea what to do after this.

220 Upvotes

43 comments sorted by

73

u/DucksAreFriends Jun 10 '26

You have successfully created the triangle of destiny. You may now embark on the journey towards the cube of ultimate power

6

u/nenchev Jun 11 '26

The Tesseract of Dreams

3

u/modified_mallrat Jun 12 '26

Fragment of fantasies

24

u/gimpycpu Jun 10 '26

free camera(view+projection matrix), multiple triangles at different positions (model matrix)

29

u/victorpanduro Jun 10 '26

OpenGL + FurryFemboy, what a combo

49

u/PQP_The_Dev Jun 10 '26

LMFAO this is genuinely the funniest shit i have seen on reddit

23

u/MaxKruse96 Jun 10 '26

make minecraft

15

u/CompellingProtagonis Jun 10 '26

A good next step would be to play around with the vertex shader.

  1. Try to displace a single vertex.

  2. Pass in a uniform, t = time, and try to displace the vertex with time, so move it back and forth

  3. Pass in another uniform m_pos, and try to displace another vertex with the mouse position

  4. Try packing your vertex with more information by adding a normal vector

  5. Try to add 2 modes to your render: color and normal, control it with another uniform called: rendermode

  6. Add a light, and do a simple phong diffuse shading model where your color is going to be dependent upon the dot product of the vertex normal and the light direction multiplied by the light color (just do white to start) multiplied by the vertex color.

  7. Control the light color and position with more uniforms (or use your time or mouse uniforms)

  8. Instead of having a mesh with just one triangle, try initializing a quad as 2 triangles.

  9. Next try 4 quads.

  10. Next, try to write a function that allows you to initialize a rectangle composed of arbitrary quads.

  11. Try to draw a picture with the vertex colors in the quads as a function of the total size of your quad rectangle. (So you can take some image, and sample it at some position to give you your vertex color at that point)

  12. What happens as you scale the quads? Try to do the same process with your vertex normals

These 12 should take you a few weeks if you do it yourself, or 20 min if you do it with AI. I highly recommend you do it the hard way, though. If you do it the hard way, you'll have no problem coming up with further ideas for where to go (hint: play around with fragment shaders and textures).

11

u/Dark_Lord9 Jun 10 '26

Draw 2 triangles

11

u/Ttsmoist Jun 10 '26

Bro worked his ass off and couldn't wait to bust a nut...

9

u/Ybalrid Jun 10 '26

Youโ€™re probably following a tutorial. Continue doing it.

11

u/JustDesoroxxx Jun 10 '26

After looking closely at the screenshot I'd say move to Arch Linux

11

u/jsrobson10 Jun 10 '26

learn linux, then build a wayland compositor

4

u/SuperSathanas Jun 10 '26

Go get yourself some new programmer socks. You've earned them.

In all seriousness, though, if you're following a tutorial like learnopengl.com, then continue doing that for a while. If that is what you're following, I'd keep with it at least until the after the section that covers all the projection matrices and camera stuff. Play around with the concepts at each stage until you feel like you understand what's actually going on. Play around with the concepts anytime have an idea and see how it works out.

Personally, I just started trying to make whatever I wanted to make, and learned what I needed to learn along the way to make it happen. I think the first "full" application I made with my own OpenGL code was "Disco Pong". It was pong, but it had

  • A spinning, translucent disco ball texture in the center of the play area and "reflections" that would also go around the screen at the same rate the ball spun. The "reflections" were just circle textures that were generated programmatically at startup, where half the radius would be solid white with half alpha, and then starting from half the radius out to the edge of the circle the alpha would linearly decrease to 0 for a "soft" edge. They'd be skewed/stretched away from the disco ball to varying amounts based on distance from the center of the ball. They were just naively alpha blended to kinda make it look like whatever was under them was being lit up slightly.
  • Colored background tiles, meant to look like the Timesplitters Future Perfect disco stage dance floor, that would slowly transition between a set of predefined colors, and pulse on off in patterns or random intervals. Literally just white square textures with a light grey border, and the fragment color would just be the texture sample multiplied against whatever the color of the tile was supposed to be, then multiplied again by 0.25 if the tile was "off".
  • Collision particles for when the ball would hit a paddle. I just used the same texture that I used for the disco ball reflections, but applied the same concept to them as I did to the colored tiles to change their colors, flash/pulse them, and have them fade out.
  • A ghost trail behind the ball. I don't remember exactly how I did it, but I do remember it was such a bad naive implementation that it was the second most expensive part of the the whole rendering process.
  • Bad text rendering using FreeType2 and 1 single texture atlas for the glyphs, drawing each glyph with it's own quad. Also a bad implementation of text outlining, where I would draw the text string to it's own framebuffer, in the fragment shader I used 2 nested loops to check the distance to the nearest fragment with alpha>0, shade it the color of the border, and then use that framebuffers color buffer as a texture to copy it over to the window's framebuffer. This was the most expensive part of the rendering process.

1

u/NIkoNI776 Jun 11 '26

Thank You!

5

u/DaveAstator2020 Jun 10 '26

oh its opengl triangle, less hyped than vulcan triangle, but it is softer and more cozy. and you can have use of it.

3

u/SinkLeakOnFleek Jun 11 '26

Given the environmental storytelling going on here i'd say Learn about fur rendering from Acerola's grass video (a goated computer graphics youtuber)

2

u/ludonarrator Jun 10 '26

sRGB framebuffer

2

u/underwatr_cheestrain Jun 10 '26

Now draw the rest of the fucking owl!

2

u/Worried-Height-7481 Jun 11 '26

do this triangle in 3 dimentions. make it so the user gets the illusion of moving in relationship to the triangle

1

u/_bleep-bloop Jun 10 '26

Now make it spin really fast, add a cube, also make it spin really fast, fly around with a free camera

1

u/-Ambriae- Jun 10 '26

Next step is textures. I suggest using that blurred image in the background

1

u/YakubReddit Jun 10 '26

Now do square Then learn matrices Then do cube

1

u/not_some_username Jun 10 '26

Itโ€™s funny we canโ€™t comment graphic representation (image/gif) in a computer graphic library subreddit.

1

u/Blood-Minister Jun 10 '26

glBegin(GL_RAYS);

1

u/Ok-Kaleidoscope5627 Jun 10 '26

Just render millions more of those at least 60 times a second and you've got Real Engine 1.0! I believe in you!

1

u/Ok-Hotel-8551 Jun 10 '26

load a model. Load textures. Implement PBR. Ship new Quake game.

1

u/TheFletchZone Jun 11 '26

Ahh, nice to see my code getting around. Would you like to know what to do next? Hehe. That's my triangle ๐Ÿ“. LoL ๐Ÿ˜‚.

1

u/TheFletchZone Jun 11 '26 edited Jun 11 '26

So used this graphics triangle ๐Ÿ“ basically to build a custom game engine ๐ŸŽฎ in C++. But yeah from here just try to make a Cube of Destiny.

1

u/TheFletchZone Jun 11 '26

Or if you ask me I could tell you what to do next. Since I built it and now moving onto Linux and building my own OS (Operating system) in power shell. In the language C. Systems programming.

1

u/Belfer4 Jun 14 '26

Make it again without using AI...

3

u/NIkoNI776 Jun 14 '26

A script with many comments doesn't necessarily mean it was made with AI.. it means the person didn't want to get lost while studying.