LayerBase::drawWithOpenGL

by android-newbie » Thu, 03 Dec 2009 07:21:43 GMT


Sponsored Links
 Hi

I have been looking at LayerBase::drawWithOpenGL() and trying to
figure out if the scaling being done in this function is performing a
"stretch" or "crop", but not able to figure that out yet.

Can someone please let me know if LayerBase::drawWithOpenGL() is doing
"stretching" or "cropping" for scaling operation?

Thank you so much for your help,
an

--



LayerBase::drawWithOpenGL

by Dianne Hackborn » Thu, 03 Dec 2009 08:30:53 GMT


 Hi, questions about the non-public implementation of Android should be on
android-porting; thanks.




>


Sponsored Links


Other Threads

1. OpenGL and transparent PNG's

I'm having a problem with transparent 32-bit PNG's on both the
emulator and the G1. They load fine, but I can't change their alpha
value unless the texture is fully opaque to begin with. For a simple
example:

glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

glBindTexture(GL_TEXTURE_2D, fully_opaque_texture); // all pixels are
opaque

glColor4f(1, 1, 1, 0.5);
glDrawArrays( ... ) // displays half transparency (correct)

...

glBindTexture(GL_TEXTURE_2D, transparent_texture); // some pixels are
transparent

glColor4f(1, 1, 1, 0.5);
glDrawArrays( ... ) // displays as fully opaque (wrong)

I've also tried the following (as suggested on another thread) with no
luck:

setEGLConfigChooser(8, 8, 8, 8, 0, 0);
getHolder().setFormat(android.graphics.PixelFormat.RGBA_8888);
--~--~---------~--~----~------------~-------~--~----~

2. Input Method Manager

Hi,
     Inside TextView.java, I have the following code.

InputMethodManager imm = (InputMethodManager)getContext
().getSystemService(Context.INPUT_METHOD_SERVICE);
     Log.d("tag", " fullscreenmode test: " + imm.isFullscreenMode());

and also,

InputMethodManager imm = InputMethodManager.peekInstance();
Log.d("tag", imm.isFullscreenMode());

My phone is in landscape mode. My application has an EditText. My
keyboard(virtual/soft) is not visible. I expect the above codes
(written inside TextView.java) to print false. But it prints true. How
is that possible? Any comments?

Thanks.

--~--~---------~--~----~------------~-------~--~----~

3. 3GP wrapping of AMR data

4. 1.6: Quick search box to pass parameters to an application

5. LinearLayout, specify children width in percentages?

6. USB Host/Serial Port access

7. LinearLayout, specify children width in percentages?