Search code examples
opengl3dvboassimp

OpenGL, screen doesn't update after adding Assimp 3D model


I am using OpenGL 4.0, I have 3 things in my scene, they are-

1- VBO Plane
2- Cube maps
3- 3D models [3ds/obj]

I am using Assimp library to import 3D models, the code which I built to import models was done with the help of a tutorial on youtube from "TheCPlusPlusGuy".

Here is the issue I am facing, I can render the plane in my scene, I can render the cube maps, a.k.a. skyboxes, in my scene, I can render them together.
But When I am rendering any 3D model, be it .3ds or .obj, the screen doesn't update. Even if i resize the screen its not getting updated.
This only happens when I render a 3D model. I used flags and enabled drawing 3D models at runtime, the program runs fine until I render the models, once I render the models, the models itself do not appear on screen, but the screen again freezes.
I googled it, but no one else seems to be having an issue like this.

My primary diagnostic is because I am using VBO for planes, cubemaps, and 3D models I am having this issue.


Solution

  • I forgot to do this after rendering the plane->

    glBindVertexArray(0);
    

    After that the program was working like a charm.