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

  • Home
  • SEARCH
  • 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 8522297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:04:45+00:00 2026-06-11T07:04:45+00:00

I have a very simple program, that loads an wavefront obj file, rotate and

  • 0

I have a very simple program, that loads an wavefront obj file, rotate and displays it.
The problem is that the program renders it with some issues (like missing triangles). I had a similar problem when I tried to render a Pyramid with a vertex buffer taken from NeHe’s tutorial. So I don’t know what cause this rendering issues. Can you help me? Buggy Space Shuttle

package com.jam.libgdx3DTest;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.*;
import com.badlogic.gdx.graphics.g3d.loaders.obj.ObjLoader;

import java.io.InputStream;

public class Libgdx3DTest extends Game {

    private Mesh shuttleMesh;
    private Camera camera;
    private float rotateAngle;

    public void create() {
        if (shuttleMesh == null) {
            InputStream in = Gdx.files.internal("shuttle.obj").read();
            shuttleMesh = ObjLoader.loadObj(in, false);
        }
    }

    public void render() {
        Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);

        Gdx.gl10.glMatrixMode(GL11.GL_MODELVIEW_MATRIX);

        Gdx.gl10.glLoadIdentity();

        camera.update();
        camera.apply(Gdx.gl10);

        rotateAngle += 0.5f;
        Gdx.gl10.glRotatef(rotateAngle, 0f, 1f, 0f);
        Gdx.gl10.glRotatef(-90f, 1f, 0f, 0f);

        shuttleMesh.render(GL11.GL_TRIANGLES);
    }

    public void resize(int width, int height) {
        float aspectRatio = (float) width / (float) height;
        camera = new PerspectiveCamera(67, 2f * aspectRatio, 2f);
        camera.translate(0f, 0f, 12f);
    }

    public void pause(){
    }

    public void resume(){
    }

    public void dispose() {
    }
}
  • 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-06-11T07:04:46+00:00Added an answer on June 11, 2026 at 7:04 am

    I think you might be having winding issues i.e. the model has different winding than OpenGL.

    OpenGL Winding is counterclockwise by default though this can be changed with glFrontFace(GL_CW);

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

Sidebar

Related Questions

I have a very simple question. I have a program that accepts an integer
So I have a very simple program that reads the 3 first bytes of
i have a simple program that sorts a text file according to length of
I have a very simple program that I am trying to improve performance. One
I have a very simple SDL program that uses only 1MB of memory with
I have a very simple program that consists of a .NET 2.0 exe (Program.exe)
I have a very simple example program that I am trying to compile, but
I have a very simple test program, running on Solaris 5.8: #include <stdio.h> #include
It's a very simple program. I have a function defined on the top and
I have a very simple fxml file, with a checkbox: ... <AnchorPane id=AnchorPane xmlns:fx=http://javafx.com/fxml

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.