Jump to content

With the recent buzz with low-level graphics APIs, like Metal, Mantle, DirectX12, and Vulkan, I was wondering what was it that made these APIs "low-level." And what I found was that pointers are the key to coding low-level access t hardware. Is that correct? If so, then how would you take advantage of that if you are using a programming language that doesn't have pointers, like Java or Swift?

Link to comment
https://linustechtips.com/topic/506932-low-level-programming-outside-of-c/
Share on other sites

Link to post
Share on other sites

Java isn't a low level language, so.... 

PSU Tier List | CoC

Gaming Build | FreeNAS Server

Spoiler

i5-4690k || Seidon 240m || GTX780 ACX || MSI Z97s SLI Plus || 8GB 2400mhz || 250GB 840 Evo || 1TB WD Blue || H440 (Black/Blue) || Windows 10 Pro || Dell P2414H & BenQ XL2411Z || Ducky Shine Mini || Logitech G502 Proteus Core

Spoiler

FreeNAS 9.3 - Stable || Xeon E3 1230v2 || Supermicro X9SCM-F || 32GB Crucial ECC DDR3 || 3x4TB WD Red (JBOD) || SYBA SI-PEX40064 sata controller || Corsair CX500m || NZXT Source 210.

Link to post
Share on other sites

java wasnt made to be low-level. quite the oposite actually.

 

java was designed to have applications run in a semi-shielded enviroment to avoid applications (accidentially) tap into memory outside their own pool, to avoid system-crippling memory leaks, and some other stuff.

 

if you want to program low level, pick a language designed to do so.

Link to post
Share on other sites

It isn't the language that makes those API's low level, its the fact that there is much less abstraction by the runtime to the hardware. The graphics programmer has to do a lot more work to perform tasks but there is a lot less overhead.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to post
Share on other sites

With the recent buzz with low-level graphics APIs, like Metal, Mantle, DirectX12, and Vulkan, I was wondering what was it that made these APIs "low-level." And what I found was that pointers are the key to coding low-level access t hardware. Is that correct? If so, then how would you take advantage of that if you are using a programming language that doesn't have pointers, like Java or Swift?

C and C++ are the major low level languages in use right now, and there's assembly of course.

CPU: AMD FX-6300 4GHz @ 1.3 volts | CPU Cooler: Cooler Master Hyper 212 EVO | RAM: 8GB DDR3

Motherboard: Gigabyte 970A-DS3P | GPU: EVGA GTX 960 SSC | SSD: 250GB Samsung 850 EVO

HDD: 1TB WD Caviar Green | Case: Fractal Design Core 2500 | OS: Windows 10 Home

Link to post
Share on other sites

C and C++ are the major low level languages in use right now, and there's assembly of course.

dat guy is silly u got to use c--

My Cheap But Good Rig: I7-3770s, Intel Motherboard (actually made by intel), 16gb DDR3, Nvidia Gtx 1070, 250gb Samsung 850 EVO SSD, 750gb HDD, Evga 500 BR power supply

Link to post
Share on other sites

dat guy is silly u got to use c--

Go home ur drunk

CPU: AMD FX-6300 4GHz @ 1.3 volts | CPU Cooler: Cooler Master Hyper 212 EVO | RAM: 8GB DDR3

Motherboard: Gigabyte 970A-DS3P | GPU: EVGA GTX 960 SSC | SSD: 250GB Samsung 850 EVO

HDD: 1TB WD Caviar Green | Case: Fractal Design Core 2500 | OS: Windows 10 Home

Link to post
Share on other sites

Go home ur drunk

only on tuesday i am perfectly sober c-- is da way go m8

My Cheap But Good Rig: I7-3770s, Intel Motherboard (actually made by intel), 16gb DDR3, Nvidia Gtx 1070, 250gb Samsung 850 EVO SSD, 750gb HDD, Evga 500 BR power supply

Link to post
Share on other sites

When you're using a language that isn't up to the performance that's needed for a specific task, often that part of the application is written in another language that can handle it. For example, here is some discussion on the topic in regards to Python.

Link to post
Share on other sites

  • 3 weeks later...

Still, I noticed that in the Apple WWDC 2015 event, the presentation noted that Swift 2 has "C Pointer APIs." What does that mean and how did they do that in a language that doesn't have pointers?

Swift does have pointers. https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html

1474412270.2748842

Link to post
Share on other sites

Pointers is not what makes a language 'low-level'. (It's actually funny how modern C++ tries to avoid pointers as much as possible.)
Going lower level simply means less stuff is abstracted away.
The main reason languages like python, javascript and a whole bunch are considered high level is because a lot is abstracted away. Like pointers, functors, virtual function tables, manual memory management, etc, etc.
Languages like C and C++ do give you control over these, which makes them considered more low level.

Now about the graphics API's. What they have basically done, is they took a whole bunch of abstractions out to give more control to the programmer. There is a term called developer to triangle time, which means the time a dev has to spent to get a triangle on the screen with a reasonable system. For DX11 and OpenGL it was about 1 to 2 days, for Vulkan and DX12 is about 2 weeks. Yes 2 weeks. You get all the control they can give you. This means that it is a lot more work to do things, but they can be made a lot more efficient.

 

I hope this helps. If you have more questions, let me know!

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×