   Using game library: hack to draw lines?
  Hello.  I'm working on a project using a library which manages the Win32 window, OpenGL, and other items.  I can add update functions to game entities, and have initialization functions, but that's all.  I need to figure out how to draw a line to the screen, but the library does not have a line drawing function built in.  I have access to header files, so I can get access to the window's HDC.  I've attempted to draw a line using GDI MoveToEx and LineTo, but the project is double buffered, and mad flickering occurs (drawing to the window DC, not the back buffer).  I've spent some time trying to locate the back buffer in memory, but havn't had any luck with that.  I know the project uses OpenGL and calls Begin and End, but I havn't used OpenGL much before.  I've only had a couple other ideas, but they didn't work very well.  Does anyone have any ideas that might work?  Thanks for your time!   
  Chances are you can't use glVertex3f, et al, safely and robustly unless the library is a very, very thin layer around OpenGL (you'll need to glBegin(GL_LINES) yourself, which you can't do within another glBegin() "block"). Finding the right spot might be tricky.A much better method would be to leverage the library's existing support for rendering: surely it exposes some kind of geometry representation ("model") class that you could manually put line vertices and render like any other model? Using the tools the library provides will always be a better solution than trying to second-guess the library and hack around it. What's the library?   ;  The library isn't available to the public.  It's a ray-cast engine essentially, so I think it may be leveraging OpenGL strictly for drawing scaled sprites?  Or maybe just to provide the buffering support?  There's some OpenGL stuff in the texture (GLuint.. a texture ID index?)  I only know how to add code in the Update functions and in the initialization functions.  I could make another thread though I guess :P  If I were to start another Begin/End render block, wouldn't that cause flickering?  I'm assuming End copies the backbuffer to the screen.  I was hacking around in the memory of the program, and found a location which contained the entire screen data (not just the game window).  I was able to write to this memory, but it was the actual screen and not the back buffer, so the flickering issue remained..  I'm hoping the back buffer might be in memory somewhere, but I havn't found it yet.  Anyway, thanks for the reply!   