• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# What is a potatoese?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

36 replies to this topic

### #1RoundPotato  Members

Posted 27 July 2014 - 09:06 AM




### #2Tutorial Doctor  Members

Posted 27 July 2014 - 09:11 AM

POPULAR

A browser doesn't have to necessarily be an Internet browser.

So, sure.

They call me the Tutorial Doctor.

### #3RoundPotato  Members

Posted 27 July 2014 - 09:15 AM



Edited by RoundPotato, 23 August 2014 - 05:44 PM.

### #4Samith  Members

Posted 27 July 2014 - 09:21 AM

POPULAR

Yes, you can write a web browser in C++, and yes, if you really want to, you can render content with DirectX. At a fundamental level, all a web browser does is make connections with website servers and communicate with them using the HTTP protocol. It displays the data it receives from the server using some rendering mechanism (could be DirectX or OpenGL, if you want).

### #5Waterlimon  Members

Posted 27 July 2014 - 09:24 AM

You can probably find an officialish definition in wikipedia.

But my view of browsers is that you give it a 'file path' in the form of an URI (universal resource identifier) which may point to your local filesystem or some server connected to the internet.

The browser then fetches (the browser supports many ways of fetching) and displays (we have moved toward 'executing' the resoures instead, usually in a sandbox) this resource you pointed to (the browser supports many types of resources and their different versions)

Basically you have 100 different applications all smashed together to be never separated again into a single executable. Or not. Im not a web dev.

Still, you probably dont want to make one yourself unless you use some library to handle the actual web browser part for you.

Edited by Waterlimon, 27 July 2014 - 09:24 AM.

o3o

### #6Tutorial Doctor  Members

Posted 27 July 2014 - 09:25 AM

Direct3D is for rendering graphics, the networking is done by other means (C++,PHP) etc.

HTLM, CSS, XML, JAVASCRIPT, and PHP are responsible for internet browsers like Chrome and Firefox.

But perhaps I don't understand the question.

They call me the Tutorial Doctor.

### #7RoundPotato  Members

Posted 27 July 2014 - 09:38 AM




Edited by RoundPotato, 23 August 2014 - 05:45 PM.

### #8Samith  Members

Posted 27 July 2014 - 09:45 AM

POPULAR

HTLM, CSS, XML, JAVASCRIPT, and PHP are responsible for internet browsers like Chrome and Firefox.

Other way around. Internet browsers are responsible for interpreting and executing HTML, CSS, XML and Javascript. PHP is a server side technology, your web browser doesn't know anything about PHP.

The parsing and executing of HTML/Javascript/etc can obviously be done in C++.

In the sense if I want to make a browser like firefox from scratch... you know what, I'll just ask it differently all together... Using what is Firefox and chrome made of? (just made of, NOT what it supports.)?

You can download the source for Firefox here. And here is an online directory of Firefox source code. You'll note it's largely written in C++.

Edited by Samith, 27 July 2014 - 09:46 AM.

### #9RoundPotato  Members

Posted 27 July 2014 - 09:58 AM




Edited by RoundPotato, 23 August 2014 - 05:45 PM.

### #10SimonForsman  Members

Posted 27 July 2014 - 10:48 AM

POPULAR

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)

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

I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

### #11Ohforf sake  Members

Posted 27 July 2014 - 10:52 AM

POPULAR

Note that you don't need OpenGL/DirectX to make a fully functional browser: http://en.wikipedia.org/wiki/Lynx_(web_browser)

### #12Ectara  Members

Posted 27 July 2014 - 11:16 AM

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.

### #13RoundPotato  Members

Posted 27 July 2014 - 11:23 AM




Edited by RoundPotato, 23 August 2014 - 05:45 PM.

### #14Ohforf sake  Members

Posted 27 July 2014 - 11:53 AM

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".

### #15Nik02  Members

Posted 27 July 2014 - 11:54 AM

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

Niko Suni

### #16Ectara  Members

Posted 27 July 2014 - 01:04 PM

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.

### #17RoundPotato  Members

Posted 27 July 2014 - 01:23 PM



Edited by RoundPotato, 23 August 2014 - 05:45 PM.

### #18Ectara  Members

Posted 27 July 2014 - 02:02 PM

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.

Edited by Ectara, 27 July 2014 - 02:06 PM.

### #19Servant of the Lord  Members

Posted 27 July 2014 - 02:10 PM

POPULAR

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.

It's perfectly fine to abbreviate my username to 'Servant' or 'SotL' rather than copy+pasting it all the time.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames -

### #20Ectara  Members

Posted 27 July 2014 - 03:27 PM

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.

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.