Author Topic: Why visuallisp do not contain opengl32.dll or web-gl?  (Read 172 times)

0 Members and 1 Guest are viewing this topic.


  • Bull Frog
  • Posts: 210
Why visuallisp do not contain opengl32.dll or web-gl?
« on: October 11, 2021, 05:26:25 AM »
I known, the VLisp (real name Visual Lisp, is Slow).
Why? the slower VLisp, must be connected directly with Opengl-assembler.
Already I saw, OpenGL are very faster/s assembler-instructions.

So. Vlisp+Opengl=very good upgrade.vlx
« Last Edit: October 11, 2021, 07:53:34 AM by d2010 »


  • King Gator
  • Posts: 3503
  • (x-in)->[process]->(y-out)
Re: Why visuallisp do not contain opengl32.dll or web-gl?
« Reply #1 on: October 11, 2021, 04:41:16 PM »
AutoLisp is an embedded 'scripting' language built and targeted directly inside the AutoCAD API, it's not a 'general purpose' language like C++ say so there are no constructs/API's or libraries that give access to OpenGL or any other lower level drivers or API's other than AutoCAD. You can not use it outside of AutoCAD.

OpenGL is a low level graphics library, basically you feed it lists of vertices and triangle indexes of these vertices with some shader language for colours etc and it does the number crunching to draw the pixels on the screen, it has no idea of your CAD system or anything else. Basically the only speed benefits of OpenGL is to draw graphics primitives.

WebGL is similar to OpenGL but for web browsers only and is typically written in JavaScript although there is more and more capability coming out to compile to Web Assembly from other languages every day. Again though, AutoLisp is not usable here.

Even AutoCAD abstracts away the graphics drivers (OpenGL/DirectX), while technically you could get to them (the graphics context) via C/C++ there's really no point as you would be bypassing all the drawing database and functionality.
The graphics context is the last piece in the chain but you need the whole chain to know what to draw:
Drawing Database -> Database Objects -> Object's drawable primitives -> Graphics library/context draws pixels on screen.

Something like Common Lisp on the other hand is more than capable of using OpenGL but you then need to create the UI window/s, graphics context and database etc yourself from scratch.
Forth is like the Tao: it is a Way, and is realized when followed.
Its fragility is its strength; its simplicity is its direction - Michael Ham

"First, solve the problem. Then, write the code." John Johnson