HTMLViewer WebGL


I opened a topic before, but that was a little soiled (if that is a good word to use in this context?) with bad links, and I cannot seem to alter my post. Other one may be deleted.

So, I have a webgl canvas here:
Works in all major browsers.

Try to load this page in HTMLViewer: Black Canvas, nothing happens.
No difference with Native renderer or Webkit renderer.
Tried setting useragent, no difference:

  Me.UserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/601.5.26 (KHTML, like Gecko) Version/9.1.6 Safari/601.5.26"

No difference on OSX vs Windows.

anyone knows a workaround? Or a custom webbrowser control or plugin?

If I cannot get this working, I need to abandon Xojo and I don’t want that.
I want to make a feedback case, but I’m not able to (I don’t know why?)


Download the Feedback app from extras.

I did, but ‘Create New Case’ is greyed out.
Maybe because I don’t have an active license at this moment? But that would be weird, because finding a bug has nothing to do with having an active license.

I never got the feedback app working (saved at random while typing the case), but I kind of remember the ‘Create New Case’ is greyed out as long as you did not search if the case already exists.

Create new case is enabled only after you first do a search to see if the bug has not already been reported. But I don’t know about the license thing, I have been licensed for so long.

I confirm the issue, though. After the countdown the screen stays black instead of showing the picture. I gazed at the source, though. It does call external resources, that could be the issue but I am not sure, since there is not debugging tool available to know what is actually happening in the HTMLViewer DOM. Could also be a problem with the control memory.

At any rate, I am sorry, but I see no workaround. Maybe someone else with more knowledge of the inner workings of that control can offer a declare…

(>]Feedback Case 44908Thanks that works:

If any plugindeveloper is watching: I would pay good money to see a real WebControl plugin.

[quote=281801:@Mathias Maes]Thanks that works: (>]Feedback Case 44908

If any plugindeveloper is watching: I would pay good money to see a real WebControl plugin.[/quote]
Check with @Christian Schmitz MBS

The HTMLViewer in Xojo is real.

What is the problem?

On Mac you can use WKWebViewControlMBS in a 64-bit app to have more modern WebKit.

Here’s a way to turn on WebGL, code of last post at

However something else is going on in your Terrain.html. Setting WebKitWebGLEnabled true works to display but not Terrain.html.

Call enableWebGL from App.Constructor then load 3dtin in an HTMLViewer. Again sorry it doesn’t fix Terrain.html :frowning: but maybe gets you closer. Oh and this is mac only code.

[code]Sub enableWebGL(doEnable As boolean = True)

declare function NSClassFromString lib “Cocoa” (className as CFStringRef) as ptr
declare function standard lib “Foundation” selector “standardUserDefaults” (cls As Ptr) As Ptr
declare function numberWithBool lib “Foundation” selector “numberWithBool:” _
(cls As Ptr, b As boolean) As Ptr
declare sub setObject lib “Foundation” selector “setObject:forKey:” _
(id As Ptr, v As Ptr, x As CFStringRef)

dim ud As Ptr = NSClassFromString( “NSUserDefaults” )
dim sud As Ptr = standard( ud )

dim n As Ptr = NSClassFromString( “NSNumber” )
dim yes As Ptr = numberWithBool(n, doEnable)

dim key As CFStringRef = “WebKitWebGLEnabled”

setObject(sud, yes, key)

End Sub[/code]