Click here to Skip to main content
15,920,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
My question is How to draw simple 3D geometry such as Sphere without using DirectX,OpenGL API or GPU Computational language such as Nvidia CUDA.I want to produce 3D geometry library using visual C/C++.

I know DirectX is the simplest and efficient way,but I want to understand how to access hardware level using my pure C/C++ program(software level) to draw 2D geometries with shaders on monitor using GPU to view such 2D geometry as three dimensional(3D) ones. I know what I am asking kind of odd and heavy but at least theoretical explanation stuff rolling with computer science plus mathematics.
Posted
Updated 3-Jun-14 18:12pm
v2
Comments
Sergey Alexandrovich Kryukov 4-Jun-14 0:01am    
Sorry, this is a kind of empty-minded question. Just think about it: what does it mean: draw a sphere? It really means drawing a circle and perhaps adding some shading to it. The complexity of shading could be anything from ray tracing with dissipation, very complex thing, to something very primitive. The tasks of development of 3D library could be so different that all your discussion simply lacks subject.

And of course, not Quick Answer can help you to write you own library. Just think at this notion "your own". What do you think it means?

—SA
Stefan_Lang 4-Jun-14 4:16am    
I agree with SA. If you skip the libs, you have to directly communicate to the drivers. I have no experience with graphics drivers, but I do know that different graphics cards use different drivers, and different drivers have different functionality, and the functionality may change with different versions, too. The complexity of the task you're asking about should become clearer if you consider the countless graphics bugs that many new PC games and other applications suffer from, before - or sometimes after - driver updates. It's doable, but it's anything but trivial, not even for professional teams of experienced programmers!

Anyway, this topic far exceeds the scope of this forum. You might at best ask for links to existing articles on the topic, but you better state what graphics card and driver you are planning to write your program for. And of course you could google this yourself.
Buddhi Chaturanga 4-Jun-14 4:44am    
@Stefan:
So then how particular DirectX API deals with various kind of GPUs these days-mainly nVidia and AMD/ATI graphic cards.Did Microsoft integrate all the functionality built in different Graphic cards from respective vendors?
Stefan_Lang 4-Jun-14 7:29am    
Essentially, yes. The Graphics card manufacturers like NVIDIA or AMD do their best to test their own driveres against the popular graphics libraries such as DirectX and OpenGL everytime they issue a new driver version; Microsoft and the OpenGL developers check and extend their libraries every time a driver with new functionality or different API turns up. That is why these popular libs rarely show graphics bugs, and why Games using these libs rarely have issues of that kind.

At the same time, games that use their own graphics engine such as the Unreal Engine do have to adapt to and maintain their interface to all kinds of graphics drivers. If they're popular enough, graphic card vendors may support them or provide adjustments to their own drivers to make these engines work better.
Buddhi Chaturanga 4-Jun-14 22:16pm    
@Stefan Lang->Thanks for the reply

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900