← Back to team overview

kicad-developers team mailing list archive

Re: GAL questions (with regarding 3d-viewer)

 

On 04/01/2015 02:29 PM, Mário Luzeiro wrote:
> Hello Maciej, Tomasz, Torsten, all,
> I found that you are related with GAL development, I have some questions and discussion for you, hope you can help me make some things a bit clear.
> 
> Some requests:
> 
> - Would it be possible in a near future, to detach the "glm" library from GAL (folder) and maybe make a common include file for the use glm? Since the 3d-viewer is also using the glm, and last time we had problems with the define of radius in radians.. maybe it can be a way to fix this issue.

Hi Mario,

Sure. As far as I remember, initially glm was used by GAL exclusively,
that is why I put it in the gal/opengl directory.

> - Would it be possible in a next near future, think to reimplement some of (general) modules related with openGL to have in mind the reuse in other modules in kicad? I mean, example: can we have a shader loader manager to be used by different parts in the sources and not just for GAL? Or any other (openGL / gml) very general code that can be reused in other parts..? So it will not be rewritten and duplicated in the sources..

SHADER is already quite separated from GAL. It is just a class to load,
link & apply shaders basing on generic OpenGL calls.

Another parts that can potentially be reused are GPU_MANAGER &
CACHED_CONTAINER to handle Vertex Buffer Objects. One limitation that I
can think of now is lack of support for texturing & lights.

> Now more specific questions, just so I can try to understand a bit more of the openGL / GAL / Pcbnew:
> 
> - openGL / GAL is not currently the default mode, does it have anything to do with openGL support? Does Kicad have any limitation policy to not support or limit the use of openGL (I mean.. openGL versions and shaders versions in this case). (Other way to make the question: Does kicad want to support old-school PC plataforms / graphics board? so we can't make the full step switch)

As Nick mentioned - GAL is not complete yet, so KiCad should start with
the default canvas now. People who understand its limitations and
features should switch by themselves.

There are also people complaining about OpenGL incompatibility, even
though the standard we use is not very modern and lowering it would defy
its purpose.

> - Do you think is would be possible to do in some way what GAL/openGL do in Pcbnew but now to display it in 3D? Would that be an appropriated way to do it for the 3D-viewer? (Ie: generate it via shaders (lines, circles, etc) VS generate it via polygon mesh)
>
> - If that makes sense, would it be eventually possible to reuse GAL/openGL code in the 3d-viewer some how? in that case?

GAL was designed with 2.5D view in mind and so was its interface,
including auxiliary classes. Maybe I am wrong, but changing GAL to work
in real 3D mode would cause a lot of major changes. Apart from that,
there is also Cairo renderer which is not capable of 3D drawing at all.

I would rather reuse previously mentioned parts of the OpenGL canvas for
this purpose.

> - I have no knowledge about the "inter application communication" on Kicad, but I see that when you click in Pcbnew in a component it will update the schematic and point to that component. What type of communication like this could be possible to do between Pcbnew and 3d-viewer? What type of other information can it share (in "real-time") ? (Ex: footprint selected, track selected, pad selected, ... component moved or placed .. ) ?
> 
> It is OK if you would like to point me some parts on the code to have a look regarding this questions.

There is an interface called KIWAY. Crossprobing in GAL was introduced
with commit nr 5419. You may also have a look at
PCB_EDIT_FRAME::SendMessageToEESCHEMA() [pcbnew/cross-probing.cpp] or
KIWAY documentation [1].

If I am not mistaken, 3D viewer and pcbnew are in the same DLL, so it
might be even easier for you to communicate between pcbnew & 3D viewer.

Regards,
Orson

1.
http://ci.kicad-pcb.org/job/kicad-doxygen/ws/Documentation/doxygen/html/classKIWAY.html#details

> Hoping hear from you...
> 
> Rgds,
> Mario Luzeiro
> 


Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References