Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / will AGK support openGL es 3.0 + ?

Author
Message
haliop
User Banned
Posted: 20th Aug 2013 19:10
im using the EnableClearColor(0) method and it dosent seem to work right on devices that have openGl es 3 and above.. am i doing something wrong?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Aug 2013 20:34
Probably not. It sounds like a possible compatibility issue.

Maybe OpenGL 3.0 changed something that worked just fine in OpenGL 2.0.

Sounds like something that TGC might need to look into.

Exactly what isn't working right?

Is it something that you can create a very simple app to demonstrate?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 20th Aug 2013 22:11
ofcourse just create a project like this: all you need to do is to disable the EnableClearColor(0) and draw some sprites on screen using DrawSprite(sprite)

and you'll see it goes wrong
also diffrent versions of OpenGl es 2.######## act diffrent with enableClearColor() ...

this really hits me hard as now i have to reconsider everything again... and Nano Project will be dead.. and i really really really really really really really really really DO NOT WANT to go on a diffrent GDK ... AppGameKit must be fixed.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 20th Aug 2013 22:56
It sounds like it is an OpenGL issue, not necessarily an AppGameKit one.

You still haven't said what is not right when it goes wrong. I am working on about 6 or 7 different things right now and don't want create new projects just to find out what the issue is. (I do not work for TGC.)

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 20th Aug 2013 23:26 Edited at: 20th Aug 2013 23:27
Paul mentioned that V2 will include the ability to render everything to an image directly, and then apply that image to a sprite to fix all of these backbuffer problems. I think you'll probably have to wait for that to fix this problem as it's simply too widespread and each device manages backbuffers in unpredictable ways.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 20th Aug 2013 23:35
Make a test project that demonstrates your issue. If you don't need media you can just post the code here. Otherwise, just zip the project and upload. I always do this myself, very effective. An example is the fastest way to get the bug fixed.

xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 20th Aug 2013 23:40 Edited at: 20th Aug 2013 23:43
The issue Haliop is describing can be seen with code such as:



On Windows, it flickers when you draw quickly (this can be resolved using manual swap techniques). On some devices including iPads and various Androids it is far more affected and distorted due to the way the buffers are managed, OpenGL version discrepancies, etc.
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Aug 2013 00:10
From the help:
Quote: "Please note that in many cases the last drawn frame will remain on screen, however, this is not guaranteed."


Seems like a known unreliable command. Only way to make sure you are not affected by a cleared backbuffer would be to draw to an image. Like you suggested.

I wonder if I can use this to get more speed out of Ouya. I have a background sprite so I don't need it to be cleared. Was searching for such a command but didn't guess that one was it.

haliop
User Banned
Posted: 21st Aug 2013 04:37
what happens is :
on some devices its wokring
on some devices enableclearcolor(0) dosent work at all...
and on opengl es 3.0 it multiply a the entire rendered screen into about 32 small screens and paste them on to the screen.

if i had no cash problem i wouldnt mind waiting until october but now.. man i'll be lucky if i'll get trough this month..

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Aug 2013 04:54
Exactly what do you mean by 'not working'? That is what I am trying to understand. What should you see that you aren't seeing? Or what are you seeing that you shouldn't?

It sounds like OpenGL 3.0 is a different issue from the others. At least it might be if I knew what wasn't working in the others.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 21st Aug 2013 04:57
ok so leaving the openGL es 3.0 devices out..

on some devices with OpenGl es 2.0 the command EnableClearColor(0) dosent work at all... there is no backbuffer rendering meaning.. nothing get drawn... Galaxy 2 , galaxy 3 , galaxy Note 2 all uses (i assume since Galaxy s4 still uses 2.0 and only the new galaxy s4 i9505 using 3.0)

so this is really really weird... cause on galaxy s1 it works... s2 ,s3 the command dosent work it looks just like EnableClearColor(1) or if there is no enableClearColor(0) at all ... but then s4 it works again..

haliop
User Banned
Posted: 21st Aug 2013 05:05
who can i conntect in AppGameKit so maybe they release just a small update with render to target ?

haliop
User Banned
Posted: 21st Aug 2013 05:06 Edited at: 21st Aug 2013 05:10
btw this is what happens when you use OpenGl es 3.0 same results on all devices:




so you can see something gets drawn so the command works..
but
instead of just pasting it one time when you call swap
it resizing everything into a very small box and then pasting everything again and again.. so i can exclude 3.0 from the project compability inisde the mainfest file.. but
still that dosenot explain why on some openGl ES 2.0 from the same brand... it works and on some it dosent...
and i know this command is not reliable.. but comeon..
its very very uneasy for me to understand whats going on when it works on old devices like a charm and some new devices like a charm but in the middle range between those... example : s1 good, s2,s3 not good but then s4 good again... and only the new s4 (openGL 3.0) not good...

haliop
User Banned
Posted: 21st Aug 2013 05:11
and btw do not use Facebook advertising... cause i get about 50 likes per day for my Nano Canvas page.. i get about 30 likes per post and everyone in my page knows (375) ppl that Nano Canvas is out.. but only 9 ppl downloaded it.. so .. 200 bucks i will never get back

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Aug 2013 05:24
Quote: "there is no backbuffer rendering meaning.. nothing get drawn"

Okay. So when it is not working, nothing is getting displayed at all, ever, no matter what the user does. Is that correct?

When I run the test code that xCept posted, on my Samsung Galaxy S III, I initially get two bands of junk separated and followed by two larger bands of black. When I touch the screen to create a box, instead of one box, I get a row of boxes in each of the black areas. If I create another one, in a different area, the first rows disappear. I am using a Player on my Samsung and v10816 AppGameKit IDE.

It runs cleanly in Windows and on my iOS Player and on non-Samsung Android Players.

Do you get the same results running xCept's code?

Quote: "btw this is what happens when you use OpenGl es 3.0 same results on all devices:"

Can you show an image of what it is supposed to look like so that we have something to compare to?

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 21st Aug 2013 05:42
no no .. sprites will be drawned but not "saved" or "cached" as they should with a render command .. so actually it saves nothing..
also i use DrawSprite() not just repositioning cause i draw about 100- 1000 - 10000 sprites per frame..

here is a picture:



so as you can see the GUI itself is created by Nano... since i had a Paint app i thought well why not create the GUI with it

everything is active if you press a button it will change colors sizes angles whatever ...

so what you see here is about 20 frames after not clearing the screen you see the colors on the left are almost full

and this is what it looks like without enableClearColor(0)...
this is the expected results in all devices that EnableClearColor(0) dosent work...



so you can really see the diffrence... both screenshots are taken about after 10 cycles from startup...

haliop
User Banned
Posted: 21st Aug 2013 05:47
again this wont be a problem if maybe open gl es 1.0 wasnt supported and all opengl es 2.0 was... but for some reason

devices with openGL eS 1.0 do support this as i tested this app on a very very old android device that uses android 2.24 something os..
maybe a bit higher then that well really old...

and if it dosent support openGL ES 3.0 then i already uploaded a new APK into Google store the removes any 3.0 devices from downloading it .. which is very bad but i can live with this for the next 2 months until render to target...

but the major problem is
that on some OpenGL ES 2.0 it works and on some it dosent
im sorry for repeating everything i just want someone from TGC to take a decent look at it since it almost got me thinking of moving to a new GDK ... which i wont do so please help.

east
11
Years of Service
User Offline
Joined: 4th Apr 2013
Location:
Posted: 21st Aug 2013 05:53
Quote: "and btw do not use Facebook advertising... cause i get about 50 likes per day for my Nano Canvas page.. i get about 30 likes per post and everyone in my page knows (375) ppl that Nano Canvas is out.. but only 9 ppl downloaded it.. so .. 200 bucks i will never get back "


Did you use Facebook mobile ads or the usual ads format? The Facebook mobile ads is shown directly on the news feed of Facebook mobile ads and lead the user directly to Google Play or App Store. From what I've heard it's very good for getting install.
https://developers.facebook.com/docs/tutorials/mobile-app-ads/
haliop
User Banned
Posted: 21st Aug 2013 07:32
haliop
User Banned
Posted: 21st Aug 2013 07:48
btw have anyone really tested EnableClearColor(0) on Iphone? Ipad? etc?

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Aug 2013 17:42
Sorry, I had left the 'office' for the day after my last post.

From your images it looks like the back buffer is periodically being cleared. Which is consistent with what I saw with the test I did.

With xCept's test on my Samsung S3, if I commented out the EnableClearColor command, the display looked correct (no garbage) and the sprite showed up in only one place. With the command uncommented, the display is garbaged up and things appear multiple times instead of once.

This sounds like we get different reactions from different devices with regards to how the front and back buffers get handled.

Can you test xCept's sample on the devices that have a problem with your app and tell me what they display? I want to see if there is any consistency in a simple sample.

The sample you showed from an OpenGL es 3.0 looks sort of similar to the kind of thing I see on my Samsung S3 (which is OpenGL es 2.0).

I tested on my iOS 6.0 iPad 2 and iPod Touch and it worked fine.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
Digital Awakening
AGK Developer
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 21st Aug 2013 21:34
What haliop is trying to achive is to not clear the backbuffer and simply use it to draw on.

I suspect GetImage() is too slow since the help mention that you should not call it every frame.

haliop
User Banned
Posted: 21st Aug 2013 22:49
yeah theres no getImage or memblocks for drawing at all...
i have bought today in a very last effort to convice the bank not to shut me down.. one Iphone 5 and one Ipad mini (latest) i will release nano for Iphone as well and hope for the best.. the problem there is that i will have to wait 60 days for the first payment..

so i guess the android version will have to wait for Render to Target which then i will also release new features Nano holds such as the Clip Editor (for music videos) and other Elements from whitin the Engine.. i just got hacked again last night woke up this morning seen all kinda crap inside my AppGameKit folder sent it to some friends who understand these stuff...

Thank you very much as always for your time and help.

Ios here i come.

Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 21st Aug 2013 23:14
Maybe you can use a MemBlock deal with the issue you are having with EnableClearColor(0) on Android.

From what I can understand, a MemBlock can be big enough to hold a 5000x5000 pixel image.

I use MemBlock to dynamically create the 'waiting' fill bar. I create an initial MemBlock big enough to hold the size of image I need and then 'draw' to the MemBlock. Next is to create an image from it and then create a sprite with that image. When the picture is updated by drawing to the Memblock, a new image is created and assigned to the sprite and the old image deleted. It might be a bit cpu intensive for your app, but it might also work.

Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master
haliop
User Banned
Posted: 22nd Aug 2013 09:40
ive already tried it but it falls to about 5 fps
then what i did is i devided it to about 10 small memblocks each with a diffrent coords of the screen.. but then it claimed up to 12 fps...
CreateImageFromMemblock is not any better then GetImage() both very slow and unusable for this project..

Login to post a reply

Server time is: 2024-05-09 06:39:53
Your offset time is: 2024-05-09 06:39:53