0

how are graphic's API's created such as DirectX and OpenGL. And is using GDI which is the graphic portion of the winapi, a graphic API itself? or are you able to create your own with C++ for 2D rendering instead of using anyone elses. Or does writing an API involve assembly.

3
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by Tigran
0

To my knowledge, both DirectX and OpenGL are written with C or C++. You could write an API like them yourself using C++. On Windows, you can use SetPixel() to set a pixel on a screen. I believe that's one of the most basic graphical functions you can use (in the Windows API). Then it's up to you to write bitmap loaders and the like.

0

so are directx and openGL just MASSIVELY modified versions of GDI with the winapi so that it can handle 3d rendering and all that good stuff.

0

I guess you could classify DirectX as that. OpenGL, on the other hand, is multi-platform, so it can't always be using the Windows API. I'm not sure how OpenGL handles being multi-platform. Perhaps the different versions of OpenGL for different platforms are coded slightly differently internally. I can't say for sure.

0

perhaps the drivers of graphics cards also used to know the right memory locations etc for directx and opengl...
at the end, GDI also has been made by man kind, so i think parts of some rlly low-level things are asm.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.