Is gl auto execute GL.clearColor every frame

i use enterframe to draw something

at firsttime i execute GL.clearColor myself
then draw a image at frame1
then draw a image at frame2

so i draw all thing at two frame time
loop and loop like this

but i find GL.clearColor must be execute every frame

is A bug?

Are you using an OpenGLView?

If not, I would recommend that use something like sprite.opaqueBackground = 0xFF0000; or perhaps you could use sprite.graphics.beginFill (0xFF0000); sprite.graphics.drawRect (0, 0, 100, 100);

Both of these would preserve a solid background color for an object, and would be retained between frames (and would be compatible on non-GL targets)

i use openfl.display.OpenGLView

i want find a solution
like BitmapData i can draw other bitmapdata to this,if i want clear i just use fillRect function

the OpenGLView auto clear every frame ,but i’m not use GL.clear function .

Yeah, I believe that is occurring as a part of the OpenFL renderer at the moment. In order to have full control over the commands used, you would be looking at Lime, or something else lower level. Otherwise, you should be able to set the color and clear each frame, I don’t know that it would be very expensive