ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I program in C/C++ and Assembler and I am NOT (not -anymore- and at all) interested in either Windows or Linux GUI-API's!
I'm not very good at it but not really extraordinary bad either.
Actually I am thinking about a project in which I want to display real-time data in x/y coordinates in a terminal-window under Linux.
Are there still people using Windows?
I took a look at GnuPlot but that's not what I am looking for. It's already too abstracted!
I need a reference to literature (or even better sample application(s)/code) which explains to me how to direct modify the framebuffer in a way where I can
a.) display the chosen data (lets say) in the top right corner of the terminal-window AND b.) constantly having a command-line at the bottom of the window OR c.) even better have several plots at different coordinates in the terminal-window while still having a stdin at the bottom. (or wherever else)
by either modifying the framebuffer itself and direct (resp. the driver(s)) or MUCH BETTER by the help of X's Extensions. I.e. Xinerama for multi-monitor support etc.
Please only comment if you know what you are doing and if you can deliver sophisticated, qualified and proofed content. I am already 'unqualified enough' to listen (or read) even more unqualified stuff of which is out there enough.
The last time I posted here I got exactly what I was looking for in short so I am curious what happens this time.
You have already pointed yourself in the right direction with the X libs and extensions, and you should find lots of online reference documentation for that.
You might also find SDL to be of value. I have not programmed using SDL but it is a widely used graphic library popular for gaming applications. SDL uses OpenGL, which is probably the core functionality that you need based on your description.
If you are running in an X environment, then writing to the framebuffer directly is probably not what you want.
Also...
Quote:
Originally Posted by bluntroller
Please only comment if you know what you are doing and if you can deliver sophisticated, qualified and proofed content.
While others here are always willing to help, if you are looking for others to provide you with complete, tested code, this isn't the right place to ask. Usually the best starting point is to show others what you have tried so far and what is or is not working for you. Asking for "proofed" code before showing your own efforts is generally frowned upon.
Please see the Site FAQ for guidance in acceptable forum participation.
Last edited by astrogeek; 03-08-2018 at 01:18 AM.
Reason: Added SDL link
Sorry for the delayed reply.
I was 'island-hopping' for a few days and had limited internet-access.
Thanks for your input which I appreciate A LOT and will try to comment briefly.
I took a glimpse at SDL.
Quite overwhelming ('again') and probably too much to 'scour' ('again') to come to useful results...
Quote:
While others here are always willing to help, if you are looking for others to provide you with complete, tested code, this isn't the right place to ask.
Why?
The internet is full of source-code - you just need to know where.
Quote:
Usually the best starting point is to show others what you have tried so far and what is or is not working for you.
I haven't coded anything yet because I am too busy with either IT related or other things.
Time is precious to everybody of us and that's the reason of my intention to post here.
Honestly I am usually not interested to ask for unnecessary help.
I rather try to avoid it.
Also is coding something 'from scratch' a no-brainer.
People who do that are (in my opinion and without insulting anybody) a bit 'beside the track' and have probably a 'profile problem'.
Quote:
Asking for "proofed" code before showing your own efforts is generally frowned upon.
Well, I have here Methyl Sacylate Camphor mixed with Menthol my gf uses to rub my right shoulder and sometimes my head...
Perhaps it helps...
:-)
I am looking for source-code and work in C which I can modify for my needs.
Coding from scratch is the last option I take.
Two maintained framebuffer apps that I know about are w3m (which includes a framebuffer-supporting w3m-img component and sounds like a particularly good example) and fbi. Both come with source code.
Your actual requirements though, all say "ncurses" to me.
Quote:
I program in C/C++ and Assembler and I am NOT (not -anymore- and at all) interested in either Windows or Linux GUI-API's!
...
Actually I am thinking about a project in which I want to display realtime data in x/y coordinates in a terminal-window under Linux.
...
a.) display the chosen data (lets say) in the top right corner of the terminal-window AND
b.) constantly having a command-line at the bottom of the window OR
c.) even better have several plots at different coordinates in the terminal-window while still having a stdin at the bottom. (or wherever else)
You didn't say that the the "plots" had have a graphical resolution finer than a character, so yeah. ncurses for all of the above.
Also: do you actually need to use the framebuffer? If you just want to display images in a terminal window: most X-based or Wayland-based terminal emulators actually support that. xterm actually has particularly good support for it.
You didn't say that the the "plots" had have a graphical resolution finer than a character, so yeah. ncurses for all of the above.
Yes, the plots have to be finer than a character so poking in just a dot here and there doesn't cut it.
You can think of it as a x/y plot of bandwidth-data with 1-dot granularity, free positioning (i.e.), an update frequency of about 200ms and an iddle-loop for commands at the bottom.
Which open source program does have similar characteristics? (without using a higher level API)
Which open source program does have similar characteristics? (without using a higher level API)
erm. dugan just told you?
while i appreciate the pointlessness of reinventing the wheel, it now starts to look more like asking for handouts.
you said yourself, the internet is full of useful GPL'd code => flex those finger muscles and start typing some search queries!
unzip some tarballs and see what they actually contain!
Yes, the plots have to be finer than a character so poking in just a dot here and there doesn't cut it.
Well, how else would you draw the graph?
"poking in a dot just here and there" is literally how graph-drawing is done.
You are aware of that, right?
Because at this point, I'm actually not sure if you know that.
Quote:
You can think of it as a x/y plot of bandwidth-data with 1-dot granularity, free positioning (i.e.), an update frequency of about 200ms and an iddle-loop for commands at the bottom.
So a live-updating status indicator, like you'd use for industrial equipment? Only running in a terminal, with graphical graphs?
Nothing that I can think of.
What kind of data is this going to be plotting, btw? If it is for industrial equipment, then bugs in your work can cost lives.
Thanks for your reply again.
Yes, I am aware of how it works but haven't dealt yet with the framebuffer direct but instead either with the WinAPI or GTK where it is actually quite an easy procedure etc.
But I want to avoid using the libraries but hardcode all in C.
And... I know sources where to copy code-fragements.
I just wanted to hear alternatives known to other users here.
However, actually I am looking for a button to delete my account here and can't find none.
Is there any chance one of you can forward this request to an adminstrator as I am not able to send personal messages too.
I'd really appreciate it.
Please dismiss me from the duty to explain my decision.
However, actually I am looking for a button to delete my account here and can't find none.
Is there any chance one of you can forward this request to an adminstrator as I am not able to send personal messages too.
This place has a hard policy of not deleting accounts that have made posts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.