升级到Delphi XE5和最新的GLScene后,在某些PC上,TGLSceneForm完全崩溃了应用程序(参见下面的日志文件)。但是,如果我使用完全相同的应用程序并在Delphi 2010中编译它(使用旧版本的GLScene)它可以完美运行!
它只能在某些PC上执行此操作。例如,我们的办公室有3个HP工作站,XE5 app 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,所以我知道不是我们的编程导致了这个问题。
任何想法或帮助将不胜感激。 瑞克。
答案 0 :(得分:2)
错误很明显:
glDebugMessageEnableAMD parameter <category> has an invalid enum '0x1' (GL_INVALID_ENUM)
自版本4.3以来,调试消息只有been core in OpenGL。您正在运行OpenGL 4.1。您需要在有问题的系统上升级OpenGL。