Hot answers tagged

58

I haven't been able to find such a chart on the web, so I made one here. (Everyone, feel free to add, elaborate, or correct any mistakes. Some of these are just best guesses based on a partial understanding of the API and hardware internals.) API Basics D3D11 OpenGL 4.x ----- ---------- device ...


46

If you're getting started now, and you want to do GPU work (as opposed to always using a game engine such as Unity), you should definitely start by learning Vulkan. Maybe you should learn GL later too, but there are a couple of reasons to think Vulkan-first. GL and GLES were designed many years ago, when GPUs worked quite differently. (The most obvious ...


37

Hardly! This seems a lot like asking "Should new programmers learn C++ instead of C," or "Should new artists be learning digital painting instead of physical painting." Especially because it's NOT backward compatible, graphics programmers would be foolish to exclude the most common graphics API in the industry, simply because there's a new one. ...


35

Learning graphics programming is about more than just learning APIs. It's about learning how graphics works. Vertex transformations, lighting models, shadow techniques, texture mapping, deferred rendering, and so forth. These have absolutely nothing to do with the API you use to implement them. So the question is this: do you want to learn how to use an API?...


33

Here's a non-exhaustive list of Vulkan and DirectX 12. This is cobbled together using criteria similar to that of Nathan's. Overall both APIs are surprisingly similar. Things like shader stages remain unchanged from DX11 and OpenGL. And obviously, DirectX uses views to make things visible to shaders. Vulkan also uses views, but they are less frequent. ...


9

We are currently in a transition of API paradigms. The old school method of binding buffers, uniforms, attribute, layout and programs as (implicit) global state and dispatching draws with that state is common across D3D11 and OpenGL. However it has a large amount of overhead (in verifying state and not knowing what the program wants to do until the last ...


9

I don't think it matters much, which API you want to use when leaning to "program graphics". The more important things to learn are the typical concepts you use when working with 3D scenes. For example you want to learn how to write a simple (and later more sophisticated) Scene Graph. These concepts are much more important than the specific API method names ...


7

The primary appeal of OpenGL (at least to me) is that it works on many platforms. Currently, Vulkan does not work on OSX, and Apple has a competing API called Metal. It's very possible that it will be some time before Apple supports Vulkan, and when they do, Vulkan support may only come to their latest hardware. OpenGL already supports most hardware, and ...


4

Also consider these alternatives for reducing bandwidth in comparison to R16G16B16A16. DXGI_FORMAT_BC6H_UF16 is block compressed fp16 (half) RGB. https://docs.microsoft.com/en-us/windows/desktop/direct3d11/bc6h-format DXGI_FORMAT_R11G11B10 unsigned small float https://bartwronski.com/2017/04/02/small-float-formats-r11g11b10f-precision/ Common image ...


3

It depends on what you want to do. If you want to learn graphics programming only for yourself, it really doesn't matter what you choose. If you are thinking about professional work I recommend Vulkan. It is closer to hardware and I think knowledge about what hardware do is important for graphics programmers. Vulkan is closer to hardware because OpenGL ...


3

I do not personally think it matters much. Just pick one that suits your project. I have used both D3D and OpenGL in the past. It is the concepts that matter. Whichever you grab, you need to understand (for example): What textures are and how they are used by GPU. Basic concepts of Graphics Development (Vertices, Primitives, Fragments, etc.) How does the ...


3

In general, using floating point textures will help preserve HDR values. They can be 16-bit or 32-bit floats for the color channels, usually. In OpenGL you could choose the type to be GL_FLOAT for 32-bits per channel or GL_HALF_FLOAT for 16-bits per channel. In my experience, for image processing, 16-bits is usually enough and is half as much data.


3

I would like to give you my graphics beginner perspective on the subject. What I realised (in many years working as an engineer in another field) is that the fundamental concepts are the most important part. Once you have a solid understanding of those, learning the last shiny new API is the least difficult part. I don't know if you are a young hobbiest ...


2

I've been "getting in to" graphics programming for a few months now. Right now I'm still in High School, and I can tell you I am almost always looking to develop cross platform applications. This is in fact my number one problem with Vulkan - It isn't developed to work on all platforms. I work with OpenGL in Java and have for over 6 months. Another problem ...


2

You don't. These objects typically work with CPU memory, not device memory. And to the extent that they involve device memory, such allocations tend to be rare and/or fixed in size (a queue may have a small spot of device memory that the hardware queue reads commands from or something, but even that is implementation-dependent). Vulkan allows you to give ...


1

What I mean by “state of graphics” is, how polygons, textures, lighting and any other scene elements are stored and computed for any particular frame. The closest to what you are asking and that I know of is RenderDoc. I have not tested it myself so far, but some features they list in their documentation that are related to your question are: Full graphics ...


1

Older Opengl Api documentation can be found at this Official Khronos Registry


1

Extensions can change the visible behavior of the implementation, not to mention the implementation of it. Consider KHR_external_semaphore and its various sub-extensions. If you don't specify them, then the VkDevice's implementation knows that you're not going to need to be able to turn a VkSemaphore into an externally-accessible mutex and back. So the ...


1

Ship your application with a benchmarking sequence testing the actual platform. (Possible answer for many questions I guess...) I suspect the performance is highly dependent on how you use the hardware. Since the hardware is unlikely to somehow instrument your application backwards, telling you what to do, I´d go with whatever looks good in your design. "...


Only top voted, non community-wiki answers of a minimum length are eligible