Mark – OpenGL issue – exit slowdown

About Monkey 2 Forums Monkey 2 Development Mark – OpenGL issue – exit slowdown

This topic contains 3 replies, has 2 voices, and was last updated by  AdamStrange 1 year, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #8261

    AdamStrange
    Participant

    Mark, I thought you might be able to point me in the right direction here.

    I have an opengl window – no problems

    model loader – no problems

    setting up of shaders and VBO’s, etc

    When run everything is great. but… When I quit there is a blob of time where the app just freezes. The length of freeze is dependant on how many 3d objects I have and how long the app has been running (were talking 10’s of seconds here!

    I’m refreshing at 60fps, and it seems to be some background clean up. all is fine till I quit.

    Can you give any thoughts as to what might be going on – you might have had similar issues with you own 3d module and it is something I am not doing correct?

     

    Any help would be appreciated here

    File now included with offending code. just run second.monkey2

    Attachments:
    1. Opengl-error-1.zip
    #8263

    cocon
    Participant

    Perhaps you could send the project zip to him, just in case there is something fishy going on, it would be easier to spot.

    #8264

    AdamStrange
    Participant

    Good idea.

     

    Mark (and anyone else)

    Here’s the offending file (second.monkey2). just run a few time with different lengths of time run.

    On quit – the time increases

    Attachments:
    1. Opengl-error.zip
    #8276

    AdamStrange
    Participant

    ok, think i’ve solved it….

    in the method Bind( projMatrix:Matrix )

    Add the following two lines to the head of the method:

    glDeleteBuffers(1, Varptr vbo)
    glDeleteBuffers(1, Varptr ebo)

     

    in essence, there was some form of incremental leak, or allocation that needed to be cleared first.

     

    Mark, if you have any other suggestions, then please feel free to help 😉

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.