building a graphics engine

i want to build a graphics engine but i cant find anything whatsoever about how to communicate with the graphics card
could somebody give me some links to online information on the subject
From your previous posts it looks like you are seriously not up to this task. Why not do some more simple things first?
i catch on quick and have tons of time to spend
i am certain that i can manage
which previous post anyways?
Last edited on
closed account (9wqjE3v7)
It depends what you interpret as a 'graphics engine'. To communicate with the graphics card you would need to use an API (Application Programming Interface) which makes calls to video card drivers. Such examples of prominent APIs are DirectX and OpenGL. Look into these and work your way from there if you are up for this task.

EDIT: Also, if you are asking how to make one, chances are you might not be capable of producing one at this moment in time.
Last edited on
id like to learn how to communicate with the graphics card without using existing APIs
and im willing to spend a few hundred hours doing so
closed account (N36fSL3A)
Well you're going to end up spending thousands of hours if you decide not to use DirectX/OpenGL. Not to mention that your engine is going to be primitive and not cross-platform.
closed account (Dy7SLyTq)
id like to learn how to communicate with the graphics card without using existing APIs

not possible. c++ is very powerful but you cant write functions to interface with hardware at that level (maybe at all) you would have to use assembly to do it. i would recommend finding an api for interfacing with a graphics card and then building an api on top of it. if you want to build something like unity then i would recommend using opengl to build interfaces
closed account (N36fSL3A)
Well basically what DTS said is right. You can attempt to, however you'll have to reprogram that API for every GPU you plan on supporting.

You can use assembler in C++ with :

1
2
3
asm{

}
closed account (Dy7SLyTq)
you can do that, but i would just write .asm files and compile with the c/c++ source. i dont know if there is a difference, it just makes more sense in my mind but i could be wrong.
closed account (N36fSL3A)
I didn't know you could do that. Wow.
closed account (Dy7SLyTq)
neither did i untill a while ago actually. i first learned the way you suggested from space worm (god i miss that guy. he was doing the same kind of stuff i want to do now) but now i learned from here http://www.drpaulcarter.com/pcasm/ how to assemble .asm files and then compile them with c/c++ object files
closed account (9wqjE3v7)
Writing a kernel mode driver (what you would like to do) would require you to study in depth the architecture of your particular graphics controller, its ports and I/O interfacing, detailed knowledge on how your operating system operates at a very low level and many other things. Even then your driver would be very inflexible, since it would only know how to work with one particular controller architecture. Even writing a driver for early vga hardware is no trivial task.

@Lumpkin Referring to your 2nd last post, it is not as simple as just using inline assembly. Being in a high security ring, such I/O specific instructions are restricted.

@DTSCode device driver programming, both kernel mode and user mode, is achievable with C++ - http://msdn.microsoft.com/en-us/library/windows/hardware/ff557573(v=vs.85).aspx
Last edited on
Topic archived. No new replies allowed.