I'm using GLScene to draw complex paths using TGLLines objects (eg: roads in a country map).
I use two type of line: dotted for off-road (using LinePattern property) and normal (with different colors) for others.
To reduce ammount of used memory I use lsmLine mode (GL_STRIP_LINES) and these rules:
A root TGLLines object (A) for entrire country road map.
Every time I change the city I create a CHILD from (A), the (Bn).
Every time in (Bn) I need to change the road type (off-road/normal road) I create a CHILD from (Bn), the (Cn).
Every piece of (Cn) road is made adding a single node in lsmLine mode (GL_STRIP_LINES).
In this way I can reduce the ammount of memory used because I use only a vector for any piece of road.
Strangely the result is very slow to build and overall to render when I zoom/rotate/pan the scene.
Seem that GLSCENE, creating a lot of glNewList to contains the glLine vertexes for every children, slow down a lot OPENGL render of scene.
If I change way to create road map using GL_LINES (lsmSegments) and so using only two children for road in a city, one for off-road and one for normal road, remove any slowdown but INCREASE dramatically memory usage e limit number of roads manageable:
A root TGLLines object (A) for entrire country road map.
Every time I change the city I create a CHILD from (A), the (Bn) with two children: A.Bn.CA for off-roads and A.Bn.CB of normal roads.
Every off-road of city is placed in children A.Bn.CA adding vertex in lsmSegment mode.
Every normal-road of city is placed in children A.Bn.CB adding in lsmSegment mode.
This way to construct the road path is very memory hungry and often I reach the process limits with "Out Of Memory" exception, but render in zoom/rotate/pan is very very fast.
Why use of TGLLines children growing, and related glNewList ammout is so dangerous ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've tried to add attached file to my project but required and missing types, objects, files are very very a lot and after two hours of copy/paste/modify between new libraries and 1000714 I wasn't able yet to get a runnable exe.
At this point I guess the only way is to keep slow line behaviour.
Planning to switch project to new Delphi Tokyo is not affordable because I'm using a lot of 3th libraries which required a lot of job, and luky, to work fine with new Delphi environment. I pay the decision to stay in old BDS2006 enviromend made by previous project developper...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Silverio,
I have a working copy of GLScene v.1000714 (2006) in my archive, but only for Delphi7 on win10 to reference and compare it with current version. I can include GLMeshLines.pas in it , released as updated GLSceneD7 v.1.1 and you may
try to work on BDS2006 instead of Delphi7. Sorry I don't have it installed.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was not able to find GLSceneD7 V.1.1 in sourceforge glscene repository file list.
Where can I find it ?
PS: I'm very sorry with forum supporters !!!
I've made a big mistake about GLSCENE libraries.
I've thought that GLScene v.1000714 was the lastest not Unicode version of GLSCENE but now I've saw that there are also more update version in GLScene download folders compatible with D7 and so with my BDS2006 !!! ;|
Sorry again
Last edit: shine world 2018-01-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No Silverio,
Delphi7 can be installed on Win10 very easy, so find a setup somewhere. I have it on my pc with lisenced win10 and it not comflicted with rad studio. About GLSceneD7 v.1.1 for Win10. It's not on the list of download files yet so when I prepare it I'll release it later.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Silverio,
Well, I've looked at the code and see that it's not so easy to add GLMeshLines in GLScene v100714 (or v.1.1) because of changes in GLState and later transition from OpenGL1x to OpenGLTokens and OpenGLAdapter, so I've added the unit GLMeshLines to GLScene_v1.2_Delphi7_Win10.7z and you can download it and install for Delphi7 and I think it should work also for BDS2006. You can find it in Files on SF.
PW
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I'm using GLScene to draw complex paths using TGLLines objects (eg: roads in a country map).
I use two type of line: dotted for off-road (using LinePattern property) and normal (with different colors) for others.
To reduce ammount of used memory I use lsmLine mode (GL_STRIP_LINES) and these rules:
In this way I can reduce the ammount of memory used because I use only a vector for any piece of road.
Strangely the result is very slow to build and overall to render when I zoom/rotate/pan the scene.
Seem that GLSCENE, creating a lot of glNewList to contains the glLine vertexes for every children, slow down a lot OPENGL render of scene.
If I change way to create road map using GL_LINES (lsmSegments) and so using only two children for road in a city, one for off-road and one for normal road, remove any slowdown but INCREASE dramatically memory usage e limit number of roads manageable:
This way to construct the road path is very memory hungry and often I reach the process limits with "Out Of Memory" exception, but render in zoom/rotate/pan is very very fast.
Why use of TGLLines children growing, and related glNewList ammout is so dangerous ?
Hi Silverio it's better using TGLMeshLine object see the demo n Examples\Editors\Meshlines
Unfortunaly I'm using BDS2006 so I can't use latest GLScene version but only glscene_v_1000714 in which TGLMeshLine isn't available...
Ok try to add this unit ,. You'll surely make some little change in uses clause
Thank you for interest about my problem.
I've tried to add attached file to my project but required and missing types, objects, files are very very a lot and after two hours of copy/paste/modify between new libraries and 1000714 I wasn't able yet to get a runnable exe.
At this point I guess the only way is to keep slow line behaviour.
Planning to switch project to new Delphi Tokyo is not affordable because I'm using a lot of 3th libraries which required a lot of job, and luky, to work fine with new Delphi environment. I pay the decision to stay in old BDS2006 enviromend made by previous project developper...
Hi Silverio,
I have a working copy of GLScene v.1000714 (2006) in my archive, but only for Delphi7 on win10 to reference and compare it with current version. I can include GLMeshLines.pas in it , released as updated GLSceneD7 v.1.1 and you may
try to work on BDS2006 instead of Delphi7. Sorry I don't have it installed.
PW
I wasn't able to install Delphi 7 or Delphi 2006 in W10 so I'm using a VM with XP SP3 to develop :(
In this link you can find what I'm using with BDS2006: https://www.dropbox.com/s/kcbfew78nqxmfiz/sid_glscene01_1.0.1.7z?dl=0
I Install the library using sid_glscene01_glscene_d10.bdsproj project.
I was not able to find GLSceneD7 V.1.1 in sourceforge glscene repository file list.
Where can I find it ?
PS: I'm very sorry with forum supporters !!!
I've made a big mistake about GLSCENE libraries.
I've thought that GLScene v.1000714 was the lastest not Unicode version of GLSCENE but now I've saw that there are also more update version in GLScene download folders compatible with D7 and so with my BDS2006 !!! ;|
Sorry again
Last edit: shine world 2018-01-11
No Silverio,
Delphi7 can be installed on Win10 very easy, so find a setup somewhere. I have it on my pc with lisenced win10 and it not comflicted with rad studio. About GLSceneD7 v.1.1 for Win10. It's not on the list of download files yet so when I prepare it I'll release it later.
PW
Thank you I wiil wait the GLSceneD7 v.1.1 release :)
Hi Silverio,
Well, I've looked at the code and see that it's not so easy to add GLMeshLines in GLScene v100714 (or v.1.1) because of changes in GLState and later transition from OpenGL1x to OpenGLTokens and OpenGLAdapter, so I've added the unit GLMeshLines to GLScene_v1.2_Delphi7_Win10.7z and you can download it and install for Delphi7 and I think it should work also for BDS2006. You can find it in Files on SF.
PW
I really appreciate your efforts.
I immediately download the new version and try with MeshLines.
The new version probabily permit me to use other interesting features of glscene !!!
Thank you so much