I am able to make gradient shapes in P2D renderer (using fill and vertex) but unable to do so in default renderer. i assume it is related to opengl, anyway to make shape gradients in default renderer ?
If i use P2D renderer, i am unable to scale. i use create graphics and set the height and width. but no matter how high i set , it takes the maximum screen size as the final value of height and width
hello,
it is as you say, gradient shapes seem to be only possible using the P2D or P3D renderer. PGraphics needs to be of the same type as your renderer.
Scaling works.
->
I tried using default and P2D renderer.
First there is a difference between those two, as you noted.
i have set my screen resolution to 5k (5120x2880) and created a window with 15000x1000 pixels.
In P2D it works as expected, the display window is. 15000 pixels wide.
In default renderer I get an inexplicable width of 8100 + a few pixels.
It seems to depend on the monitor resolution. With 3200x1800 the sketch window is only 4100. This seems to be connected to the âpixels doubledâ mode of so called retina displaysâŚ
However I have not been able to deduce why the maximum window size in the default renderer is actually this particular size. Only that there is that kind of limit (which scales 2x when not using pixels doubled)
Tbh i have experienced the automatic resize message only when I tried to run a sketch on windows, I am using a Mac.
Still it seems to me that P2D is the way to go.
Apparently you can create a PGraphics buffer of the correct size. Maybe use scale() to make it fit to your current screen resolution.
But hopefully there are better informed guys in this forum than me. Which is very probable
For gradients in P2D / P3D another alternative to beginShape and per-vertex coloring is to instead use a PShader.
What is the goal with the high resolution output? Are you displaying it on an extremely large monitor / tile display / wall, or are you instead trying to save it to an image file for print, or�