code is simply getting pixel, no errors. if webgl is not activated getting 0 value, if webgl is activated getting wrong color value (like on image)What issue are you getting? Is it returning the wrong color or is it returning nothing?
Can you show your code?
draw_set_color(draw_getpixel(mouse_x,mouse_y));
draw_text(mouse_x,mouse_y-32,draw_getpixel(mouse_x,mouse_y));
draw_set_color(c_white);
still not working did you on html5 try? i dont think this problem about mouse coordinates.. couz of writing draw_text on same coordinate.What if you used device_mouse_x or device_mouse_x_to_gui instead of mouse_x? There's also device_mouse_raw_x so you can try that.
var xx=device_mouse_x_to_gui(0);
var yy=device_mouse_y_to_gui(0);
draw_set_color(draw_getpixel(xx,yy));
draw_text(xx,yy-32,draw_getpixel(xx,yy));
draw_set_color(c_white);
var xx=device_mouse_raw_x(0);
var yy=device_mouse_raw_y(0);
draw_set_color(draw_getpixel(xx,yy));
draw_text(xx,yy-32,draw_getpixel(xx,yy));
draw_set_color(c_white);
I know this is silly, but try using (browser_height - yy) or something similar to inverse it top down / bottom upxA GLint specifying the first horizontal pixel that is read from the lower left corner of a rectangular block of pixels.
thank you very much! its solved with room_height-yyAHoy @duran can
I remember a similar issue couple of years ago in one of my project. I wasn't using GMS at that time so this answer is a shot in the dark
Quoting: https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/readPixels
I know this is silly, but try using (browser_height - yy) or something similar to inverse it top down / bottom up
This looks like a bug. You should report this to the helpdesk.thank you very much! its solved with room_height-yy