Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3226058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T16:24:41+00:00 2026-05-17T16:24:41+00:00

Hey all, I’m writing a little 3D engine for android to better learn the

  • 0

Hey all,
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: http://github.com/mlasky/Smashout-Android-3D-Engine/

The relevant bits are:

http://github.com/mlasky/Smashout-Android-3D-Engine/blob/master/src/com/supernovamobile/smashout/SmashoutGLRenderer.java
this is where I’m initializing opengl and setting up my scene.

and

http://github.com/mlasky/Smashout-Android-3D-Engine/blob/master/src/com/supernovamobile/smashout/SMMesh.java
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?”

Thanks for any help you can provide.

Edit: 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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T16:24:41+00:00Added an answer on May 17, 2026 at 4:24 pm

    From the video it looks like your normals are incorrect.

    For an axis-aligned cube the normals in cube.xml seem off. They should be axis-aligned, not whatever they are. Where did you get the model?

    This answer may also be related if mVNormalsBuffer is empty.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey All, I currently use Google's API to include jQuery into my sites like
Hey all! Having a little trouble with my stack. Im trying to print each
Hey all i am in need of a little help with figuring out how
Hey all, i am trying to learn how to insert a comment within some
hey all, throwing this one out there... hope it's a simple one. using the
Hey all, I'm having a little trouble packing a numpy.float32 using the struct.pack function.
Hey all, I'm writing a C program, and I want to have an array
Hey all, I am writing a logviewer application. These logs are between 100-200 megs
Hey all, I am setting up a PHP web app that will make use
Hey all, I'm curious if you can use a jboss SAR to hold all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.