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 3 of 3

Thread: Installing OpenGL package into C++ Builder 2010

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2010
    Posts
    2

    Installing OpenGL package into C++ Builder 2010

    For some years I have been using OpenGL with Borland C++ Builder 4 and now need to upgrade to Embarcadero C++ Builder 2010. I have tried loading the original package OpenGLPanel_DP.bpk but get an error message telling me that VCL40.dll is not found. I have recently received a more recent version from the author excluding the .bpk component and have compiled at .bpl level OpenGLPanel_DP.bpl and get an error message "Registration procedure, Openglpanel.register in package .......OpenGLPanel_DP.bpl raised exception class EPaletteException Blank group names are not allowed"

    Can anyone explain what is going wrong here ?

    It is an excellent package which has served me well and I do not want to try any alternative package if it means changes to my coding.

    Thanks

  2. #2
    Member Regular Contributor
    Join Date
    Aug 2008
    Posts
    381

    Re: Installing OpenGL package into C++ Builder 2010

    I'm not sure of the equivalent for C++ Builder, but in Delphi you'll get that exception if you try to install a package that contains a "Register" procedure which tries to register components to be shown into a page with no name.

    eg. This will cause the exception:
    Code :
    procedure Register;
    begin
      RegisterComponents('', [TMySceneViewer, TMyScene]);
    end;
    but this won't
    Code :
    procedure Register;
    begin
      RegisterComponents('My Scene', [TMySceneViewer, TMyScene]);
    end;

    Looking at http://docwiki.embarcadero.com/VCL/e...sterComponents and http://docwiki.embarcadero.com/CodeSamples/en/RegisterComponents_(C%2B%2B), it seems the C++ equivalent would be:
    Code :
    void __fastcall PACKAGE Register()
    {
      TComponentClass classes[2] = {__classid(TMySceneViewer), __classid(TMyScene)};
      RegisterComponents("My Scene", classes, 1);
    }

  3. #3
    Junior Member Newbie
    Join Date
    Aug 2010
    Posts
    2

    Re: Installing OpenGL package into C++ Builder 2010

    Thanks Dan, that has helped me narrow things down and I think that this code needs revising for B2010 to reflect the hiden nature of the TMetaClass* which I have not quite grasped.

    void __fastcall PACKAGE Register()
    {
    TComponentClass classes[1] = {__classid(TOpenGLPanel)};
    RegisterComponents("OpenGL_DP", classes, 0);
    }

    Any thoughts ?

    Thanks

Posting Permissions

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