The My Opera forums have been replaced with forums.opera.com. Please head over there to discuss Opera's products and features

See the new Forums

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

Go to last post

1. November 2011, 14:58:11

jonnyRobbie

Posts: 16

WebGL

Is it possible to somehow activate Opera alpha 12 WebGL, so it works for google maps webgl feature and/or nokia Maps 3D webgl, etc. ... ??...even opera12 with built in WebGL is not recognized as compatibile. (I have it enabled in UserPrefs)

1. November 2011, 15:04:24

Originally posted by jonnyRobbie:

opera12 with built in WebGL is not recognized as compatibile.


Both websites are sniffing Opera. See this article about Nokia Maps 3D WebGL Beta browser sniffing by Karl Dubost from Opera. Google is also surely sniffing Opera.

Masking as Firefox might work on Google Maps WebGL Beta, but won't work on Nokia Maps 3D WebGL Beta as it sniffs Firefox 7 and older; only allowing Chrome and Firefox 8.
Windows 7 SP1 x86 edition and Windows XP Service Pack 3.
If you need any help from me with regards to Opera, please make a comment on any of my blog posts.
Support Opera wishes

1. November 2011, 15:17:36

BtEO

Posts: 1022

Summary: Browser sniffing, in both cases.

With Google Maps, I tried changing the user-agent — and could get the enable WebGL option to appear, but on my system trying to enable it only resulted in Windows narrowly avoiding a bluescreen (as in: I get the impression on Windows XP, possibly Vista too, I'd have had a bluescreen and only something added to Windows 7 saved me) but I have seen others say it worked on at least some level for them though.
Google's JavaScript is typically messy as hell so I didn't sit down to see if it was something in there. But at the very least there is some browser sniffing going on — Google already say it's experimental so why they can't say "it may be broken in your browser but you're welcome to try" I don't know. For a company born and bred on the Web they're somewhat backward with regard to browser sniffing,

Nokia on the other hand have delightfully clear and readable JavaScript, but they're still sniffing for compatible browsers. Oddly they have error messages in place for if something goes wrong in a "supported" browser, so again, I see no reason for the browser block.
I made this User JavaScript to start digging around:
// ==UserScript==
// @name    Nokia 3D WebGL Unblocker
// @author  Robin Zalek (BtEO)
// @version 1.0
// @include http://maps3d.svc.nokia.com/webgl/*
// ==/UserScript==

(function () {
	function evadeBrowserCheck(e) {	
		if (e.element.text.match(/var BrowserDetect = {/)) {
			e.element.text = e.element.text.replace(/"Firefox": 8/g, '"Opera": 12');
			
			//Debug: work out which compatibility problem we're dealing with.
			e.element.text = e.element.text.replace(/Unfortunately, there's a WebGL compatibility problem\.\s+<\/br>\s?/i, 'Unable to create WebGL <canvas> context: " + e + "</br>')
			e.element.text = e.element.text.replace(/Unfortunately, there's a WebGL compatibility problem\.\s+<\/br>\s?/i, 'Unable to create WebGL <canvas> context</br>')
			e.element.text = e.element.text.replace(/Unfortunately, there's a WebGL compatibility problem\.\s+<\/br>\s?/i, 'Unable to initialise Maps 3D: " + e + "</br>')
			
		}
	}

	opera.addEventListener('BeforeScript', evadeBrowserCheck, false);
})();
This does two things, replaces the Firefox entry in the compatibility table with one for Opera, and it replaces the three identical error messages with ones that explain the problem in a little more detail. Currently Opera fails on the third of those error messages because of a lack of support for CORS. CORS support is due within a snapshot or two so hopefully that's all that will be needed.

I've seen plenty of other examples of WebGL that worked in Opera with no extra effort though, so there are developers out there smart enough to avoid using browser sniffing.
MyOpera Community Enhancements — by xErath & BtEO
MyOpera Community Optimizations — by fearphage
Scribit improved posting tools for the MyOpera Community — by xErath
Improve Weeklies Blog — by MisterE & fearphage

2. November 2011, 10:34:52

Originally posted by BtEO:

Nokia on the other hand have delightfully clear and readable JavaScript


Actually Nokia Maps WebGL 3D Beta is not going to work in Opera even when masking as Firefox as Opera doesn't support CORS yet, as tested by an Opera user.
Windows 7 SP1 x86 edition and Windows XP Service Pack 3.
If you need any help from me with regards to Opera, please make a comment on any of my blog posts.
Support Opera wishes

2. November 2011, 13:31:50

BtEO

Posts: 1022

Pro-tip: Read the whole post next time. p
MyOpera Community Enhancements — by xErath & BtEO
MyOpera Community Optimizations — by fearphage
Scribit improved posting tools for the MyOpera Community — by xErath
Improve Weeklies Blog — by MisterE & fearphage

2. November 2011, 15:51:16

Originally posted by BtEO:

Pro-tip: Read the whole post next time.


OH! I am really really sorry. But I often don't get time to read full posts - as I contribute both to Opera forums and Tom's hardware forums + stay current with what Opera is doing via it's blogs + Maintain my blog (This all when I am free!!!).

Originally posted by BtEO:

CORS support is due within a snapshot or two so hopefully that's all that will be needed.


Yes, I know that - http://my.opera.com/core/blog/2011/10/28/cors-goes-mainline
Windows 7 SP1 x86 edition and Windows XP Service Pack 3.
If you need any help from me with regards to Opera, please make a comment on any of my blog posts.
Support Opera wishes

22. November 2011, 00:00:21

cecilia

Been to the Moon

Posts: 334

a friend let me know about this page:
http://www.chromeexperiments.com/detail/craftscape/?f=webgl

which has a very cool "WebGL experiment"
I tried this in Opera and FF and it was a no go.

was this sniffing or something else?
Opera Version 12.16 Build 1860
Platform Linux System i686, 2.6.32-56-generic-pae

"When the going gets weird, the weird turn pro" - Hunter S. Thompson

23. November 2011, 08:33:29

Vecanti

Posts: 1035

Originally posted by cecilia:

a friend let me know about this page:
http://www.chromeexperiments.com/detail/craftscape/?f=webgl

which has a very cool "WebGL experiment"
I tried this in Opera and FF and it was a no go.

was this sniffing or something else?



Would love to see this one working in Opera. I could only get it working in FF, not Chrome. FF Webgl is sloooow for me compared to Opera so would be cool to run this. It's reminds me of some old Amiga apps. smile

29. November 2011, 16:43:04

BtEO

Posts: 1022

Interesting news.

I misread Nokia's browser detection logic.

Pseudocode follows.
What I though the logic was:
IF browser_is_in_support_list AND browser_version_high_enough

What the logic actually is:
IF browser_is_not_in_support_list OR browser_is_in_support_list_and_version_is_high_enough

In other words, with the latest Opera 12 snapshot having implemented CORS support Nokia Maps 3D just works (few minor glitches, but entirely usable) without needed a script to evade the blocking. Opera was never blocked because of browser sniffing, Nokia feature sniffed for CORS and failed at that point; exactly how these things should be done.

Kudos Nokia.
MyOpera Community Enhancements — by xErath & BtEO
MyOpera Community Optimizations — by fearphage
Scribit improved posting tools for the MyOpera Community — by xErath
Improve Weeklies Blog — by MisterE & fearphage

6. February 2012, 17:53:27

pielover88888

-____1% of something i might maybe not make up.

Posts: 61

Yeah, i tried to find webgl beta in google maps.. I had no luck.
then again, I was lagging to china. Through-the-earth-lag. Literally kinda! it is too hard to find webgl version, and you cannot use direct links D:
So, if anyone knows why nothing is working, unless you mask, then i suppose i.. i.. will.. Sit... O_O
Im watchin u.

Tech info:
Computer: TC1100 Tablet pc
OS: Windows xp, tablet edition.
CPU: Intel, pentium m
Ghz: 1.2, single core.
RAM: 512 mb.
Internet speed: 1 mb a second, and it actually downloads at 0.23 mb a second.

Forums » Opera for Windows/Mac/Linux » Opera browser