【问题标题】:Delphi XE5 + GLSceneForm not working on some PC'sDelphi XE5 + GLSceneForm 无法在某些 PC 上运行
【发布时间】:2014-05-13 11:53:51
【问题描述】:

升级到 Delphi XE5 和最新的 GLScene 后,在某些 PC 上,TGLSceneForm 会使应用程序完全崩溃(请参阅下面的日志文件)。但是,如果我使用完全相同的应用程序并在 Delphi 2010(使用旧版本的 GLScene)中编译它,它会完美运行!

它只在某些 PC 上执行此操作。例如,我们办公室有 3 台 HP 工作站,XE5 应用程序 2 工作正常,1 崩溃(有不同的图形适配器)。然而,在 Delphi 2010 中编译时,所有 3 台 PC 的工作都正常!

应用程序的 GLScene 日志文件是:

Thread ID 12776 0    (i)  Log subsystem started in elapsed time mode.
Thread ID 12776 0    (i)  Logging [debug info (D), info (i), notices (M), warnings (W), errors (Er), fatal errors (!!)]
Thread ID 12776 0    (i)  Buffered mode: False
Thread ID 12776 0    (M)  Service thread started
Thread ID 12776 234  (i)  Temporary rendering context created
Thread ID 12776 234  (M)  Getting OpenGL entry points and extension
Thread ID 12776 234  (M)  
Thread ID 12776 234  (i)  OpenGL rendering context information:
Thread ID 12776 234  (i)  Renderer     : AMD Radeon HD 6570  
Thread ID 12776 234  (i)  Vendor       : ATI Technologies Inc.
Thread ID 12776 250  (i)  Version      : 4.1.10765 Compatibility Profile Context
Thread ID 12776 250  (i)  GLSL version : 4.10
Thread ID 12776 250  (M)  
Thread ID 12776 297  (M)  Getting OpenGL entry points and extension
Thread ID 12776 312  (i)  Backward compatible core PBuffer context successfully created
Thread ID 12776 312  (M)  Service context successfuly initialized
Thread ID 7680  1311     (i)  Temporary rendering context created
Thread ID 7680  1311     (M)  Getting OpenGL entry points and extension
Thread ID 7680  1311     (i)  Temporary rendering context destroyed
Thread ID 7680  1358     (M)  Getting OpenGL entry points and extension
Thread ID 7680  1373     (D)  glDebugMessageEnableAMD parameter <category> has an invalid enum '0x1' (GL_INVALID_ENUM)

示例代码如下:

program GLSceneError;

uses
  EMemLeaks,
  EResLeaks,
  EDialogWinAPIMSClassic,
  EDialogWinAPIEurekaLogDetailed,
  EDialogWinAPIStepsToReproduce,
  EDebugExports,
  EFixSafeCallException,
  EMapWin32,
  EAppVCL,
  ExceptionLog7,
  Vcl.Forms,
  ufrmMain in 'ufrmMain.pas' {frmMain},
  ufrmGLScene in 'ufrmGLScene.pas' {frmGLScene: TGLSceneForm};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.CreateForm(TfrmMain, frmMain);
  Application.Run;
end.

unit ufrmMain;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls;

type
  TfrmMain = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmMain: TfrmMain;

implementation

{$R *.dfm}

uses ufrmGLScene;

procedure TfrmMain.Button1Click(Sender: TObject);
begin
  try
    if not Assigned(frmGLScene) then
      Application.CreateForm(TfrmGLScene, frmGLScene);

    frmGLScene.Show;
  except
    on E: Exception do
    begin
      ShowMessage(E.Message);
    end;
  end;
end;

end.

object frmMain: TfrmMain
  Left = 0
  Top = 0
  Caption = 'frmMain'
  ClientHeight = 182
  ClientWidth = 199
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 32
    Top = 32
    Width = 141
    Height = 57
    Caption = 'Open GLScene Viewer'
    TabOrder = 0
    OnClick = Button1Click
  end
end

unit ufrmGLScene;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  GLScene, GLSceneForm;

type
  TfrmGLScene = class(TGLSceneForm)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmGLScene : TfrmGLScene;

implementation

{$R *.dfm}

end.

object frmGLScene: TfrmGLScene
  Left = 246
  Top = 74
  Caption = 'GLScene'
  ClientHeight = 326
  ClientWidth = 405
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  Position = poMainFormCenter
  Buffer.BackgroundColor = 2064383
  FullScreenVideoMode.Width = 1920
  FullScreenVideoMode.Height = 1080
  FullScreenVideoMode.ColorDepth = 32
  FullScreenVideoMode.Frequency = 50
  PixelsPerInch = 96
  TextHeight = 13
end

我不知道该去哪里,因为这似乎是自升级到 XE5 以来 GLScene 的某种基本问题。我无法推出需要我们所有客户对图形适配器进行故障排除的软件,特别是因为它在完全相同的 PC 上运行 Delphi 2010,所以我知道不是我们的程序导致了问题。

任何想法或帮助将不胜感激。 瑞克。

【问题讨论】:

  • 您应该检查论文部分的 GLScene 版本的差异:glDebugMessageEnableAMD 参数 具有无效的枚举 '0x1' (GL_INVALID_ENUM)

标签: delphi delphi-xe5 glscene


【解决方案1】:

错误很明显:

glDebugMessageEnableAMD parameter <category> has an invalid enum '0x1' (GL_INVALID_ENUM)

自 4.3 版以来,调试消息只有 been core in OpenGL。您正在运行 OpenGL 4.1。您需要在有问题的系统上升级 OpenGL。

【讨论】:

  • 是否可以更改 GLScene 以使用/绑定早期版本的 OpenGL?如果可以避免的话,我不想强​​迫数百名用户必须升级他们的图形驱动程序。
  • @RickWheeler 我不知道,我从未使用过 GLScene。您可能会在文档中挖掘,看看是否有可以配置的标志来删除较新的核心功能。
猜你喜欢
  • 2016-10-06
  • 1970-01-01
  • 2014-03-02
  • 1970-01-01
  • 2016-02-07
  • 1970-01-01
  • 2021-03-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多