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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T03:52:14+00:00 2026-06-17T03:52:14+00:00

Im working on my school project and just starting it. Provided with a framework

  • 0

Im working on my school project and just starting it. Provided with a framework ive managed to load a SGF model and display it, but when i want to use another shader for creating a simple textured floor from vertices it only shows the model (after compilation the floor is visible for like 0.5s but later disapears) Any suggestions how to do it?

    public void display(GLAutoDrawable drawable) {
    final GL3 gl = drawable.getGL().getGL3();
    loader.setUniformMatrix("projection", projection);

    gl.glClear(GL3.GL_COLOR_BUFFER_BIT | GL3.GL_DEPTH_BUFFER_BIT);

    myTexture.bind(gl, modeling, "my_texture");
    myTexture.bind(gl, modeling, "my_texture2");

    myTexture.bind(gl, program, "my_texture");
    myTexture.bind(gl, program, "my_texture2");

    Mat4 mv = MatrixMath.lookAt(this.eyeX,this.eyeY,this.eyeZ,this.at,this.up);
    program.setUniformMatrix("model_view", mv);
    program.use(gl);

    gl.glDrawArrays(GL3.GL_TRIANGLES, 0, numVertices);
    // 2nd part
   // modeling.setUniformMatrix("model_view", mv);
    modeling.setUniformMatrix("model_view", mv);
    modeling.use(gl);
        for (Map.Entry<String, VertexBufferObject> entry : vboHashMap.entrySet()) {
            String key = entry.getKey();
            entry.getValue().bind(gl);
            gl.glDrawArrays(GL3.GL_TRIANGLES, 0, SGFLoader.getNumVertices(key));
        }
}

When i remove lines after the second part (which are responsible for loading the model), the wooden plank is visible, otherwise it only renders the model.

Any sugestions?

  • 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-17T03:52:16+00:00Added an answer on June 17, 2026 at 3:52 am

    It doesn’t look like you’re binding the vertex array for the floor in the display() method. I’m guessing you bind it once when you set everything up, but forget to bind it again each frame, which would explain why it flickers for a fraction of a second.

    OpenGL isn’t object oriented under the hood. When you call glDrawArrays it will draw whichever array you last bound.

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

Sidebar

Related Questions

I am working on a school project (if you couldn't figure that out just
I am working on a project for school and I have managed to figure
I am working on a school project with another two friends. I want an
Still working on a web application as a school project, and it just seems
Sorry for my bad English. I just started working on my school final's project
I'm working on creating an ASCII interface for a school project but I've run
I'm working on a little PHP Framework for a school project and I'm currently
I'm currently working on a school project in Eclipse (We have just started using
I am working a school project to implement a Huffman code on text. The
while working on a school project i ran into a problem using javascript to

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.