Jump to content
  • Advertisement
Sign in to follow this  
Janissary

OpenGL Memory usage increasing over time

This topic is 2083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I have an empty OpenGL 3.3 application using GLEW and GLFW, with a simple code like this:

bool running = true;

if( !glfwOpenWindow( 800,600, 0,0,0,0,0,0, GLFW_WINDOW ) )
{
    glfwTerminate();
}

glewInit();

while( running )
{
    glClear( GL_COLOR_BUFFER_BIT );
    glfwSwapBuffers();
    running = glfwGetWindowParam( GLFW_OPENED );
}

glfwTerminate();

When I run the application and open the Windows Task Manager, the memory usage of the process doesn't stop growing, it starts at something near 8,600 K and then this number is increased by 4 every 3 to 10 seconds, approximately.

 

Oh my god, what do I do?

Share this post


Link to post
Share on other sites
Advertisement

Stay calm ;)

 

It does not seem like a real leak, at least if it is growing so slow. I don't see any error in your code. The taskmanager is not really a tool for checking for memory leaks, so you might go ahead and check out a leak detector like https://vld.codeplex.com/releases for Visual Studio in case you have a feeling that there is indeed a leak.

 

Doesn't look like it for me, but checking never hurts :)

Share this post


Link to post
Share on other sites

There are no memory leaks, I used the CRT thing before for checking. I think it it is not a leak problem, because there are no allocations made by me on the loop, only these simple gl calls. I tested other non-empty OpenGL applications, they have a steady usage. They use FreeGLUT.

 

I tried to create a window and context manually, and drew a simple triangle, the memory usage is stable.

 

Maybe this is glew/glfw problem. Or Is that something I shouldn't be worried about?

 

Oh my god, what should I do now :(

 

Thank you for your reply, Barbossa.

Share this post


Link to post
Share on other sites

I recommend using glfw3

hopefully that solves your problem :)

 

I have been using glfw before, and i've never had any growth, even slow

maybe it's just the newer nvidia drivers.. it could be anything

Share this post


Link to post
Share on other sites

Didn't know GLFW had a new version. I won't use glfw3. It has become so stupid. There is no library for Visual Studio 2010. Only for the Visual Crap 2012. Even the website looks stupid now. Even the function names: glfwWindowShouldClose, what the Hell? The header filename, glfw3.h? GLFW 2.7 was not glfw27.h, simply glfw.h.

 

I think I will search for another library to do this job. Or do it manually if I don't find one.

 

Thank you Kaptein.

Share this post


Link to post
Share on other sites
I don't give a **** to this stupid number, keep pressing this stupid down arrow if you want, ********. Edited by swiftcoder
inappropriate language hidden.

Share this post


Link to post
Share on other sites


What? It's right here: glfw-3.0.3.bin.WIN32.zip\glfw-3.0.3.bin.WIN32\lib-msvc100\glfw3.lib.

 

Yes it's right there. My mistake, sorry.

 


Hmm? What do you have against Visual Studio 2012? It's solid and much more stable (in my experiences) than 2010.

 

It's full of useless features - too retarded-friendly, like everything tends to become over time.

 


It's a sign of the library community's health. To me, it appears much cleaner and organized.

 

Too retarded-friendly (like everything tends to become over time) and I couldn't find 2.7.7's documentation.

 


Check the documentation and read up on new functions you're not familiar with.

 

I was talking about the name of the function, which is stupid. It's the first time I see the word 'should' in a program.

 


Developing applications over time that eventually use different versions of the same library can make managing them in an IDE difficult. Visual Studio property pages help somewhat, but having an version number with the header and library names make it much more explicit and hard to mess up.

 

Why would one use two versions of GLFW in the same application? It's all the same crap.

 


This sort of caustic attitude isn't allowed these forums; try taking your frustrations to Twitter or Facebook.

 

That was unnecessary.

Share this post


Link to post
Share on other sites

Not it wasn't necessary. Okay, screw GLFW, it is a shitty library. This thread has become a down-vote ocean, too many assholes. Not that I give a shit about that number.

Share this post


Link to post
Share on other sites

This topic is 2083 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!