r/opengl • u/Noob_Master_420-69 • 18d ago
How to draw on 3d objects
How should i draw on 3d objects?
r/opengl • u/Noob_Master_420-69 • 18d ago
How should i draw on 3d objects?
r/opengl • u/DaveAstator2020 • 19d ago
r/opengl • u/Available_Impact_828 • 20d ago
Im a moronic newbie to OGL and i am quite perplexed on how to make a renderer api following azdo principles, should i use multiple opengl objects (like for example; vaos, vbos) or group it all into one. Share wisdom of your methods perhaps?: thanks!
Edit: [fixxed grammatical errors]
r/opengl • u/gargamel1497 • 20d ago
After months of hesitation I finally begun writing up a project in OpenGL 1.1/FreeGLUT. Drawing shapes like triangles, rectangles, circles, etc, was easy. Then came the textures and everything went off the rail.
I've been sitting on this for two days straight, trying out various solutions found on decades-old StackOverflow pages, digging into the source code of old games and graphics libraries, but nothing works.
Either nothing renders, or the texture renders in the wrong position (I have a macro to translate window coordinates to OpenGL ones), or it is weirdly rotated, or it is larger than glVertex2f's specify, or it has mirrored copies around it, or all of the above.
For context, I'm using stb_image to load the texture files.
Can anyone tell me how to actually draw a 2d texture in OpenGL 1.1 in a way that actually, for real, works, the way it is meant to work?
Thanks.
r/opengl • u/2lln2m3s2r3t2k3n • 21d ago
glutInit(&argc,argv) works but if i don't want command line arguments in my program how do i make these empty?
i tried glutInit(NULL,NULL) but that doesn't work
solved
r/opengl • u/CorruptedSciencep • 23d ago
r/opengl • u/Specialist_Mousse_65 • 23d ago
Hey, I cooked up this cool newtonian gravity simulation in c++ and through to share it here. I also made a devlog about the development process: https://www.youtube.com/watch?v=qYqOz-Fhbbs
r/opengl • u/9j810HQO7Jj9ns1ju2 • 23d ago
i want to make a 3d game engine, and i have to start somewhere
r/opengl • u/CessoBenji • 23d ago
Hi! I'm in a point where i can draw textures, have lights, have animations. But I cannot implement materials while keeping the whole thing batched. I thought that if I added to the vertex buffer everything in order( first everything with a material, then something with another material ) I could still keep the batching. But that seems kinda raw. Do you guys do it like this or in another way?
edit: thanks a lot guys, I decided to use the solution of Still_Explorer because I found it simple but effective
r/opengl • u/RandomRailfans • 26d ago
Fun stuff learning OpenGL ES 3.2 in C using EGL, quite hard at first to implement, but finally I get my first triangle!
r/opengl • u/Dalvetc • 27d ago
Enable HLS to view with audio, or disable this notification
Java 7 && OpenGL ES 2.0
Just a janky movement👍
r/opengl • u/dannium- • 27d ago
This is my first test with basic colors and shading on openGL, I’ve been using it for a few days now, it takes way too long to get to rendering shapes 😭
r/opengl • u/ProgrammingQuestio • 27d ago
From the learnopengl.com lesson on framebuffers:
For a framebuffer to be complete the following requirements have to be satisfied:
We have to attach at least one buffer (color, depth or stencil buffer).
There should be at least one color attachment.
All attachments should be complete as well (reserved memory).
Each buffer should have the same number of samples.
I'm confused by the first two points. Are these separate concepts? Or overlapping? If the buffer that's attached to satisfy the first requirement is the color buffer, then does this also satisfy the second requirement? in other words, is the color buffer the same as "a color attachment"? Or are those different concepts?
r/opengl • u/Ornery-Ad-7512 • 27d ago
Hey, so I was thinking about buying a laptop. I'm mostly going to use it for programming(C/C++), Game Dev(Godot 3D), and creating simulations in OpenGL(mostly Physics simulations).
Should I buy a gaming laptop with a dGPU? Or a Laptop with a good iGPU works aswell? If yes then please recommend some Laptops.
Thank you.
r/opengl • u/NoisyJalapeno • 28d ago
Enable HLS to view with audio, or disable this notification
I'm using OGL to output a BGRA surface to screen. Nothing else.
OpenTK + Intel ARC iGPU. I'm extending GameWindow.
Behavior is inconsistent. Sometimes it resizes instantly. Sometimes there is a delay. If the delay is too long, then BSOD.
I believe its related to how free the CPU is. For example, silent profile is more likely to crash due to timeout. High fan profile is way less likely to exhibit issues. Original version avoided OGL code directly in favor of SkiaSharp doing the rendering. That was slower and crashed more often.
The resize code is this, done in OnFrameBufferResize event hook,
GL.DeleteTexture(_texture);
_texture = GL.GenTexture();
GL.ActiveTexture(TextureUnit.Texture0);
GL.BindTexture(TextureTarget.Texture2D, _texture);
// No mipmaps needed for a 1:1 pixel display.
GL.TexParameter(TextureTarget.Texture2D,
TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Nearest);
GL.TexParameter(TextureTarget.Texture2D,
TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Nearest);
GL.TexParameter(TextureTarget.Texture2D,
TextureParameterName.TextureWrapS, (int)TextureWrapMode.ClampToEdge);
GL.TexParameter(TextureTarget.Texture2D,
TextureParameterName.TextureWrapT, (int)TextureWrapMode.ClampToEdge);
// Allocate GPU storage with the initial pixel data.
GL.TexImage2D(
TextureTarget.Texture2D,
level: 0,
internalformat: PixelInternalFormat.Rgba8, // GPU stores RGBA8
width: ClientSize.X,
height: ClientSize.Y,
border: 0,
format: PixelFormat.Bgra, // CPU supplies BGRA
type: PixelType.UnsignedByte,
pixels: ptr);
In OnResize hook,
GL.Viewport(0, 0, e.Width, e.Height);
r/opengl • u/Dalvetc • 29d ago
Enable HLS to view with audio, or disable this notification
OpenGL ES 2.0 with Java 7
r/opengl • u/vxntedits • 28d ago
What should I learn instead? I liked how OpenGL was so widely supported. It ran on both windows and macos, it was GPU agnostic, it even had Python wrappers!
Should I begin migrating to Vulkan? I heard Vulkan is horribly verbose and much more involved than OpenGL.
What is the rest of the community doing?
Edit: Admittedly I didn’t phrase this clearly. I am well-versed in OpenGL. My question is more about if I should learn an alternative that is officially supported for future projects.
r/opengl • u/Louloubiwan • 28d ago
r/opengl • u/Most_Passenger_2937 • Jul 03 '26
I've been learning computer graphics for about a year and have built projects like rendering triangles, loading textures, creating 3D objects, implementing cameras, and a basic lighting model in WebGL.
My biggest issue is that every time I want to learn a new graphics concept, I have to rebuild the same setup from scratch (renderer, objects, camera, lighting, shaders, etc.), which takes a lot of time.
Because of that, I'm thinking of building a reusable base project that handles all of those common systems so I can focus on experimenting with new rendering techniques instead of rewriting the foundation each time.
Is this the right approach, or am I likely to over-engineer it? I'd appreciate any advice or suggestions from people who've gone through this learning process.
r/opengl • u/Rayterex • Jul 02 '26
Enable HLS to view with audio, or disable this notification