OpenGL problems with ARC (Android apps on Chrome) - google-chrome-arc

We are seeing a lot of OpenGL problems with our Android app running under ARC on either Chrome on the desktop or on Chromebook.
We use OpenGL ES1 for our drawing. This same code works fine on iOS, Android and Mac. However when running under ARC we see blank rectangles where our text should be. Other drawing comes out at a vastly wrong scale. There are lots of obscure OpenGL errors in the Logcat.
Are others having these problems? I was wondering if it was because we are still using OpenGL ES1.

ARC is still in Beta so I wouldn't expect things to run flawlessly. Try updating your graphics drivers. That should do the trick.
[https://downloadcenter.intel.com/search?keyword=2nd+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+with+Intel%C2%AE+HD+Graphics+3000%2F2000][1]

Related

Minmizing OpenGL app while preserving EGL Context results in HUGE PROBLEM

I'm using opengl es 3.0 API with the android studio ndk to create apps.
But I've encountered a very huge problem. I've created a demo app, all it does it change the background color of the screen from white to black and vice versa, every frame. And so when I go to minimize this app, I still see it rendering the background, mostly at the edges of the screen, and not in full color but still very strongly apparent. And it doesn't go away when I close the app, when I restart the device, or when I run "kill apps" on it. Only a factory data reset fixes the issue, so it's not easy for me to debug this.
This is the relevant code that I'm using for when the app is minimized and receives the APP_CMD_TERMINATE event:
eglMakeCurrent(engine->display,EGL_NO_SURFACE,EGL_NO_SURFACE,EGL_NO_CONTEXT);
eglDestroySurface(engine->display,engine->surface);
engine->display = EGL_NO_DISPLAY;
engine->surface = EGL_NO_SURFACE;
I've error checked that eglDestroySurface() is successful.
And I've put debugging messages in to make sure that the main draw loop is NOT executing when the app is minimized. But the problem persists and I don't know what to do about it. Thanks for any help.
UPDATE: well, no one has responded, and I still don't know what to do. Could it be related to threads?
UPDATE: Still can't determine what it is, but for some reason it's messing with the System UI. Willing to upload my entire source code somewhere if someone would be willing to go through this with me, as I'd really like to be able to continue working on my game engine.
Is it the "Strict Mode" developer option on the device settings, perhaps?
That one flashes the screen if an app is blocking.
It would explain why a factory reset changes behaviour.
The answer is not a solution here. The above comment by the user columbo was correct.
I've demoed switching from black to white at high framerates on 3 different android devices, and also my Linux Desktop, all via the openGL api, and it has exhibited this issue on all the devices. So what he said must be correct: this is a problem with LCD monitor technology itself. Interestingly, doing completely random colors does not cause this problem.

ThreeJS mobile device-orientation: Chrome gets laggy, opening Firefox fixes it

I have a mobile ThreeJS scene based on device orientation that goes quite good on Android devices (55 fps). After some time performance starts to drop badly, but this is not reflected in the FPS, only in the smoothness of the device orientation detection. And only here, because if I leave the phone on a desk (so device orientation doesn´t play any role) the rest of the code works fine and smooth as expected.
I noticed that closing the browser or even restarting the device doesn´t fix the lack of smoothness. In a moment of dispair, I tried the same script on Firefox mobile, and it was smooth. Going back to Chrome, the problem seemed to be fixed (!).
So every time Chrome gets this lag, I open Firefox to solve it, the weirdest thing. What is happening here? How can I prevent it? Also how can be possible that the fps continue being so high but the device orientation goes so laggy?
If I remember well, this started to happen after using layers on my code (combined with the StereoEffect I was already using). Does this have any sense for anybody? I´m sooo stuck on this.. Any clue will be appreciated.

Getting same color output on iOS Simulator versus Quartz drawing in Mac app

I have a PDF that seems to have some internal color profile attached. If I render this in iPhone simulator the colors come out as they look in Photoshop which apparently can parse this color profile. If I render the same PDF on Mac I get the same colors (less bright, muddy) as in Preview and Pixelmator.
Is there some way how I can achieve the same (correct) rendering result on Mac as I was getting in iPhone simulator?
On iOS Simulator, I used CGColorSpaceCreateDeviceRGB with a kCGImageAlphaPremultipliedFirst bitmap context. I also set rendering intent kCGRenderingIntentPerceptual, though I don't know if this makes any difference.
on Mac I tried the same settings, as well as all the different kinds of color spaces, but I'm never able to achieve the same result us in Simulator.
I also tried the two ICC based approaches mentioned here: http://developer.apple.com/library/mac/#qa/qa1396/_index.html
I'm getting desperate. What is different between iOS simulator which gets the colors right and Mac? I thought iOS doesn't do color correction, but Mac does? Right now I am drawing the individual pages with PDFKit. Is there a difference in PDFKit on Mac versus iOS related to color correction that makes it work properly on iOS Simulator, but fails on Mac?
I also took a JPG that was rendered from this PDF in iOS Simulator, put it into a new PDF in Preview and there preview and my Mac rendering yielded exactly the same colors as the input.
It looks to me like iOS Simulator has a magical ability to use a color profile embedded in this PDF which Preview or Quartz on Mac does not.
Please help!
kind regards
Oliver Drobnik
I don't know exactly how simulator works, but I can assure you that both Preview and iOS have very incorrect handling of certain features of PDF files; especially when it comes to color management, transparency, overprint, advanced compression of images etc...
Two tips:
On Mac, open the PDF file in Adobe Reader (free download from Adobe.com). The color you see in Reader should be very close to the actual truth. If your PDF file contains ICC profiles (for objects in the file or in the output intent, meaning for the whole file) it will be used correctly. On iOS, also look at Adobe Reader - it currently is the best (highest quality) display tool on that platform.
Secondly, if you want to know what the simulator or some other tool can or cannot do, have a look at the test patches from the GWG (http://gwg.org/ghentoutputsuite.phtml). These patches were designed to give very easy to interpret results on whether certain tools or printers can handle specific PDF features.
These two steps should at least tell you what works and where it works. That should make it easier to figure out what you need to correct.
Unfortunately this is a confirmed bug in CGPDF on Mac. It manifests itself if you have CMYK as a transparency color space. iOS ignores this correctly, the Mac messes up the colors.

Fullscreen Cocoa app retina support

I'm developing a screenshot application working in fullscreen mode. I have a bug report about issues with MBP Retina, but I have no idea how to test and fix them. It looks like QuartzDebug can change displays to HiDPI mode, but I'm not sure that will do the trick. Can't find any "Retina Emultaion" related topics in Apple docs.
So my question is how can I test app (not just icons, but whole fullscreen application) for being compatible with retina display without buying one.
It's actually all in the Apple docs, though slightly hard to find: Testing High Resolution Content.
I'll sum it up for you: you should always test on a real device (or go to the Apple Store and put your application on to one of their demo retinas). But as an intermediate step, emulating the retina works too.
Quartz Debug's HiDPI mode works for this, and is a method Apple delineates as one to test with. You can also tint high resolution images using the command (in Terminal)
defaults write -g CGContextHighlight2xScaledImages YES

Silverlight 5: 3D with XNA on Macintosh

I have acutaly access to an closed beta of an online application developed with silverlight 5. Within there's a feature, showing some 3D scenes. There have been used XNA for the 3D. From a windows-pc all work fine. But when I test it from an Mac with OSX the Silverlight-App works fine, too. But not the 3D feature. In upper left corner there's a information showing: "Render Mode: Unavailable" and "Reason: "Not3DCapable".
So I pushed this example to my IIS. This time from Windows all is fine but when trying to access from OSX (Firefox) it starts to load Silverlight but after showing 100% nothing happens. The scene is not shown.
Does anyone has any clue, what to do to support mac?
Unfortunately I found some other websites like this Blog (see the 3. FAQ) and this Blog (see comments) whose say the same: 3D doesn't work on mac.
Sadly Microsoft seems to keep this fact officially secret. Found this Page where I had expected to read something like "3D not supported". Isn't this sad? I thought Silverlight should be platform independent? I hope they will change their mind and add a support for OpenGL or something like that.

Resources