Live data from Hacker News

Conformant OpenGL 4.6 on the M1

rosenzweig.io

101–110 of 118 posts

Re: Conformant OpenGL 4.6 on the M1

#101
post #78

Earlier quoted context omitted.

Microsoft never owned the 3D gaming API space, SEGA, Sony and Nintendo also have/had their own APIs.

And yet the modern GPU features are pretty much the result of a close symbiosis between hardware vendors and the Direct3D team. For a while, GPUs were categorized by the D3D version they supported (today the focus has moved more towards raw compute performance I guess).

In the PC yes, many of those features were originally developed on arcades and game consoles.

TMS34010 (1986), Renderman Shading Language(1990), Cell (2005),...

Re: Conformant OpenGL 4.6 on the M1

#102
post #87

Earlier quoted context omitted.

I never heard about 3D gaming API space being something PC only, maybe in some fancy FOSS circles.

You're having a different discussion than everybody else. Everybody else is this discussion is talking about the PC 3D API space. The place where OpenGL lives. It's right there in the title of the linked article.

"Without Quake, OpenGL would have remained an extremely niche thing for professional CAD and modeling software. And Microsoft would have completely owned the 3D gaming API space."

Ctrl+F "PC" => zero results found.

Re: Conformant OpenGL 4.6 on the M1

#103
post #92
post #58

Earlier quoted context omitted.

> I've read that generally opengl is just easier to use than vulkan [here's]( https://learnopengl.com/code_viewer_gh.php?code=src/1.gettin... ) an opengl triangle rendering example code (~200 LOC) [here's]( https://vulkan-tutorial.com/code/17_swap_chain_recreation.cp... ) a vulkan triangle rendering example code (~1000 LOC) ye it's fair to say opengl is a bit easier to use ijbol

Drawing conclusions from a hello world example is not representative of which API is "easier". You are also using lines of code as measure of "ease" where it's a measure of "verbosity". Further, the OpenGL example is not following modern graphics best practices and relies on defaults from OpenGL which cuts down the lines of code but is not practical in real applications. Getting Vulkan initialized is a bit of a chore…

I also am a graphics programmer and lead Vulkan developer at our company. I love Vulkan. I wouldn’t touch OpenGL with a 10 foot pole. But I also have years of domain expertise and OpenGL is hands down the better beginner choice.

The Vulkan hello triangle is terrible, it’s not at all production level code. Yeah, neither is the OpenGL one, but that’s much closer. Getting Vulkan right requires quite a bit of understanding of the underlying hardware. There’s very little to no hand holding, even with the validation layers in place it’s easy to screw up barriers, resource transitions and memory management.

Vulkan is fantastic for people with experience and a good grasp of the underlying concepts, like you and me. It’s awful for beginners who are new to graphics programmers.

Re: Conformant OpenGL 4.6 on the M1

#104
post #92

Earlier quoted context omitted.

Drawing conclusions from a hello world example is not representative of which API is "easier". You are also using lines of code as measure of "ease" where it's a measure of "verbosity". Further, the OpenGL example is not following modern graphics best practices and relies on defaults from OpenGL which cuts down the lines of code but is not practical in real applications. Getting Vulkan initialized is a bit of a chore…

I also am a graphics programmer and lead Vulkan developer at our company. I love Vulkan. I wouldn’t touch OpenGL with a 10 foot pole. But I also have years of domain expertise and OpenGL is hands down the better beginner choice. The Vulkan hello triangle is terrible, it’s not at all production level code. Yeah, neither is the OpenGL one, but that’s much closer. Getting Vulkan right requires quite a bit of understandi…

I've used OpenGL for over 20 years and Vulkan since it came out. Neither of them is easy, but OpenGL's complexity and awkward stateful programming model is quite horrific.

I've also watched and helped beginners struggling with both APIs on many internet forums over the years, and while getting that first triangle is easier in OpenGL, the curve gets a lot steeper right after that. Things like managing vertex array objects (VAO) and framebuffer objects (FBO) can be really confusing and they are kind of retrofitted to the API in the first place.

I actually think that beginners shouldn't be using either of them and understand the basics of 3d graphics in a friendlier environment like Godot or Unity or something.

Vulkan 1.3 makes graphics programming fun again. Now you don't need to build render passes and pipeline states up front, it's really easy to just set the pipeline states ad-hoc and fire off your draw calls.

But yeah, judging by the downvotes my GP comment is receiving, seems like a lot of readers disagree. I'm not sure how many of them have actually used both APIs beyond beginner level, but I don't know anyone who has used both professionally and wants to go back to OpenGL with its awkward API and GLSL compiler bugs and whatnot.

Re: Conformant OpenGL 4.6 on the M1

#105
post #49

Earlier quoted context omitted.

> Looks like apple silicon are currently the best hardware for running linux I wonder if this effort to run Linux on apple silicon will continue if snapdragon X laptops become mainstream.

I think it will. One of the main issues with desktop linux is still broad hardware support. Random crap like fingerprint readers or Wi-Fi cards still don't work on certain machines. By having a very constrained set of hardware options, it makes it a lot easier to support. The snapdragon devices are also starting way behind.. both the Surface X and Lenovo X13S snapdragon devices exist today but Linux support isn't clo…

> the Surface X and Lenovo X13S snapdragon devices exist today but Linux support isn't close to Asahi.

Is that necessarily true? When the X13S Snapdragon released I seem to remember it shipping with first-party Linux drivers for almost everything. Same goes for the Surface X actually.

Now, both of those devices definitely don't get the same attention Macs do, but they did ship day-and-date with decent Linux support. For example, the Adreno GPU that Qualcomm uses has upstream Mesa support for Vulkan and OpenGL. In many senses, Asahi isn't close to the vendor support those devices recieved.

Re: Conformant OpenGL 4.6 on the M1

#106
post #102

Earlier quoted context omitted.

You're having a different discussion than everybody else. Everybody else is this discussion is talking about the PC 3D API space. The place where OpenGL lives. It's right there in the title of the linked article.

"Without Quake, OpenGL would have remained an extremely niche thing for professional CAD and modeling software. And Microsoft would have completely owned the 3D gaming API space." Ctrl+F "PC" => zero results found.

Context matters. The context of the entire post is PC graphics APIs.

Re: Conformant OpenGL 4.6 on the M1

#107
post #104

Earlier quoted context omitted.

I also am a graphics programmer and lead Vulkan developer at our company. I love Vulkan. I wouldn’t touch OpenGL with a 10 foot pole. But I also have years of domain expertise and OpenGL is hands down the better beginner choice. The Vulkan hello triangle is terrible, it’s not at all production level code. Yeah, neither is the OpenGL one, but that’s much closer. Getting Vulkan right requires quite a bit of understandi…

I've used OpenGL for over 20 years and Vulkan since it came out. Neither of them is easy, but OpenGL's complexity and awkward stateful programming model is quite horrific. I've also watched and helped beginners struggling with both APIs on many internet forums over the years, and while getting that first triangle is easier in OpenGL, the curve gets a lot steeper right after that. Things like managing vertex array obj…

I'm mostly with you, and for the record have both used OpenGL and Vulkan professionally in shipped titles. I personally have no interest in going back to OpenGL.

But I think the disconnect is that neither you nor me have any reason to fear Vulkan. I love how explicit Vulkan is and that the spec is in such depth, the only thing that comes close imho are the proprietary console APIs. I've also worked with Metal and DirectX and the documentation for those is just bad, you kinda have to know what you are doing already to understand the scraps of information you get and reason about the unspoken implementation details.

That all being said though, the Vulkan spec and setup is just daunting for a beginner. And yeah, you can take a lot of shortcuts like not pre-building your PSOs or being lax with your barriers and memory handling. But I feel like you might as well just not use Vulkan in that case since you are throwing away some of its biggest advantages. Just AZDO it up and take advantage of the IHVs having spent decades beating on their OpenGL implementation (as long as we don't count the red team). A lot of Vulkan is just boilerplate and easy to-do and abstract away, but doing Vulkan right, that's the hard part in my opinion.

Not to mention that it's really easy to build insidious gotchas into your code that are really hard to spot. Nvidia famously just doesn't care about image layouts, so if you just develop on Nvidia hardware it can be pretty easy to write code runs as if it was correct, but will explode on hardware that does care about image layouts. I have a drawer full of GPUs from different IHVs and generations just for day to day development. That's a really high barrier to entry.

Re: Conformant OpenGL 4.6 on the M1

#108
post #68
post #6

Earlier quoted context omitted.

Same, I wish I knew more about graphics programming. It seems like such a steep learning curve though so I get discouraged.

Don't be discouraged, modern graphics APIs really are a mess, but you don't need to understand 1/100th of them to get graphics going. Also, this post is more about programming drivers than programming graphics.

Any suggestions on where to start?

Re: Conformant OpenGL 4.6 on the M1

#109
post #91

This is for Fedora on the M1. It would be amazing to get this for macOS. What's involved in pulling something like that off?

You can implement an OpenGL driver on top of Metal. But why bother dedicating so many resources for the sake of a suboptimal legacy API?

Because it's a cross-platform framework that thousands of programs (including Mac exclusives) rely on? There's so much OpenGL-only software that it should be Apple's moral imperative to support it anyways. I don't think anyone can honestly say that the graphics situation on Mac has improved in the absence of cross-platform APIs. Even Apple admits it with the Game Porting Toolkit.

Re: Conformant OpenGL 4.6 on the M1

#110
post #102

Earlier quoted context omitted.

You're having a different discussion than everybody else. Everybody else is this discussion is talking about the PC 3D API space. The place where OpenGL lives. It's right there in the title of the linked article.

"Without Quake, OpenGL would have remained an extremely niche thing for professional CAD and modeling software. And Microsoft would have completely owned the 3D gaming API space." Ctrl+F "PC" => zero results found.

In this thread we're talking about the impact of Quake's OpenGL support in the early days of the Quake franchise (1996-1999).

OpenGL was most definitely PC-only[1] during those days[2]. So to anybody who understands the subject matter... it's extremely obvious we're talking about PC graphics APIs.

I am sorry you don't know the subject matter or the history, but that is a poor excuse for attempting to "correct" people who do. Very rude.

---

[1] "PC" as in "personal computer", not "Windows PC". OpenGL has been supported on Windows, macOS, Linux, BSD, Solaris, etc.

[2] OpenGL basically is still PC-only, although since Linux supports it, it can run in a lot of places. PS3 and mobile devices had OpenGL ES, a different and more stripped down API)

Post reply on HN