IRC Log Viewer » #firebreath » 2012-04-17

IRC Nick Time (GMT-7) Message
bovilexic 15:04 Random question: is it possible/permissible to embed images in a Forum post? Or attach them?
taxilian 15:04 well
the forum is actually pretty useless
I don't recommend using it :-P
I'd use stackoverflow
I just haven't gotten around to taking it down
bovilexic: there are services you can use that are like pastebin but for photos; I'd use something like that
bovilexic 15:04 OK - thanks for the info :-)
taxilian 15:04 np
whats your problem?
bovilexic 16:04 Writing an OpenGL plugin. Firefox is a continual source of issues for us, including rendering artifacts. Even in the lowly MediaPlayer plugin, Firefox shows display artifacts...wanted to show a screenshot...
taxilian 16:04 yeah; the problem is that FireFox does it's own hardware rendering
so you end up with context clashes
it can be cleaned up, but it requires some fairly deep understanding of OpenGL, which I don't really have
One option is to use a windowless plugin so that you draw to an off-screen context and blit to the hDC, but that does have performance implications
bovilexic 16:04 Yeah it definitely looks like context problems (on Mac). On windows, we see crash-on-exit problems. A windowless plugin would be a potential way to go, but that extra blit could be unpleasant.
Also worse issues with 64-bit Firefox on Mac...
About the "clean up" - are you referring to FireBreath "core" code?
taxilian 16:04 oh, your issues are on mac?
that's a surprise
I was figuring windows
how are you doing the opengl?
bovilexic 16:04 Sorry to not be clear. Yes, we use the "standard code path" similar to what you see in the MediaPlayer plugin.
taxilian 16:04 so CoreAnimation?
('cause BasicMediaPlayer has examples for all the drawing models, though that's the only one that uses opengl)
bovilexic 16:04 yes.
taxilian 16:04 hmm. when you post the image send me a link; I'm curious what the issues you're having are
on Mac it probably isn't context issues
bovilexic 16:04 OK...hmm...interesting, because it looks like a gl state or context issue...
taxilian 16:04 well, I'm no expert so I won't swear to it, but the way things are isolated with a CAOpenGLLayer it doesn't seem likely
bovilexic 16:04 Indeed, if you built the MediaPlayer plugin as-is, you get really unexpected rendering.
On Safari, Google Chrome, and Opera, that little demo works just fine, and that's similar to the experience we have with our own OpenGL plugin.
It does seem hard to understand how Firefox could be affecting things in such a fashion, though...
taxilian 16:04 hmm. I've not seen that issue
bovilexic 16:04 Seems to be related to alpha blending, both in the demo/example and in our plugin. Attempts to manually set the related states to reasonable values have not helped, which is all the more confusing.
taxilian 16:04 hmm. strange. You're aware that background transparency doesn't work the same on all browsers, right?
bovilexic 16:04 Yeah - we noticed that...the artifact in the demo seems related to that, but even setting the alpha to 1 just changes the bg to black in Firefox, which simply modifies the display artifact.
taxilian 16:04 did you try doing a clear to white (or black) before you start?
bovilexic 16:04 The demo does that. In our own plugin, we render a screen-filling textured quad as the background. The artifacts we see are in rendered layers "on top of" the background (i.e. polys/textures closer to the camera).
...well, on top of that textured quad...not the window background...
taxilian 16:04 huh
I'm not sure
be aware that what is actually happening is that the CALayer you render to is basically an off-screen buffer
it gets sent cross-process to the browser, and then drawn into the browser window
so you aren't actually drawing directly to the screen
bovilexic 16:04 Yep. That's why it's so hard to understand how simply running inside Firefox could modify the appearance.
But it is rather dramatic, and quite wrong :-)
taxilian 16:04 huh. unfortunately I don't use CA much so I don't know :-/ I'd definitely try stackoverflow; put NPAPI, CoreAnimation, and OpenGL tags on it
bovilexic 16:04 And there is an effect in both the OpenGL fixed-function pipeline (the demo) and a custom GLSL shader pipeline (our plugin)
OK - thanks for the tip. I would think someone else might have noticed some issues by now...perhaps they have... :-)
I gotta run...thanks for the time :-)
taxilian 16:04 good luck