Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: OpenGL and DDB ?????

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2002
    Posts
    3

    OpenGL and DDB ?????

    how can I draw Opengl to DDB Bitmap in windows API?
    i try like this:

    hdc = GetDC(hWnd);
    GlPlane.hdcMem = CreateCompatibleDC(hdc);
    GlPlane.hBitmap = CreateCompatibleBitmap(hdc,cxClient,cyClient);
    SelectObject(GlPlane.hdcMem,GlPlane.hBitmap);
    hrc = wglCreateContext(GlPlane.hdcMem);
    wglMakeCurrent(GlPlane.hdcMem,hrc);
    ReleaseDC(hWnd,hdc);

    it doesn't work
    but what is wrong?????

  2. #2
    Junior Member Newbie
    Join Date
    Dec 2001
    Posts
    16

    Re: OpenGL and DDB ?????

    Hi,
    Use CreateDIBSection and use compatable DC with 0.

    DPS

    [This message has been edited by dpsv (edited 01-20-2002).]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •