bigredeye / librterm Goto Github PK
View Code? Open in Web Editor NEWCross-platform terminal emulator library
License: MIT License
Cross-platform terminal emulator library
License: MIT License
Related to #14. SDL2_ttf and SDL2_image are not in public conan repos, so it will be difficult to use them. In addition, we don't need SDL2_ttf / SDL2_image for raw OpenGL implementation, libfreetype / libpng will suffice.
CMake should automatically find SDL2 libraries and OpenGL.
Configure CI to build linux/windows binaries, AFAIK it's possible.
On Windows terminal cannot receive events from different thread. The solution is quite simple -- add rterm::Term::poll() and remove all code related to threading.
On my GTX 1070 in benchmark mode i get only ~180 fps, and on GT 820m benchmark runs on 45 fps. It's really slow, so i have to find ways to speed up.
We should use OpenGL for text rendering because SDL2 copies whole texture to GPU each frame and this is extremely slow.
The rendering logics should be isolated from a high-level api, so we will be able to use different APIs:
the first two should be SDL2 and OpenGL.
Usage of a small number of hardware textures for glyph cache will significantly increase the rendering speed.
SDL's event system is ugly, so it is very difficult provide complex event handling. This code
rterm::Term term(...);
term.onKeyDown([](rterm::Key key){
/* do something with key */
});
Looks much nicer than
rterm::Term term(...);
while (term.isRunning()) {
rterm::Key key = term.getKey();
/* do something with key */
}
Now we have the second one.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.