Android :: How To Texture Map Onto A Curved Surface?

Oct 17, 2010

I'm attempting to create a 3d game using OpenGL. I have a very basic world and am now working on a character. I want to map a texture to the head which will be oval shaped. How do I do the mapping? I know how to map to flat surface. I'm wondering if the normals can be used to help but I've never done this before and when I search Google I don't have any luck. I'm planning on doing this all programmatically and not using Blender or Maya if that makes any difference.

Android :: How to texture map onto a curved surface?


Droid :: How To Create Blur Surface From Android.view.Surface?

Jan 22, 2009

How do I create blur surface from android.view.Surface?

View 2 Replies View Related

Android :: Curved Graphics In OpenGL ES

Aug 18, 2009

I was disappointed to discover that OpenGL ES, the flavor of OpenGL implemented in Adroid, doesn't appear to support the usual techniques for drawing graphics involving curves. I'd be happy with either OpenGL's low-level Bezier evaluators, or the more advanced NURBS approach, but AFAICS neither is supported - only straight-line graphics are possible. Does anyone know, am I missing something basic here? Is there a way to generate curves of any sort in Android's OpenGL implementation? I am still fairly new to Android development, so that's certainly possible. Note that I'm not talking about functions related to Canvas - I know about drawOval, for example - but I specifically need 3D.

View 2 Replies View Related

Android :: Possibility Of A Curved Gallery

Sep 19, 2010

Is it possible to change the default arrangement of the Android Gallery? What i meant is can we make the Gallery in a curved path, where the images will be along the curved path and the same time it has all the properties of the Android gallery(which appears to be center locked and horizontal right now..)?

View 4 Replies View Related

Android :: Place Imageviews Along A Curved Path

Sep 16, 2010

I am trying to develop a custom gallery like application in which, i would like to place Image views along an elliptical path whose size varies with position.

View 1 Replies View Related

Android :: Using Surface In The Native Code

Feb 3, 2010

I am planning to write a video player application and I am planning to use the gstreamer on the native side. I am trying to use the SurfaceFlinger for the rendering part. For this I have written a test program to experiment on the rendering part. I am using the surface flinger wrapper from the project

http://gitorious.org/rowboat/external-gst-plugins-android

But the following ERROR occurs when we try to run the .apk.

CODE:.......

The I changed the permission for "android.permission.ACCESS_SURFACE_FLINGER" in frameworks/base/core/ res/AndroidManifest.xml to "dangerous" and recompiled. But got the same error.

Then I commented out the "checkCallingPermission" method in IServiceManager.cpp and recompiled. Then also i got the same error.

View 4 Replies View Related

Android :: Multiple Surface Views

May 20, 2010

I am working on a graphics application in Android. I have a question regarding MULTIPLE SURFACE VIEWS. Can I be rendering multiple surface views at the same time. Initially, when I had two surface views in the same activity, it didn't seem to work, as it used to show only one at any time. But, with one surface view attached to one activity, is there any way I can keep the background activity's Surface View alive so that both the surfaces get rendered together?

View 2 Replies View Related

Android :: How To Set Kind Of Surface Format?

Dec 27, 2009

Looking the doc with class SurfaceHolder is possible set the kind of surface format. I need to show images YCbCr_420_SP format. If I set YCbCr_420_SP format is not clear after how I can set the data. With Canvas object I can draw only bitmap format and not YCbCr_420_SP. Then my question is : can I draw directly on surface using YCbCr_420_SP data ? how ?

View 2 Replies View Related

Android :: How To Add Image On Surface View?

Aug 29, 2009

I am trying to add an image on surface view. I have coded...

View 5 Replies View Related

Android :: Basic OpenGL ES Texture

Jun 29, 2010

I'm having great difficulty getting basic textures to work in an OpenGL ES app on my Droid (2.1-update1). I trying to render a simple textured quad - four vertices, two faces, with normals and texture coords. When rendered, the texture is garbled and full of static, similar to TV noise. The basic colors from the texture map are there, but obviously the texture isn't being read or applied correctly. My texture load sequence is simple : int[] textures = new int[1]; gl.glGenTextures(1, textures, 0); Bitmap bmp = BitmapFactory.decodeResource(cx.getResources(), R.drawable.img); gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0);...

View 2 Replies View Related

Android :: OpenGL Texture Corrupted?

Aug 11, 2009

I took the source from API demos (TriangleRenderer.java) Here's the code on how textures are loaded in onSurfaceCreated():.....................

View 3 Replies View Related

Android :: OpenGL Texture Scaling

Feb 18, 2010

I have a texture with 8 equally sized stripes that I am using as a wall with OpenGL. On my Nexus One it scales it properly However, in emulators and on a G1 (and probably on other hardware), it does not scale properly, as the stripes remain the same width, while the height scales as it should. Is there an option that I need to set that is set to default on my nexus one but not on other platforms?

View 3 Replies View Related

Android :: Transparent Texture In OpenGL ES

Mar 2, 2010

I'm trying to set the transparency of a texture on a quad in opengl, playing with the blend functions didn't help neither did anything on google.

View 2 Replies View Related

Android :: OpenGL - ES Texture Bleeding

Oct 18, 2010

I am writing a small app that at the moment generates a random map of textures. I am drawing this map as a 10 x 15 group of "quads" which are infact all triangle strips. I use the "map" to grab an int which I then take as the location of the texture for this square in the textureAtlas. so for example 0 is the bottom left "tile". The atlas is 128 x 128 and split into 32 pixel tiles.

However I seem to be getting some odd artifacts where the texture from the one tile is creeping in to the next tile. I wondered if it was the image itself but as far as I can tell the pixels are exactly where they should be. I then looked at the texture coords I was specifying but they all look exact (0.0, 0.25, 0.5, 0.75, 1.0 - splitting it into the 4 rows and columns I would expect). The odd thing is if I run it on the emulator I do not get any artifacts.

Is there a setting I am missing which would cause bleeding of 1 pixel? It seemed to only be vertical too - this could be related to on the phone I am "stretching" the image in that direction as the phone's screen is larger than normal in that direction..............

View 1 Replies View Related

Android :: OpenGL Texture And GlDrawTexfOES

Nov 10, 2010

The following is piece of code in which I'm trying to draw 3 pieces of my background using glDrawTexfOES. The 3 pieces should look like green grass.

public void onDrawFrame(GL10 gl) {

gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();

gl.glFrontFace(GL10.GL_CW);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
gl.glEnable(GL10.GL_TEXTURE_2D);

gl.glBindTexture(GL10.GL_TEXTURE_2D, grass);

gl.glColor4x(0x10000, 0x00000, 0x10000, 0x10000);

((GL11Ext) gl).glDrawTexfOES(0.0f, 0.0f, -8.0f, 32, 32);
((GL11Ext) gl).glDrawTexfOES(32.0f, 0.0f, -8.0f, 32, 32);
((GL11Ext) gl).glDrawTexfOES(64.0f, 0.0f, -8.0f, 32, 32);
}

why my textures won't display correctly would be most appreciated! On a related note, for building a simple 2D tiled game is glDrawTexfOES the most efficient method for generating the tiled background?

View 1 Replies View Related

Android :: Cupcake 1.5 R1 Surface Created Is Not Called

Apr 28, 2009

I've created game, everything works fine on all previous android versions except current cupcake 1.5. It works even on cupcake pre release.I'm using exact the same build.xml, sources and resources. The problem is that surfaceCreated is not called : SurfaceHolder mSurfaceHolder = getHolder(); mSurfaceHolder. addCall back(this); setFocusable(true); WaitForScreen(); - here I untill surfaceCreated change variable that it's ready,but it's never called. I just can explain that I'm running SurfaceView activity after stopping regular View activity (for the game menu - it was easier to create it). Please help me if you can figure out something. I'm just a developer not a Android engine tester. If they are putting such stuff to the market they should test it a little bit (not talking about discovered VM crashes instead of exceptions).

View 4 Replies View Related

Android :: Render String To Texture And OpenGL ES

Apr 8, 2010

I've googled around everywhere, but cannot find much for rendering strings to textures and then displaying that texture on a quad on the screen. Can someone provide a run-down on the process or provide good resources that describe how? Is rendering strings to textures even the best method for displaying text in an Android OpenGL ES app?

Okay, so LabelMaker interferes with alpha blending, the texture (created from a PNG with a transparent background) now has a solid black background, rather than a transparent background. If I comment out all the LabelMaker-related code, it works fine.

UPDATE:
Nevermind. I took a look at the code to find that LabelMaker was disabling blending after drawing the labels.

View 1 Replies View Related

Android :: How To Texture White Square In Phone?

Aug 7, 2010

Alright, so I've got this OpenGL tutorial I'm basing from, my current code is equivalent to Part II of it, which is here:
http://blog.jayway.com/2009/12/04/opengl-es-tutorial-for-android-%E2%80%93-part-ii-building-a-polygon/
The code for that can be downloaded near the bottom of the page. It leaves you with a white square, and I want to apply a texture to it, which this tutorial series doesn't cover. I can't figure out how to texture my white square, in Android.

View 1 Replies View Related

Android :: Create 1024x1024 Texture In OpenGL

Dec 27, 2009

I'm trying to create a 1024x1024 texture in OpenGL. I'm trying to do this with Bitmap bmp = Bitmap.createBitmap(1024, 1024, Bitmap.Config.ARGB_8888); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bmp, 0); But I can't actually create a 1024x1024 Bitmap - I get an out of memory exception.

I want to generate the texture, then use texSubImage2D to copy on various smaller bitmaps, but it seems that I need to somehow define that the texture is 1024x1024 before I can do that. Is there a function that lets me define the size/argb settings without just copying in a blank bitmap?

View 6 Replies View Related

Android :: OpenGL - Threading Texture Loading

Aug 27, 2009

I'm converting an app I've written from Canvas to OpenGL, and not having too hard of a time yet. However, I've run into one snag that I can't seem to get around. My old app was threading image loads, because there are a ton of them, however, it looks like the OpenGL implementation protects itself to a single thread. I have a basic loadBitmap() function as follows:...............

View 4 Replies View Related

Android :: OpenGL Texture Wrapping Flickers?

Jul 6, 2010

I'm drawing 5 rectangles with OpenGL. They are texture mapped, and use the following parameters/binding:

..................

When I start the activity, the shapes all flash as if the textures were supposed to wrap (ie, i see more than one texture per shape), then the screen quickly corrects itself. Is there some manual buffering I'm supposed to do while the textures get mapped and unwrapped?

View 2 Replies View Related

Android :: Easiest Way To Draw Texture With OpenGL ES?

Feb 6, 2010

the draw_texture function is the fastest and VBO is 2nd faster. But I don't understand how to use it(the draw_texture method or the VBO way).

View 2 Replies View Related

Android :: OpenGL ES Texture Mapping Very Slow?

May 5, 2010

I have an Android application that displays VGA (640x480) frames using OpenGL ES. The application reads each frame from a movie file and updates the texture accordingly. My problem is that, it is taking almost 30 ms. to draw each frame using OpenGL. Similar test using the Canvas/drawBitmap was around 6 ms on the same device. I'm following the same OpenGL calls that VLC Media Player is using, so I'm assuming that those are optimized for this purpose.

View 1 Replies View Related

Android :: Move Particular Texture Around Screen Using Opengl Es?

Feb 9, 2010

I am very new to OpenGL ES. I am implementing some demo app to load multiple textures on the screen. For demo purpose I have loaded 2 textures in 2 different locations on the screen using glTranslatef() and glBindTextures() twice. Now I am able to see 2 different images on the screen. Now I want to move one particular texture across the screen using mouse.

View 2 Replies View Related

Android :: Want To Load A Texture Through Glteximage2d / Buffers

Dec 8, 2009

for all those gl*Pointer functions you need to create bytebuffers through ByteBuffer.allocatedirect. when you want to load a texture through glteximage2d you need to supply a bytebuffer, too. can this be a "normal" bytebuffer or do I have to create this one too via allocatedirect?

View 2 Replies View Related

Android : Use An Index Buffer With A Texture In OpenGL ES?

Sep 21, 2009

I'm using OpenGL ES to display some objects exported from Blender. Blender provides a list of vertices, a list of the face indices and a list of the 2d texture co-ordinates. Within Blender, and I believe generally in OpenGL, the texture co-ordinates map to each vertex described in the index array.

I suppose I have two questions:

I'm given to understand(see the "Applying Textures" section) that in OpenGL ES the texture co-ordinates map to the vertex buffer only, not the index buffer. Is this the case or is there a way of binding the texture co-ords to the index buffer instead?
If the above is true, is there anything to be gained from using an index buffer at all? After all to properly map the textures one will need to write out the vertex buffer with all the redundancy that would have been saved with the index buffer. Is there still a performance increase to be gained or are index buffers redundant for textured data?

View 1 Replies View Related

Android OpenGL Live Wallpaper Texture

Jul 9, 2012

I'm having a problem with textures in my live wallpaper. I think its something I'm doing or not doing in blender when I bake my UV images... I get the app running just fine. But the textures are scrambled up on my model in the live wallpaper app... Here's a tester live wallpaper I built to show the problem I'm having... Three UV sphere the top one is post to be blue, the middle green, and the bottom is red inside blender. But after baking, this is what they turn out like in my live wallpaper... Here's a link to snap shots to the live wallpaper with the three sphere's..URL....

View 9 Replies View Related

Android :: Possible To Start Surface View With Game Thread

Aug 7, 2010

I've read several example programs and tutorials to try and solve my problem but they all seem to go the same way. I've used a couple Activities and xml documents to create a menu that loads when my game starts.When the user clicks the "Start The Game" button, it loads a new Activity that sets the view with my game thread and all of the game properties.I know this activity works because I've run it alone as its own project, but every way I've tried to start it after the Menu,I get a nullPointerException and it force closes.I read the SurfaceViewOverlay tutorial and attempted to use that implementation, but I'm using a SurfaceView, not a GLSurfaceView.I'm debating rewriting my entire program to use OpenGL but I figured I would see if anyone else knows what I'm doing wrong here.If you need the code snippets I can paste some here, but it's not really the specific code that's wrong.

View 1 Replies View Related

Android :: How To Push Screen To Background, Without Destroying The Surface?

Apr 26, 2010

I want to hide my app screen and then when the user clicks on the app again, I want to bring it to the foreground , but I want the app to maintain the screen that was pushed to background. Is there any way to do that right now?.Because when I try to hide my app, the surface of my app is gettng destroyed and so when I try to relaunch the app a new surface is created and my app status is changing.

View 2 Replies View Related

Android :: Building Drawable Images To Use On Surface Canvas

Sep 28, 2010

I have some images (.png format) that I use as drawables on the surface of canvas in my android app. The problem I have is mspaint only allows a rectangular image file, so whatever I draw on the screen always shows up in a box. Is there a (free) program or way I can edit the png files so that when they are drawn on the surface of my canvas, they are drawn to shape?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved