Can't Get Lighting In OpenGL Right

Nov 11, 2011

I have problems to put the light positioning in the right place.

When I position the light after glClear and glLoadIdentity as in the code example I have produced and added to this message, there is a flicker like never seen before.

If I on the other hand only set the light position once (in the ), sometimes when I run my app, the scene becomes unlit.

Can't get lighting in openGL right


Android :: OpenGL Speed Issue - Code Contribution To Other OpenGL

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

Android :: NDK OpenGL - Mixing Java And Native - C - Calls To OpenGL API

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

App To Control LED Lighting?

Apr 21, 2014

I am looking to make modifications to this application:

https:[url]....

The app is used to control LED lighting, but looks really basic.

I am also wondering if it is possible to set sleep timers and wake up alarms on the app (or would this be hardware related)?

View 3 Replies View Related

HTC EVO 4G :: Soft Keys Not Lighting Up

Jun 9, 2010

My issue is the soft keys don't light up most of the time. Are there settings for these? Does anyone know if there if anyone else having this issue?

View 3 Replies View Related

HTC Incredible :: Buttons Randomly Lighting Up

Jul 29, 2010

I noticed earlier that my Home, Menu, Back, and Search buttons decided to start lighting up randomly. It did this on and off for a few minutes. Anyone else seen this happen to their Incredible? Do you think it's an application? Because there were no actual notifications or alerts at the time. This isn't the first time I've seen this happen either. . .

View 13 Replies View Related

Samsung Moment :: Info On Lighting 2.5 ROM

Jun 9, 2010

Anyone know where to find info about this?

View 13 Replies View Related

Samsung Moment :: Screen Keeps Lighting Up

Apr 1, 2010

So I got the Samsung Moment last Friday and brought it home. After changing the background and getting some random apps (barcode scanner, discovery, zedge, bbc), I noticed the screen kept lighting up randomly 8 to 10 times in a row. Luckily for me, a drunk man smashed my brand new Moment the Sunday after I got it so Asurion sent me another one the next day. The new one does the exact same thing and I want to smash it (even sober). Anyone running into this? I've read on some blogs that people had the same problems when they upgraded.The keyboard sold me on this phone but if this is going to keep happening I'm getting a new one.

View 17 Replies View Related

HTC Desire :: Lighting Up When Message Or Calling?

Apr 22, 2010

When i receive a message my phone doesnt light up, i just get my ringtone/vibration and the little green light. is thier anyway of getting the phone to light up apart from me clicking the lock key at the top, Also when i make a phone call it goes black, how do i chance the Backlight is it to stay on?

View 3 Replies View Related

HTC EVO 4G :: Text Notifications Not Lighting Up Screen / Fix This?

Jun 8, 2010

When I first got my phone, my text messages would light up the phone when they came in.. Now, it only makes a sound and then the notification light flashes. I hate having to turn the phone on to view the messages. Anyone know how to fix this?

View 2 Replies View Related

HTC Droid Eris :: Phone Not Charging / LED Is Not Lighting Up

Jul 25, 2010

I got home from a trip today, where my phone had been sitting at a low charge for a bit. I managed to get it a high enough charge to hold out, but it died by the time I was in my house and hooked it up to the charged. The Amber LED is not lighting up like it is charging, which has me worried. I have switched between different USB cables, and also from the wall to a USB. Is it normal for the LED to not light up if the battery is absolutely drained? Also, any USB mini cable should work, correct?

View 5 Replies View Related

Motorola Droid X :: Buttons Not Lighting Up After Power Off / On

Jul 22, 2010

if i turn the power off/on the 4 buttons under the screen don't light up at all.even when using them.if i lock and unlock the phone, they start working normally again.

View 8 Replies View Related

Android :: OpenGLES Lighting - Should Not Change Position

Oct 7, 2010

I'm writing a little 3D engine for android to better learn the platform and opengl. I hope to eventually use it as a base for little 3D games.

I'm trying to implement lighting right now, and generally following the NeHe opengl android port tutorials. I have a simple spinning cube and 1 light that should not change position. Upon rendering my scene on a device the light appears to "dim" and re-lighten as cube rotates.

This is a swf video of the behavior:
http://drop.io/obzfq4g

The code for my "engine" is located here: [url]
The relevant bits are:

[url]
This is where I'm initializing opengl and setting up my scene. and [url]this is the code for actually rotating / drawing the cube mesh.

I wish I could formulate a better question; but I'm very stuck/confused and can't even think of an intelligent question to ask besides "does anyone know what might cause the kind of behavior I'm seeing?"

Also the slowness / choppyness of the animation in the video is a result of the screencap software. It's smooth throughout the whole rotation on the emu.

View 1 Replies View Related

HTC Hero :: Tracker Ball Lighting Up Every 5 Seconds / What Does That Mean?

Sep 22, 2009

Only had my Hero for 3 days but something I have noticed has happened twice and is happening at the moment.

I have no new notifications but the tracker ball is lighting up every 5 seconds or so. What does that mean?

View 8 Replies View Related

Samsung Moment :: Keyboard Lighting Up For No Reason / Why It Does This?

Nov 30, 2009

So occasionally I set my phone down with the keyboard still open. For some reason periodically the keyboard will flash quickly. It's not because I'm going in and out of service, as the phone is not moving, just sitting on my desk. No alerts or notifications are sounding, no noise at all, just the lights. Any idea why it does this?

View 7 Replies View Related

Quadratic Attenuation Lighting In Samsung Galaxy SII?

Oct 12, 2011

I use quadratic attenuation lighting in one of my android apps (ie gl10.GL_QUADRATIC_ATTENUATION in opengl es) but I recently got a Samsung Galaxy sII and I cant see any quadratic lighting (or constant attenuation lighting). I am wondering if its that Samsung Galaxy sII dont have attenuated lighting or maybe there is some trick I dont know about.

View 1 Replies View Related

Samsung Moment :: Home Charger And Screen Lighting Up

Dec 6, 2009

The house charger that came with my phone in the box works perfect. I plug it in and the phone shows charging and then the screen goes out after the 30 seconds I have it set for while its charging.

I bought a Rocketfish charger from BB to have an extra one I can leave downstairs. When I charge the phone with it, after about 5 minutes the screen lights up on my phone and stays lit until I unplug the charger. Then the phone will go back out like it should.

I though there might be a difference so my nephew gave me his home charger he dont need. Its the charger sprint sent him by mistake for his phone. He has the Blackberry and they sent him the micro-usb wall charger. He gave it to me and when I plug my phone in with that charger the screen lights up and never goes out until I unplug the charger. I dont want to mess up the phone and was just wondering if there is still a difference with the chargers even though they are all micro-usb chargers?

View 8 Replies View Related

HTC Eris :: Need Soft Keys To Be Lighting Up / Complains Of Echoes

Jul 8, 2010

I rooted and flashed EE 2.0.1. like it a lot but need the soft keys to be lighting up . anyway, when i make or get phone calls the party on the other end complains of echoes?.is that maybe affiliated to this Rom or is there a known fix?

View 6 Replies View Related

HTC Incredible :: Strobe Lighting Freezes Up DInc Camera

Jun 18, 2010

I noticed that a tiny spider on the wall next to my desk liked to chase a laser pointer...I also noticed that the strobe mode of my flashlight caused the spider to become disoriented and not chase the laser pointer.Anyway I decided to make a video of this on my Incredible. I recorded spider+laser and then added the strobe for a total video of about a minute..everything seemed to go well for the recording. When I played it back though, after the strobe started, the strobe frequency started to slow down and then the image froze while the time counter kept going. This is a pretty fast strobe of at least 10 Hz (just a guess on my part).I panicked a little thinking I fried a sensor somewhere, but I recorded another video that worked fine. Remember this wasn't a direct hit of the strobe, but bouncing off a nearby white wall WITH all room lights on.

View 6 Replies View Related

Motorola Droid 2 :: Keyboard And Front Button Backlighting Not Lighting Up

Sep 1, 2010

i was messing around with ADW Launcher and when i put my phone down i flipped it over and noticed the phone had froze. Didn't think a whole lot about coming from an Eris it was nothing i wasn't used to.Well when i pulled the battery and went on the market place, i noticed the Keyboard wasn't lighting up.Then i noticed even the front facing buttons were lighting up, now mind you i'm sitting in a rather dark room with my laptop watching a movie so it def should have lit up.I've reset the phone a few times now and still no backlighting and i don't know what settings they are under.

View 2 Replies View Related

General :: Why Touch Light Keys On SIII No Longer Lighting Up

Mar 8, 2013

They still light up when I boot up or shut down the phone, but apart from that they stay off the entire time. I originally thought it was a hardware problem, but it looks like my replacement phone had the same problem when I restored my backup.

Of course, I looked in the settings and it's not set to "always off". So what could be the culprit? If it's my configuration, I wouldn't know where to start. I do know that I mainly use Go Launcher EX and am running the 327b or so version of the Synergy ROM.

View 3 Replies View Related

Motorola Droid :: Bottom Row Touch Keys / Physical Keyboard Not Lighting Up

Dec 9, 2009

After successfully rooting my phone, after my reboot i noticed that the bottom row of touch sensitive keys and the physical keyboard do not light up when touch or slid open. to fix this i have to go to the brightness setting and uncheck and check automatic brightness again?
is this common? did i make an oopsie?

View 6 Replies View Related

Android :: FPS Using Opengl Es On G1

Jan 27, 2009

I am working on developing a 3d game. I have loaded ms3d model in my project and all texture and everything is working fine. I m not loading any joints.But I am facing two major problems which indeed are related to one thing. 1: I have got FPS problem in my game.Its too low even on G1. 2: When I have touch event to control the game it affects the FPSmore. So plz let me know how to optimize it more because the same game with same code of opengl es is wokring at 45 FPS on Iphone So why its running slow on G1.What is opengl es benchmark for G1 ? Wat can be comparison btwn Iphone and G1 related to hardware acceleration?

View 3 Replies View Related

Android :: OpenGL On 1.6

Oct 11, 2009

Been working with OpenGL a little more recently, and have been noticing pretty bad performance on my G1. Were there any major changes to OpenGL in 1.6 that would change the performance (or made my code incorrect?) on device? As a test, I grabbed the SpriteMethodTest out of Apps-For-Android, and gave it a spin. I had run it a few months ago and noticed pretty decent performance. With a low number of sprites (10-100), every method (Verts, Hardware VBO's, and DrawTex) had easily over 30fps, with drawTex beating out the others. I fired it up on my G1 (recently updated to 1.6), and all 3 methods are giving me performance of around 10-12fps with all methods of OpenGL at 10 sprites. Just for fun, installed the exact same APK on my girlfriends phone, which has yet to be updated to 1.6, and hers shows what I expected to start with, 30-60fps depending on method. So the question is, did anything change in terms of OpenGL, that would make the example code in SpriteMethodTest less than optimal?

View 3 Replies View Related

Android :: Opengl Es 2.0?

Nov 16, 2010

I want ask some questions about Opengl es 2.0?

View 3 Replies View Related

Android : How To Use Png / Jpg In OpenGL ES?

Aug 24, 2010

What is the correct way to save images in png format, if I want to use it in my Android OpenGL ES application as texture?

View 1 Replies View Related

Android :: Bad OpenGL Emulation

Aug 19, 2009

I'm developing a new game and have been having inconsistencies between the device and emulator. The biggest one for me right now is that the elements I draw with an orthographic projection work correctly on the device, but are 1/2 the size on the emulator. I've checked and rechecked the code 100 times and I'm positive I've done it right but am confused as to why I'm seeing that result. I suppose I could go forward doing ALL testing on a device - and I may have to, seeing that the emulator's frame rate is horribly slow - but I was hoping that I could do some of the work on it at least.

View 15 Replies View Related

Android :: OpenGL ES Application

Oct 25, 2010

I am currently trying to develop a game for android in OpenGL ES and I am testing it on my Nexus One. But I have run into some performance problems,and I would like to ask somebody about it,could you help?I currently have a very basic scene - background made of 25 tiles(256x256 texture each), and then a number of textured cubes(128x128 texture for each side of a cube ). However,when I try to display approx. more than 10 cubes, the performance becomes so sluggish that I can't even rotate the scene smoothly. I can't imagine how can I add more objects(player,enemies, all that kind of stuff) when it runs so slowly with 35 objects in total. I mean - games like Raging Thunder 2 probably display hundreds of objects at once(plus they do lots of computations behind the scenes) and they run super- smooth on my nexus one. What am I doing wrong? Could somebody help me please?

View 13 Replies View Related

Android :: Java API For OpenGL ES 2.0?

Aug 25, 2010

I am learning Android development, specifically to eventually do OpengL 2.0 ES on it. So far I have read that the NDK supports Opengl 2.0 ES. However, is there also a Java API for it? If there is a Java API for it, which one is recommended? I know both C++ and Java, so it is not a big deal if I have to use the NDK, but I would prefer to work only in Java if possible and without a big performance hit.

View 1 Replies View Related

Android :: PNG Transparency And OpenGL ES

May 27, 2009

I am rendering this PNG with no transparency just fine: http://n4te.com/temp/test.png However if I try to render this PNG (with transparency) with the exact same code, I just get a white box: http://n4te.com/temp/ball.png

I am loading the PNG into a texture like this: Bitmap bitmap = BitmapFactory.decodeStream(input); int[] temp = new int[1]; gl.glGenTextures(1, temp, 0); textureID = temp[0]; gl.glBindTexture(GL10.GL_TEXTURE_2D, textureID); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_NEAREST); // GL_LINEAR for quality. gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S, GL10.GL_CLAMP_TO_EDGE); gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T, GL10.GL_CLAMP_TO_EDGE); GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); bitmap.recycle();

I am using this blending: gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA); How is it possible to render a PNG with transparency in OpenGL ES?

View 7 Replies View Related







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