I'm using a TGLHudSprite to load a fixed background image in my scene, but when used the CNC toolpath lines (TGLLines) is partially corrupted and I'm not able to understand why.
The background are PNG files loaded dinamically to HUD Sprite with this code:
procedure UpdateBackgroundImage;
begin
try
if not FileExists(FBackgroundImageFileName) then Abort;
SceneBackground.Material.Texture.Image.LoadFromFile(FBackgroundImageFileName);
with (SceneBackground.Material.Texture.Image as TGLPictureImage).Picture do
begin
SceneBackground.SetSize(Width, Height);
SceneBackground.Position.X := Width / 2;
SceneBackground.Position.Y := Height / 2;
end;
end;
SceneBackground.Visible := True;
except
SceneBackground.Visible := False;
end;
end;
In the scene stack the Background TGLHudSprite is placed how first object and TGLLines are added dynamically below in Word root.
Hi, check the TGLLines Material properties's FaceCulling, Depthproperties and BlendingMode
Try to put SceneBackground HudSprite as first child of World DummyCube
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jermome D.
I will take a look to you suggested post.
At moment I was not able to simplify my program parts to place a zip with code here.
I've reached over 1 milions lines of code and the "extract part" is a little bit complicated :)
Last edit: shine world 2019-03-25
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Seem the wrong behavior is only in my used glscene library (RC 1.0.0.0714) because using the more updated (1.8.0.x) I can get all working. Unfortunately 1.8.0.x run perfectly on XP but get a lot of Access violations error in W10.
Hi all,
I'm using a TGLHudSprite to load a fixed background image in my scene, but when used the CNC toolpath lines (TGLLines) is partially corrupted and I'm not able to understand why.
The background are PNG files loaded dinamically to HUD Sprite with this code:
In the scene stack the Background TGLHudSprite is placed how first object and TGLLines are added dynamically below in Word root.
Have you any idea about this behavior ?
Last edit: shine world 2019-03-22
Hi, check the TGLLines Material properties's FaceCulling, Depthproperties and BlendingMode
Try to put SceneBackground HudSprite as first child of World DummyCube
Hi Jerome.D,
inspecting elements I saw:
TGLLines.Material.FaceCulling = fcBufferDefault
TGLLines.Material.BlendingMode = bmOpaque
I've tried to change to fcNoCull without results.
Moving scenebackground in top of World Dummy Cube, same result.
I don't find Depth property in matrial or TGLLine object.
I need to create a simple demo program...
ISSUE is when different color/size lines are drawn one below another...
Last edit: shine world 2019-03-25
Hi, it's seeem the same problem as Polygon : https://sourceforge.net/p/glscene/discussion/93606/thread/449fbbd91c/
Can you test the \GLScene\Samples\Delphi\Demos\collisions\TriangleBox
Cheers
Hi Jermome D.
I will take a look to you suggested post.
At moment I was not able to simplify my program parts to place a zip with code here.
I've reached over 1 milions lines of code and the "extract part" is a little bit complicated :)
Last edit: shine world 2019-03-25
Seem the wrong behavior is only in my used glscene library (RC 1.0.0.0714) because using the more updated (1.8.0.x) I can get all working. Unfortunately 1.8.0.x run perfectly on XP but get a lot of Access violations error in W10.