GETPIXEL on Pandora always returns zero

Previous topic - Next topic

Ian Price

Hi Gernot

While porting Guru Logic to the Pandora I discovered that the GETPIXEL command (in GLB v10.283) always returned zero.

The code below works fine on pc (and Pandora), however pc version correctly returns different values when moving the cursor over different colours - the Pandora always returns zero.

Code (glbasic) Select

SETSCREEN 800,480,0

CREATESCREEN 1,999,800,480

USESCREEN 1

FOR n=0 TO 1000
DRAWRECT RND(800),RND(480),RND(64),RND(64),RGB(RND(255),RND(255),RND(255))
NEXT

USESCREEN -1

LOCAL mx,my,b1,b2, pixel

WHILE TRUE

MOUSESTATE mx,my,b1,b2

DRAWSPRITE 999,0,0

pixel=GETPIXEL (mx,my)

PRINT "PIXEL "+pixel,10,10

DRAWLINE mx-10,my,mx+10,my,RGB(255,255,255)
DRAWLINE mx,my-10,mx,my+10,RGB(255,255,255)

SHOWSCREEN

WEND
I came. I saw. I played.

Ian Price

#1
This is still true in GLB v12.096 two years later. :(

Other Pandora bugs include virtual screen not working (in fact using SETSCREEN XX to a virtual one crashes the app) and GRABSPRITE not grabbing anything. I believe from reports from erico that this is also true on the Mac.

[EDIT] It would appear that SPRITE2MEM is also borked. :(
I came. I saw. I played.

S.O.P.M.

Gah! Fortunately I don't use the Open Pandora since a long time - the performance was never too good on this device. Please don't get me wrong but I'm absolute for it to cancel the support for some platforms to clean up GLBasic for the future. GLBasic is already quite overloaded and the more it supports the more sources of error are there. All these platforms can never be perfectly supported simultaneously. So keep Win, Linux, iOS, Android, HTML5 but throw out most of the rest.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

#3
QuoteSo keep Win, Linux, iOS, Android, HTML5 but throw out most of the rest.
Thankfully, it's not your decision.

Performance on the Pandora can be extremely good, as on the GP2x, Wiz and Caanoo - you've just got to work to there specs. I've released over 30 apps on these systems, and all have been very well received, proving GLB's strengths.

I have no interest in iOS, HTML and general Android devices (at this time), so should I suggest that Gernot drops these platforms?

The Pandora et al, might be in limited numbers and have very little support (from GLB users), but the problems affecting the Pandora are the same problems affecting other devices - eg Mac, which is not a limited device.

Most of these commands used to work, but now they don't. Something broke within the last couple of updates.
I came. I saw. I played.

Kitty Hello

Or maybe the new pandora drivers? I will have to dig into this. And it sounds like a lot of work :(

Gesendet von meinem GT-N7100 mit Tapatalk


spacefractal

the most important bug, if you ask me is the virtual screen bug on the Mac (which also effect few other platforms as well). Propety its seen its a similar bug like this one. Im do newer have used extractly this command at all here.

Personal im do not have problems with those minor platforms at all, and for me no need to remove them at all, even some commands might been bugged out and even have found few issues my self, but herer im choiced to do workaround them instead as much as im can (im wont post them here to avoid offtype).

Also right now bug fixing is really more important adding other platforms for v13 (a major bug fixing release), if you ask me, inclusive this GETPIXEL issue (which also can effect some other platforms too, property on Mac too).
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

S.O.P.M.

Quote from: GernotOr maybe the new pandora drivers? I will have to dig into this. And it sounds like a lot of work :(

This is exactly what I'm afraid of...

Even these niches-platforms let GLBasic development become a running the gauntlet. Not that I wouldn't have confidence in Gernot's capability. It's just that I would love to see GLBasic's future to be ensured.

Please excuse myself for this, I simply couldn't resist to express discontent. Enough from my part here.
Notebook PC Samsung E372 Core i5 @ 2,6 GHz; 4 GB RAM; Win 7 Home Premium

Ian Price

Indeed, it could be new Pandora drivers. And I've generally worked around issues on all platforms, but sometimes it's just not possible or practical or just plain time consuming to get the same results via alternative methods.

Obviously, I'm not expecting Gernot to waste his valuable time specifically on the Pandora, but when a couple of commands aren't working on a couple of platforms, there may well be some common ground which might have a positive outcome on all affected platforms.
I came. I saw. I played.

erico

The virtual screen issue seema to spread through pandora mac and linux. I will be able to be sure about linux soon. Caanoo im not sure either but will test that as well.

Kitty Hello

CREATESCREEN does not work on the Mac you say? I do have to test that, but I'm almost certain that I used it.

erico

I use a combination of CREATESCREEN, SETSCREEN and USESCREEN. I think the problem is on the later command.
I don´t wanna hijack this thread, so I will make a newer one later with proper code.

Ian Price

Yep, it seems to be USESCREEN that's crashing the app on Pandora, so it's not possible to tell really if CREATESCREEN is working; it might be, but you can't access it :P
I came. I saw. I played.

erico

Could the issues of GETPIXEL also be because it is trying to get pixels from a non existent screen from the buggy USESCREEN?

Ian Price

Nope, because you don't need to USESCREEN to use GETPIXEL; you can do that on the physical screen.
I came. I saw. I played.