¡@

Home 

2014/10/16 ¤W¤È 08:26:04

android Programming Glossary: texture

How To Get File In Assets From Android NDK

http://stackoverflow.com/questions/13317387/how-to-get-file-in-assets-from-android-ndk

assetDir I am also using OSG. I set the image as a texture to my shader with the following code texture setImage osgDB.. image as a texture to my shader with the following code texture setImage osgDB readImageFile fileNameWithPath But that file..

Draw text in OpenGL ES (Android)

http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android

bad but the most direct approach. Render common strings to textures and simply draw those textures. This is by far the simplest.. Render common strings to textures and simply draw those textures. This is by far the simplest and fastest but the least flexible... get's harder and more challenging as you add more features texture alignment dealing with line breaks variable width fonts etc...

Android OpenGL .OBJ file loader

http://stackoverflow.com/questions/3162667/android-opengl-obj-file-loader

Optimized for speed Easy to implement Offers some sort of texture mapping support not sure if I need this haven't gotten far enough.. easily convert it into arrays for the vertices normals and texture coordinates. There's a tool which converts obj files to c header.. data there ready to render straight away it can convert texture coordinates and you don't need to worry about using it for your..

HW accelerated activity - how to get OpenGL texture size limit?

http://stackoverflow.com/questions/7428996/hw-accelerated-activity-how-to-get-opengl-texture-size-limit

accelerated activity how to get OpenGL texture size limit I'm trying to enable hw acceleration in Honeycomb.. log OpenGLRenderer Bitmap too large to be uploaded into a texture I know this is because of hw limitation and can work around.. . My question is how to easily determine max texture size available for Bitmap drawing by hardware. 2048 seems to..

Apply custom filters to camera output

http://stackoverflow.com/questions/8371055/apply-custom-filters-to-camera-output

You need GLSurfaceView where you bind camera frame as a texture in GLSurfaceView implement Camera.previewCallback so you use.. to copy the first half of the array and than you bind the texture like this gl.glGenTextures 1 cameraTexture 0 int tex cameraTexture..

Android OpenGL Texture Compression

http://stackoverflow.com/questions/9148795/android-opengl-texture-compression

some help finding information or an example of how to use texture compression for Android. I have a lot of PNG's right now and.. as I cannot find anything Thanks android opengl es textures share improve this question There are mainly four textures.. share improve this question There are mainly four textures compression types supported on Android ETC1 Ericcson texture..

Dealing with different aspect ratios in libgdx

http://stackoverflow.com/questions/9198932/dealing-with-different-aspect-ratios-in-libgdx

accuracy. For example if I had implemented touchDown on a texture resizing the screen would shift the touchListener on the texture.. resizing the screen would shift the touchListener on the texture region some pixels to the right or left depending on the resize..

Trying to draw textured triangles on device fails, but the emulator works. Why?

http://stackoverflow.com/questions/2113638/trying-to-draw-textured-triangles-on-device-fails-but-the-emulator-works-why

. Here's how I am loading my textures private void loadGLTexture GL10 gl Context context int reasource_id int texture_id Get.. sBitmapOptions Generate one texture pointer... gl.glGenTextures 1 textures texture_id ...and bind it to our array gl.glBindTexture.. 1 textures texture_id ...and bind it to our array gl.glBindTexture GL10.GL_TEXTURE_2D textures texture_id Create Nearest Filtered..

Spinning globe in Opengl-es

http://stackoverflow.com/questions/3811082/spinning-globe-in-opengl-es

wiki Sphere Vertex en.wikipedia.org wiki UV_mapping Texture coordinate http groups.google.com group android developers browse_thread..

UI API for libgdx

http://stackoverflow.com/questions/6498826/ui-api-for-libgdx

public void create final Game game super.create game TextureRegion image new TextureRegion new Texture Gdx.files.internal.. final Game game super.create game TextureRegion image new TextureRegion new Texture Gdx.files.internal Art.badlogicSmall Label.. game TextureRegion image new TextureRegion new Texture Gdx.files.internal Art.badlogicSmall Label fps new Label fps..

Limitation on texture size? Android Open GL ES 2.0

http://stackoverflow.com/questions/8573178/limitation-on-texture-size-android-open-gl-es-2-0

modify these compressed textures . From the previous link Texture compression can significantly increase the performance of your..

Android OpenGL Texture Compression

http://stackoverflow.com/questions/9148795/android-opengl-texture-compression

OpenGL Texture Compression I need some help finding information or an example.. s.contains GL_ATI_texture_compression_atitc Load ATI Textures else if s.contains GL_OES_texture_compression_S3TC s.contains.. s.contains GL_EXT_texture_compression_s3tc Use DTX Textures else Handle no texture compression founded. Load compressed..

Dealing with different aspect ratios in libgdx

http://stackoverflow.com/questions/9198932/dealing-with-different-aspect-ratios-in-libgdx

Rectangle viewport end MainGame TempMainGame public Texture splashScreen public TextureRegion splashScreenRegion public.. MainGame TempMainGame public Texture splashScreen public TextureRegion splashScreenRegion public SpriteBatch splashScreenSprite.. VIRTUAL_HEIGHT Aspect Ratio Maintenance splashScreen new Texture Gdx.files.internal images splashScreen.png splashScreenRegion..

How To Get File In Assets From Android NDK

http://stackoverflow.com/questions/13317387/how-to-get-file-in-assets-from-android-ndk

ANDROID_LOG_DEBUG Debug filename AAssetDir_close assetDir I am also using OSG. I set the image as a texture to my shader with the following code texture setImage osgDB readImageFile fileNameWithPath But that file name must include.. AAssetDir_close assetDir I am also using OSG. I set the image as a texture to my shader with the following code texture setImage osgDB readImageFile fileNameWithPath But that file name must include the absolute path as well since it is not..

Draw text in OpenGL ES (Android)

http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android

Place a TextView over your SurfaceView. This is slow and bad but the most direct approach. Render common strings to textures and simply draw those textures. This is by far the simplest and fastest but the least flexible. Roll your own text rendering.. This is slow and bad but the most direct approach. Render common strings to textures and simply draw those textures. This is by far the simplest and fastest but the least flexible. Roll your own text rendering code based on a sprite. Probably.. note that while it seems simple and basic features are it get's harder and more challenging as you add more features texture alignment dealing with line breaks variable width fonts etc. if you take this route make it as simple as you can get away..

Android OpenGL .OBJ file loader

http://stackoverflow.com/questions/3162667/android-opengl-obj-file-loader

for them. Here are my criteria Lightweight small file size Optimized for speed Easy to implement Offers some sort of texture mapping support not sure if I need this haven't gotten far enough in my coding to know if I need a library to do this or.. are still looking. Instead of loading an obj file you can easily convert it into arrays for the vertices normals and texture coordinates. There's a tool which converts obj files to c header files. You can convert the output to work with java afterwards...

HW accelerated activity - how to get OpenGL texture size limit?

http://stackoverflow.com/questions/7428996/hw-accelerated-activity-how-to-get-opengl-texture-size-limit

accelerated activity how to get OpenGL texture size limit I'm trying to enable hw acceleration in Honeycomb and display some Bitmaps on Canvas. All works fine but for.. but for large bitmaps 2048 in one dimension I get error in log OpenGLRenderer Bitmap too large to be uploaded into a texture I know this is because of hw limitation and can work around it by reducing max bitmap size to be displayed if hw acceleration.. if hw acceleration is enabled checking by View.isHardwareAccelerated . My question is how to easily determine max texture size available for Bitmap drawing by hardware. 2048 seems to be limit on my device but it may be different on different..

Apply custom filters to camera output

http://stackoverflow.com/questions/8371055/apply-custom-filters-to-camera-output

quite complicated. The other option is to use openGL ES. You need GLSurfaceView where you bind camera frame as a texture in GLSurfaceView implement Camera.previewCallback so you use onPreviewFrame same way as in regular surface . But there is.. data without colors. So on onPreviewFrame you use arraycopy to copy the first half of the array and than you bind the texture like this gl.glGenTextures 1 cameraTexture 0 int tex cameraTexture 0 gl.glBindTexture GL10.GL_TEXTURE_2D tex gl.glTexImage2D..

Android OpenGL Texture Compression

http://stackoverflow.com/questions/9148795/android-opengl-texture-compression

OpenGL Texture Compression I need some help finding information or an example of how to use texture compression for Android. I have a lot of PNG's right now and I need to reduce the amount of memory they take up. I was looking.. Could some point me in the right direction or offer some examples as I cannot find anything Thanks android opengl es textures share improve this question There are mainly four textures compression types supported on Android ETC1 Ericcson texture.. as I cannot find anything Thanks android opengl es textures share improve this question There are mainly four textures compression types supported on Android ETC1 Ericcson texture compression . This format is supported by all Android phones...

Dealing with different aspect ratios in libgdx

http://stackoverflow.com/questions/9198932/dealing-with-different-aspect-ratios-in-libgdx

but I wasn't successful to maintain them with pin point accuracy. For example if I had implemented touchDown on a texture resizing the screen would shift the touchListener on the texture region some pixels to the right or left depending on the.. For example if I had implemented touchDown on a texture resizing the screen would shift the touchListener on the texture region some pixels to the right or left depending on the resize and this was obviously undesired. Later on I came to know..

Trying to draw textured triangles on device fails, but the emulator works. Why?

http://stackoverflow.com/questions/2113638/trying-to-draw-textured-triangles-on-device-fails-but-the-emulator-works-why

under res raw so they aren't optimized per the sdk docs . Here's how I am loading my textures private void loadGLTexture GL10 gl Context context int reasource_id int texture_id Get the texture from the Android resource directory Bitmap bitmap.. BitmapFactory.decodeResource context.getResources reasource_id sBitmapOptions Generate one texture pointer... gl.glGenTextures 1 textures texture_id ...and bind it to our array gl.glBindTexture GL10.GL_TEXTURE_2D textures texture_id Create Nearest.. Generate one texture pointer... gl.glGenTextures 1 textures texture_id ...and bind it to our array gl.glBindTexture GL10.GL_TEXTURE_2D textures texture_id Create Nearest Filtered Texture gl.glTexParameterf GL10.GL_TEXTURE_2D GL10.GL_TEXTURE_MIN_FILTER..

Spinning globe in Opengl-es

http://stackoverflow.com/questions/3811082/spinning-globe-in-opengl-es

For the theory of sphere generation see en.wikipedia.org wiki Sphere Vertex en.wikipedia.org wiki UV_mapping Texture coordinate http groups.google.com group android developers browse_thread thread 0030261b82ed71e5 338fc1dcbfe6945f lnk raot..

UI API for libgdx

http://stackoverflow.com/questions/6498826/ui-api-for-libgdx

extends Screen private Stage ui private Table window @Override public void create final Game game super.create game TextureRegion image new TextureRegion new Texture Gdx.files.internal Art.badlogicSmall Label fps new Label fps Art.sSkin.getStyle.. Stage ui private Table window @Override public void create final Game game super.create game TextureRegion image new TextureRegion new Texture Gdx.files.internal Art.badlogicSmall Label fps new Label fps Art.sSkin.getStyle LabelStyle.class fps ui.. Table window @Override public void create final Game game super.create game TextureRegion image new TextureRegion new Texture Gdx.files.internal Art.badlogicSmall Label fps new Label fps Art.sSkin.getStyle LabelStyle.class fps ui new Stage Gdx.graphics.getWidth..

Limitation on texture size? Android Open GL ES 2.0

http://stackoverflow.com/questions/8573178/limitation-on-texture-size-android-open-gl-es-2-0

this improves the memory use efficiency note that you cannot modify these compressed textures . From the previous link Texture compression can significantly increase the performance of your OpenGL application by reducing memory requirements and making..

Android OpenGL Texture Compression

http://stackoverflow.com/questions/9148795/android-opengl-texture-compression

OpenGL Texture Compression I need some help finding information or an example of how to use texture compression for Android. I have a.. textures else if s.contains GL_AMD_compressed_ATC_texture s.contains GL_ATI_texture_compression_atitc Load ATI Textures else if s.contains GL_OES_texture_compression_S3TC s.contains GL_EXT_texture_compression_s3tc Use DTX Textures else.. ATI Textures else if s.contains GL_OES_texture_compression_S3TC s.contains GL_EXT_texture_compression_s3tc Use DTX Textures else Handle no texture compression founded. Load compressed texture as raw data. Use glCompressedTexImage2D instead of..

Dealing with different aspect ratios in libgdx

http://stackoverflow.com/questions/9198932/dealing-with-different-aspect-ratios-in-libgdx

VIRTUAL_WIDTH float VIRTUAL_HEIGHT private Camera camera private Rectangle viewport end MainGame TempMainGame public Texture splashScreen public TextureRegion splashScreenRegion public SpriteBatch splashScreenSprite public SplashScreen MainGame.. private Camera camera private Rectangle viewport end MainGame TempMainGame public Texture splashScreen public TextureRegion splashScreenRegion public SpriteBatch splashScreenSprite public SplashScreen MainGame maingame TempMainGame maingame.. public void show camera new OrthographicCamera VIRTUAL_WIDTH VIRTUAL_HEIGHT Aspect Ratio Maintenance splashScreen new Texture Gdx.files.internal images splashScreen.png splashScreenRegion new TextureRegion splashScreen 0 0 640 480 splashScreenSprite..