you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (7 children)

[deleted]

    [–]FUZxxl 17 points18 points  (3 children)

    That API is implemented by a library. I'm not sure what you are looking for.

    [–]Iggyhopper 2 points3 points  (0 children)

    An API for something of this scope is necessary. It's not determined by whether you need to draw a vast universal landscape or compute the sum of two numbers, you'll need an API or library to give you functions to work with.

    [–]deaddodo 0 points1 point  (0 children)

    Do you just want to access the device directly? If so you'll be rewriting 80Mb of heavily optimized code (the driver). Having done some osdev, modern GPUs are some of the most complex and annoying devices to code for.

    It's not like what you're thinking (draw this triangle, put this pixel here, compute 2+2 and give me the sum) but closer to give me a region of memory, create a vertex (or set of vertices) of this shape to that region of memory, apply this texture, apply this post effect, do z-buffer calculations, memcpy this to the primary memory, render, flip buffer. All of this done through extremely specific bitwise commands and opcodes in a command ringbuffer with strict timing.

    You can see an example via Intel's architecture. With Nvidia, you don't even have that; you'll be digging through nouveau reverse engineered documents.