Device context vs render context?

Can you explain to me, the difference between a device context (i.e HDC) vs a render context (i.e HRC). It is my understanding that a device context is a storage unit used to store painting information, that Windows then passes to the graphics card. Is that correct? (If so, where does the render context play into the equation?)
You have a good understanding about the device context. I don't know anything about the render context. Searching the web about them I found http://msdn.microsoft.com/en-us/library/dd374397(VS.85).aspx , which is a code sample. If you look closely it has to do with OpenGL and it seems to be considered legacy by Microsoft.

Maybe a game programmer should be best qualified to answer your particular question.
A Handle to a Device Context (HDC) is a type definition of a void pointer that represents a point in memory that is normally reserved for the kernal. These are meant to be reference points to communicate with the kernal what point in memory you are manipulating without the need to give the programmer direct access to the memory on the device, in this case the memory reserved for your video card.

A Rendering Context (RC) is an object, usually a struct, and is meant to be treated as such. They have Data Members, Member Functions, can use inheritence etc. etc. For example, the RC for SDL is SDL_Surface, the RCs for SFML are sf::RenderWindow and sf::Window. These are translated by their respecitive libraries into code that is usable by the host OS when you compile your application and they may or may not actually exist as contigeous points in memory once your binary is created.

I hope this is a good explination, I had more typed out but I pressed the backspace key outside of the text box and lost it all. So if you need anything cleared up please ask. Also, if I misrepresented something in my haste to retype all of this someone please do call me out on it.
Topic archived. No new replies allowed.