What is a potatoese?

Started by
35 comments, last by RoundPotato 9 years, 9 months ago
Note that you don't need OpenGL/DirectX to make a fully functional browser: http://en.wikipedia.org/wiki/Lynx_(web_browser)
Advertisement

Let me ask the remainder of the question, what rendering is used for Firefox? (thanks for the links, but I wouldn't spends hours or days looking at the source files just to be able to tell)

Also note that a lot of browsers support other acceleration, like DirectDraw, and have the capability to turn off hardware acceleration if it turns out to be buggy, doing everything in software. There may not be one answer for you.



Whatever broswers may be, they are not "simple".

But apart from that, yes, browsers are programs, written in a programming language. They make use of libraries, which are also written in some programming language, and they interact with the OS.

All of which also holds for "notepad".

Modern browsers are far from simple, but otherwise they are normal applications.

Niko Suni


I needed only a simple answer like "SimonForsman" pointed out, it uses C++ and OpenGL.


Firefox uses C++ GTK+ and OpenGL on Linux atleast

Not quite what he said, and it sounds like an oversimplification of his post.


Based on that I can confirm that browsers(internet, typical/graphical) are indeed simple applications utilising DirectX/OpenGL and C++(or other programming language(s)).

This isn't accurate. When I run Chrome in a VM, I have to disable hardware acceleration to keep it from drawing incoherently. Thus, without hardware acceleration, it is using a software renderer. That contradicts your conclusion that Direct X or OpenGL are in use at all times. Mozilla has long since had the ability to use DirectDraw or X Render, whether or not it's recommended in the presence of other, more efficient APIs. This is another contradiction of the idea that these Direct X and OpenGL are the only two APIs used.


 

The case with a VM is additional for more unusual usage.

The application runs in a VM the same way it does on a normal physical computer. You have the option to turn off hardware acceleration right now, so it isn't unusual if you have a driver bug, or something.


BUT, on the VERY BASIC and CORE it's just C++/etc and OpenGL/DirectX.

That ignored everything I just said.


Do tell me otherwise if that is not the case though.

A cursory Google search will tell you what it is. It is (in this case) the process of rendering a 3D scene without using hardware acceleration, done completely in software. In other words, performing the tasks of OpenGL/Direct3D without the use of hardware acceleration. The Mesa library is a good example.

Edit: Also, the use of toolkits like GTK+ is of considerable importance.

A 'browser' in general, is a program used for viewing ("browsing") certain types of files. For example, Windows Explorer, or MaxOSX's 'Finder', are file browsers.
Picasa is an image browser.

Web browsers are just regular computer programs - regardless of what programming language or APIs you use, most allow you to compile to executable files for the computer to run.

The name 'Web browsers' is reminiscent of back fifteen years ago when the world wide web was a collection of static HTML documents that you downloaded. Your browser would download an html file from a remote server, and then display the file. You click on a link and it'd go download a different file. Think of it almost like a huge inter-linked collection of Microsoft Word documents.

Nowadays, most webpages are generated on-the-fly to make them dynamic on the server side, and have embedded scripting to make them dynamic on the client side.

The 'world-wide web' is all the websites you visit that are hosted on internet-accessible computers. The 'web' is a subportion of the internet. When you play Counter Strike, or Call of Duty, or whatever, you are playing those games on the internet using certain protocols. And when you access websites, you are using different protocols. So the web is part of the internet, but it is not the whole internet. Everyone nowadays calls the web 'the internet', which is perfectly fine in common talk, but in technical terms, the internet is much larger than just the web, but web browsers mostly only browse the 'web' part of it.

To write a web-browser requires alot of work - you have to be able to talk back and forth to web servers using standard protocols, and be able to parse overly complex and cutting-edge modern as well as archaic deprecated file formats, knowing how to lay out and render a web page in many different window resolutions, handle scripting, data storage, and other things of that nature.

It'll save you loads of time if you let existing libraries handle the complex stuff for you in a standard way, and just write the code for the buttons around the webpage stuff.
Infact, Qt even integrates WebKit, making simple web browsers easy enough that they have a basic web browser as an example application.


be able to parse overly complex and cutting-edge modern as well as archaic deprecated file formats

The only thing I have to add to this answer is the necessary ability to handle malformed web pages and still draw them in an expected fashion; while it is perfectly legal to throw an error and refuse to continue, the number of web pages with invalid markup is staggering, meaning that being correct is penalizing the end-user for someone else's error repeatedly. Thus, many web browsers will automatically make their best guess at what the intent was, and fix up their internal representation of the parsed document.

This topic is closed to new replies.

Advertisement