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 7169761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:04:31+00:00 2026-05-28T15:04:31+00:00

This time i’m having an issue with the actual rendering of my model. I

  • 0

This time i’m having an issue with the actual rendering of my model. I can load it all through the Libgdx loadObj() function, and render it using GL10_Triangles, however i keep getting missing triangles in my model (it seems like only half the models are being rendered). I’ve tried the old ObjLoad function (commented out) and also the different render styles but nothing seems to work.

And yes I have checked the model in Blender and the model is complete without missing faces.

See the print screen below, and the code below that.
Any help would be fantastic, it’s very frustrating as i’m so close to getting this to work.

Print Screen
And here’s the code.

public class LifeCycle implements ApplicationListener {

Mesh model;
private PerspectiveCamera camera;

public void create() {

    InputStream stream = null;
    camera = new PerspectiveCamera(45, 4, 4);
    try 
    {
        stream = Gdx.files.internal("Hammer/test_hammer.obj").read();
        //model = ModelLoaderOld.loadObj(stream);
        model = ObjLoader.loadObj(stream,true);
        stream.close();
    } 
    catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    Gdx.gl.glEnable(GL10.GL_DEPTH_TEST);
    Gdx.gl10.glTranslatef(0.0f, 0.0f, -3.0f);
}

protected float rotateZ = 0.1f;
protected float increment = 0.1f;

public void render()
{
    Gdx.app.log("LifeCycle", "render()");
    Gdx.gl.glClearColor(0.0f, 0.0f, 0.5f, 1.0f);
    Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
    camera.update();
    camera.apply(Gdx.gl10);
    Gdx.gl10.glTranslatef(0.0f, 0.0f, -3.0f);
    Gdx.gl10.glRotatef(rotateZ, rotateZ, 5.0f, rotateZ);
    model.render(GL10.GL_TRIANGLES);

    rotateZ += increment;
    System.out.println(""+rotateZ);
}
}
  • 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-28T15:04:32+00:00Added an answer on May 28, 2026 at 3:04 pm

    This actually looks like the OBJ file stores quads instead of triangles, but your loading routine just reads them as triangles (just reads the first 3 index groups of a face). Whereas Blender might (and should) be smart enough to handle quads, your loader routine isn’t. So either write a better OBJ loader (but I guess this isn’t your class), configure your OBJ loader to treat quads correctly (if possible), or export the model as triangles instead of quads (if possible).

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

Sidebar

Related Questions

I used FireFox throughout all this time and didn't see that. But when I
All this time (specially in Netflix contest), I always come across this blog (or
I have this Time Series function with Mat Lab: function y = time(a, b,
This time I think it's not me being stupid but an actual conflict. I
This time I'm struggling with the different methods to bind events. I've all the
this is the cpp of a Time function. The code is defining functions of
this time I have a page which will load different kinds of file formats,
and this time i have loaded a model successfully! yay!! but theres a slight
Idea taken from here - this time you can only use PHP. Is this
I asked this question before but that time the issue was that I had

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.