VCL Component (TOpenGLAPPanel)

Fixes for typecasting error in Get3DTextSize, DrawText2D and DrawText3D.

Remember to change the range for FirstGlyph and NumGlyph to 0 and 255 to get the full range of characters.

Download TOpenGLAPPanel 1.2.0
(274.37 kB Downloaded 2261 times)
OpenGL VCL Component for Embarcadero RAD Studio 2010

4 thoughts on “VCL Component (TOpenGLAPPanel)”

  1. Hi
    OpenGLAP working well so far but my new installation of Builder2010 forces certain include files to appear in the header files of units containing forms, and forces #include “TOpenGLAPPanel.h” to appear before pragma hdrstop in the main unit, although it is already called in a subsequent header file (I have them daisychained to minimise repeated calls). Can anyone explain the logic behind this and whether it should be a problem.

    I am also getting Linker warnings “Public symbol -gtd appearing in both module… and module…, and similarly for _dfb and _m but I think this is a legacy problem.

  2. Builder is including the headers to make sure no compiler errors occur when we compile.
    unfortunally it is not very good to remove them when we delete a component again.

    for repeated calls, headers normally include defines like

    #ifndef TOpenGLAPPanelH
    #define TOpenGLAPPanelH
    … code

    this ensures only one interpretation of the linker.

  3. Hi

    All working very well. I would appreciate any clues regarding copying my OpenGLAPP image to clipboard please.


  4. Here is a clue….:-)

    //—- begin
    // Get client geometry
    int ii, Bytes, bb;
    SIZE glsize;
    unsigned char *pPixelData;

    ClearSelection ();
    Redraw (); = OpenGLPanel->ClientWidth; = OpenGLPanel->ClientHeight;

    // —- Lines have to be 32 bytes aligned, suppose 24 bits per pixel
    // —- just cropped it -= % 4;

    // —- Create a bitmap and select it in the device context
    // —- Note that this will never be used 😉 but no matter

    // —- Alloc pixel bytes
    Bytes = 3 * *;
    pPixelData = new unsigned char [Bytes];

    // —- Copy from OpenGL
    glReadPixels (0,0,,, GL_RGB, GL_UNSIGNED_BYTE, pPixelData);

    // —- Pixel data is stored as GRB, not RGB
    for (ii=0; iiHandle);
    SetClipboardData(CF_DIB, handle);

    delete [] pPixelData;
    // —- End

Leave a Reply

Your email address will not be published.