Android :: Opengl Es Testbed App Not Render Anything Besides A Red Screen
Apr 7, 2010
For some reason my code here (this is the entire thing) doesnt actually render anything besides a red screen..
can anyone tell me why?
CODE:.................
View 2 Replies
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
Aug 19, 2009
I've noticed that OpenGLContext is removed from 1.5. Everybody says that GLSurfaceView should be used instead. Does this mean that there is no way to render OpenGL graphics into a regular View?
View 4 Replies
View Related
Jun 29, 2010
I'm writing a game engine.
I have a little example (see http://qrcode.kaywa.com/img.php?s=8&d=http://rokonandroid.com/rd.apk), that seems to work fine on every device except Droid / Milestone.
It displays a blue screen (due to glClearColor being set to blue), and nothing more.
I have tried with/without textures, and with/without VBOs. Yet still all blue screens on Droid.
What is unique about Droid and how it handles OpenGL, and why is it doing this?
View 1 Replies
View Related
Sep 18, 2010
Question before I dive deeper into converting my current rendering system to openGL. I heard that textures needed to be in base2 sizes in order to be stored for rendering. Is this true?
My application is very tight on memory, but most of the bitmaps are not a perfect square. Does storing non-base 2 textures waste extra memory?
View 3 Replies
View Related
Nov 8, 2009
Running into REALLY interesting problems with OpenGL ES. Basically when I start my program in 1.5 or 1.6 emulator, it works just fine but on HTC Hero 1.5 it does not. The problem is that the vertices are not being rendered but the gl.glClear() command is working just fine. I followed in with the debugger and it does go into the rendering function and such but still not rendering the vertices...
Here is the code in PasteBin (easier to read: http://pastebin.com/m706686e6 )
And here is the same thing pasted here:
CODE:............
Also I got my projection set in 2D ortho projection to match screen coordinates so that's why scale to 50,50 to actually make a bit bigger. I've tried using glDrawElements and glDrawArrays and nothing on the actual phone but works perfectly fine on the actual emulator. Any ideas where I might be going wrong? Why is the actual phone not rendering the vertices like the emulator is?
View 7 Replies
View Related
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. Here's a pic showing the original texture map image, and then a screencap from my droid of the rendered textured quad. The basic colors are there, but obviously the texture isn't being read or applied correctly.
View 1 Replies
View Related
Aug 8, 2010
I'm working on a site that's supposed to scale fluently down to low resolutions, so that it would work just as well on a phone. This works well in Firefox and Chrome when I just make the window small, but when I try it out on an actual Android phone (Nexus One running Android 2.2), it renders it super-huge! (Using JS's window.innerWidth and window.innerHeight properties, it seems the viewport resolution it reports is 800x1271!.Is there a way to render the page at actual-size in the browser window so I can have my full design show up on the phone? User-agent sniffing is allowed, JS is allowed but discouraged.
View 2 Replies
View Related
Oct 7, 2010
I have follow an example of an opengl application and I don't know why is this thing happening...I have a GLSurfaceView with it's corresponding renderer drawing a triangle. But, instead of getting the whole view on screen, I have just the upper half, and it's also duplicated as you can see on the picure. I'm using a Nexus One.
View 3 Replies
View Related
Oct 23, 2009
I've just dusted off an application I did for Android half a year ago. I upgraded to the latest SDK and Eclipse ADT. After some struggeling I get the application to run again. When I debug it I can see that all the right code are executed the right way. The application shows a OpenGL surface and animates stuff on it. It used to work perfectly (I even have it running on my HTC Magic device), but in the new emulator the screen is just white?
View 11 Replies
View Related
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
Feb 25, 2009
Single Threaded OpenGL game ! (check bottom, you can download and use the helper class) Lighting disabled ! Depth Buffer disabled ! Culling enabled ! Textures disabled !
Just 176 integers (x,y values only) making 88 vertexes along with 132 index numbers making "44 triangles only"
Framerates I get is
with GL_BLENDING disabled - 145 fps approx only! enabled - 110 fps approx only!
I have the screenshot of exact code in the draw function here.. just 2 damn lines ! I have hidden only the comments.. click here to see it http://prasna991.googlepages.com/drawframe.png
variable details in the 2 lines of code =========================== ipts = 176 elements (only x and y for each vertex) totallinetriangles * 3 = 176 lineindexes = 132 elements - type "short"
Here is the screenshot of output drawing and how it will look like http://prasna991.googlepages.com/screen.png
OpenGL single threaded Initialization Helper ================================ Here is my OpenGL helper class.. makes the OpenGL initialization for newbies a cakewalk http://prasna991.googlepages.com/OpenGLHelperclass.txt
I tested by rendering on the touch event only.. frame rate drops only when u touch and drag and here I have just tested by tapping and releasing gently on the emulator and on the device
Is this the device limitations ? So graphics is actually a lot lot lot slower than on iPhone ?
View 8 Replies
View Related
Jul 24, 2010
I would like to be able to use the OpenGL API from both Java and C (via NDK).
In Java, there is a GL object passed, which has all GL methods on it.
In C, you just talk to the native library.
In a single onDrawFrame callback (for which Java is passed a GL), can I use methods on the GL object, and also call NDK methods which access the openGL library?
In other words, is the GL object just a wrapper for the same instance of the native library?
View 3 Replies
View Related
Jun 27, 2010
Can somebody take me step-by-step how to draw 2D stuff over a 3D scene (such as controls, etc.). What I've been doing so far has not been working (it only draws the 3D scene), which is (in every frame): draw the 3D scene as normal, projection matrix mode, load identity, call GLU.gluOrtho2D(gl, 0, myScreenWidthInPixels, 0, myScreenHeightInPixels), switch the array pointers (vertices and texture coords) to the ones for my 2D stuff, then drawElements with an appropriate index list. (then switch the array pointers back so the 3D stuff works again).I get nothing added to the screen (just the 3D stuff).Do I need to be doing something else for it to draw? Can somebody take me step-by-step?
View 5 Replies
View Related
Nov 2, 2009
Dear all, I want to implement the transition effect ( transparent with Z axis ) when user slip the android home to change home page. therefore, I plan to launch the new activity that is implemented by OpenGL ES to perform this effect. However, i encounter a problem that the screen/display is dark momentarily when launching the OpenGL ES activity.
View 3 Replies
View Related
Nov 10, 2010
I'm developing an Android application. I'm very new on it. I have the following classes:
class CustomGLSurfaceView extends GLSurfaceView
class CustomRenderer implements GLSurfaceView.Renderer
CustomGLSurfaceView uses CustomRenderer to render a cube on onDrawFrame method.
I've added an onTouchEvent(MotionEvent event) on CustomGLSurfaceView to manage touch events:
class CustomGLSurfaceView extends GLSurfaceView {
// For touch inputs - previous touch (x, y)
private float previousX; private float previousY;
private CustomRenderer myRenderer; public CustomGLSurfaceView(Context context) {
super(context); myRenderer = new CustomRenderer(); setRenderer(myRenderer);
} @Override public boolean onTouchEvent(MotionEvent event) {
float currentX = event.getX(); float currentY = event.getY();
switch (event.getAction()) { case MotionEvent.ACTION_MOVE:
myRenderer.handleMovement(currentY, currentY, previousX, previousY);
} // Save current x, y
previousX = currentX; previousY = currentY;
return true; // Event handled } }
May I have to modify onDrawFrame to draw something new or to rotate the cube? I thing I must do it on handleMovement.
View 1 Replies
View Related
Mar 21, 2010
How do I use gl.gluUnproject in my OpenGL ES 1.1 android app to determine what is selected when the user touches the screen?
My understanding is that the touch event results in a line and I have to find the first "thing" it intersects with.
Are there any tutorials on how to do this?
View 4 Replies
View Related
Sep 18, 2009
I've been working on a game framework for a little while, and while its far from perfect, I've put the current version online. To be honest, I haven't used much OpenGL in the past. Before last week I had never tried using it. If anyone would like to take a look, please do, I'd appreciate all the help possible on speeding it up. There are many features I have in mind and am planning at the minute, but so far it supports:
# Texture and Sprite management # Text, using TTF fonts # Organised layers # Two audio management classes, one optimized for music, the other for sound effects # Sprite dynamics (acceleration, terminal velocity, collisions) # Animation # Handlers to manage events fired through movement, animation, screen touches, accelerometer input, device shaking and collisions # Several minor features aimed at speeding development, such as screen settings and vibration.
View 1 Replies
View Related
Jun 17, 2010
I cannot render a large triangle on android,what I can see is a rectangle,just like the triangle drops a corner This is my vertex array: [-8240, -3540, 10120, -8240, -3540, -3800, -8240, 10582, 10120] and this is my code: gl.glVertexPointer(va.getComponentCount(), gl.GL_SHORT, 6, vertices); gl.glDrawArrays gl.GL_TRIANGLES, 0, 3);
View 2 Replies
View Related
Jun 1, 2009
I am using OpenGL ES and drawing a triangle strip with 4 vertices. The texture I'm drawing was loaded from a PNG using BitmapFactory.decodeStream. I'm confused as to why my images look so bad. I took a screenshot and made the following image, which shows the on-device rendering on top and the actual image on bottom:
http://n4te.com/temp/imgDiff.png
Any idea why there is a difference? I have tried a bunch of different settings but I can't keep it from looking bad.
View 2 Replies
View Related
Aug 9, 2010
I am developing a program drawing text on screen using android NDK in C native code. Could you please tell me how do I render the text?
View 4 Replies
View Related
Feb 4, 2010
I'm trying to develop a 2D game to android using opengl. I know how to print images on the screen and animate them. But in my game I have a map and a want to zoom in and out and scroll the map. But I can't figure out the best way of doing it.
View 2 Replies
View Related
May 3, 2010
I have written a object selection algorithm which picks the objects by their color. i give every object an unique color and then i just have to use the glReadPixels method to check which object was selected
this works fine and is really fast but the problem is that the frame is displayed on the screen with all the picking-colors so the screen flashes every time you select something.
so my question is: how do i write everything in the correct display buffer but dont display it on the screen to avoid these flashes?
View 3 Replies
View Related
Sep 9, 2009
Great potential development opportunity.
View 2 Replies
View Related
Dec 28, 2009
I've written a simple widget application based on the wikitionary code. When run on an wvga854 emulator, the widget view does *not* update after a call to...
View 6 Replies
View Related
Aug 25, 2009
I am trying to write an application, that would allow me to render multiple images onto an ImageView in Android. I can find the method to populate it with a sigle bitmap. But, there seems to be no way of getting two images to render in ImageView (Each occuping half the render space). Any help would be really appreciative.
View 2 Replies
View Related
Oct 30, 2010
I know you can't take a screenshot without having root access, but is there a way to render an activity and all the contents to an image file?
anyone have code to do this? it would be nice to have any dialogs, menus, etc... as well, but not required.
View 4 Replies
View Related
Jun 23, 2010
I want to use a WebView to enable dynamic loading of ads in my app. I'm currently running on a HDPI device, and images width a width of 480px are clipped/scrolled. If I use images with a size of 320px, they are zoomed in and rendered at too low a resolution.The content of the loaded WebView url is a simple web page with just an image tag wrapped in a link, as well a simple head. I've tried playing with the viewport meta-tag, but without any luck.
View 2 Replies
View Related
Apr 21, 2010
I'm using a WebViewClient that overrides shouldOverrideUrlLoading so the browsing stays inside the WebView. I initially call loadDataWithBaseURL with some HTML I have in memory, which has links in it. When I click the links, they load correctly in the webView. Everything is good up till now, but when I press back, effectively calling webView.goBack(), the webView loads the failUrl I passed to loadDataWithBaseURL. Why does it work going forward, but not going backward?
View 1 Replies
View Related
Jul 2, 2010
I am facing in Android display system(Video Rendering using Surface Flinger Native APIs).
As for my understanding, Android display system relies on Surfaceflinger library( a system wide screen composer). Surfaceflinger runs as a service along with Mediaserver service, Camera service, Audioflinger and these services interact with each other through Binder APIs at native level. If any user application wants to access SurfaceFlinger native APIs, it requires Surfaceflinger Access permissions.
My requirement is that I want to create a SurfaceView at the JAVA level (Android Application level) and render video data to that Surface, means, pass video data to the Surface flinger library by invoking native Surface Flinger APIs. But, because of Permission Problems, I am not able to invoke Native Surface Flinger APIs from Application Layer.
Is there any ways to invoke Surface Flinger Native APIs from Application Level ?
View 2 Replies
View Related