![]() |
|
Hardware Access through C++ - Printable Version +- Sinisterly (https://sinister.ly) +-- Forum: Coding (https://sinister.ly/Forum-Coding) +--- Forum: C, C++, & Obj-C (https://sinister.ly/Forum-C-C-Obj-C) +--- Thread: Hardware Access through C++ (/Thread-Hardware-Access-through-C) |
Hardware Access through C++ - Hazique35 - 03-31-2013 Ok, Ive looked around for quite a long time about this but I found some stuff that vaguely talks about it, but not in the amount of detail that I needed. The main one that I found was using the #define method (or something like that.) The probllem is, none of the articles specified whether these adrreses would stay constant for each computer, or it would change according to the computer. So for example, how could I access the graphics card of my computer through some C++ code? I mainly wanted to know about this because I wanted to create a game engine, but it seems so other possabilities are available through this... Anyway, I tried t explain this as best as I could, so could someone explain this to me? thanks sorry, I forgot to say that I use a windows 7 laptop. Hardware Access through C++ - Hazique35 - 03-31-2013 Ok, Ive looked around for quite a long time about this but I found some stuff that vaguely talks about it, but not in the amount of detail that I needed. The main one that I found was using the #define method (or something like that.) The probllem is, none of the articles specified whether these adrreses would stay constant for each computer, or it would change according to the computer. So for example, how could I access the graphics card of my computer through some C++ code? I mainly wanted to know about this because I wanted to create a game engine, but it seems so other possabilities are available through this... Anyway, I tried t explain this as best as I could, so could someone explain this to me? thanks sorry, I forgot to say that I use a windows 7 laptop. RE: Hardware Access through C++ - Deque - 03-31-2013 Your graphic card can only be accessed via libraries of the operating system. I.e. DirectX is such an API specified by Microsoft that you can use for video tasks. You might consider using OpenGL for your game engine: http://www.glprogramming.com/red/ I don't know what you mean with #define. That's just a preprocessor statement and has nothing to do with graphic card access. RE: Hardware Access through C++ - Deque - 03-31-2013 Your graphic card can only be accessed via libraries of the operating system. I.e. DirectX is such an API specified by Microsoft that you can use for video tasks. You might consider using OpenGL for your game engine: http://www.glprogramming.com/red/ I don't know what you mean with #define. That's just a preprocessor statement and has nothing to do with graphic card access. RE: Hardware Access through C++ - Hazique35 - 03-31-2013 weird, this link has a whole bunch of #defines in it: www.strongenging.com/papers/HardwareAccessinC.pdf Maybe this is the wrong thing. So, this isnt possible with C++? RE: Hardware Access through C++ - Hazique35 - 03-31-2013 weird, this link has a whole bunch of #defines in it: www.strongenging.com/papers/HardwareAccessinC.pdf Maybe this is the wrong thing. So, this isnt possible with C++? RE: Hardware Access through C++ - Deque - 03-31-2013 What isn't possible? Why is that weird? #define just tells the preprocessor to replace every occurance of the first string with the second. Not more, not less. It is nothing specific to hardware access. RE: Hardware Access through C++ - Deque - 03-31-2013 What isn't possible? Why is that weird? #define just tells the preprocessor to replace every occurance of the first string with the second. Not more, not less. It is nothing specific to hardware access. RE: Hardware Access through C++ - Hazique35 - 04-01-2013 ok, thanks. |