android - Displaying full-screen background in OpenGL -


My Android app needs to display a full screen bitmap as a background, then something on top of that display OpenGL ES (either 1.1 or 2.0 - not yet scheduled) using dynamic 3D graphics Background image is a snapshot of a webview component in the same app, so its dimension has already fully fitted on the screen.

I am new to OpenGL, but I know that to display bitmap in regular way, to scale it in the texture texture (GLTIMImage 2D), configure matrix, make some shorts for rectangular And display it glDrawArrays. It seems that a lot more work can be done to draw a bitmap on the screen in 1: 1 scale (with quality loss to down-scale the image in POT size).

"Desktop" is glDrawPixels () in GL, which is actually what is needed in this situation, but it is apparently missing in GLES. Is there a way to copy pixels to screen buffers in GLES while rejecting the 3D pipeline? Or is there any way to attract OpenGL graphics at the top of the "flat" background drawn by regular Android? Or is a transparent GLView (Renderscript-based display for RendextureView, but I can not find an equivalent for GL)?

= "post-text" itemprop = "text">

But I know that in order to display a bitmap it is scaled in the texture format (glTexImage2D)

Then your knowledge is old, modern OpenGL (version 2 and later) are okay with arbitrary image dimensions for their texture.

"Desktop" is the glodroxyx in GL, which is actually what is needed in this situation, but it is apparently missing in GLES.

OK, the modern "desktop" OpenGL, that is, version 3 core and then there are also glDrawPixels too.

Although this function was to appeal / it only provides poor performance and many pointers, that it is rarely used, whenever it is used.

Just upload your unnatural image in a texture, disable mapmapping and drag it to a full screen quad.

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -