Results 1 to 3 of 3

Thread: How can I run OpenGL with Builder C++ ??

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000
    Posts
    7

    How can I run OpenGL with Builder C++ ??

    Help me???
    I want to know how can I run an OpenGL window from an application Win32 of Borland Builder C++
    Thanks
    Le Bayonnais

  2. #2
    Member Contributor
    Join Date
    Feb 2000
    Location
    Germany
    Posts
    87

    Re: How can I run OpenGL with Builder C++ ??

    1. Create a new form for displaying OpenGL output.
    2. Retrieve the HDC of that form by using
    HWND hwnd=FormX->Handle;
    HDC dc=GetDC(hwnd);
    3. Fill out a PIXELFORMATDESCRIPTOR-struct.
    4. int i=ChoosePixelFormat(dc,&pfd);
    5. SetPixelFormat(dc,i,&pfd);
    6. HGLRC glrc=wglCreateContext(dc);
    7. wglMakeCurrent(dc,glrc);
    Now you are ready to render your polygons...
    8. When terminating call the following
    functions to free the stuff you allocated
    earlier.
    wglDeleteContext(glrc);
    ReleaseDC(hwnd,dc);

    By the way: instead of using a form you may
    use ANY visible object that has an HWND Handle property.
    Hope it helped...


    [This message has been edited by Inquisitor (edited 02-24-2000).]

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2000
    Location
    Santa Cruz, CA
    Posts
    13

    Re: How can I run OpenGL with Builder C++ ??

    This tutorial on the Borland Community site explains how to set up OpenGL drawing on a VCL form. http://community.borland.com/article...,10528,00.html

Similar Threads

  1. C++ Builder and OpenGL
    By soconne in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 08-18-2003, 07:28 AM
  2. OpenGL + Builder C++ 6.0
    By Orzech in forum OpenGL: Basic Coding
    Replies: 21
    Last Post: 08-08-2003, 12:01 PM
  3. opengl in C++builder
    By in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 05-07-2003, 12:18 AM
  4. OpenGL, and C++ Builder 4.0
    By in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 10-13-2001, 02:53 AM
  5. OpenGL with c++ Builder
    By BuildaMan in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-25-2000, 02:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean