Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

drew513

OpenGL bug with visual basic and opengl

This topic is 6222 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

hey when programming with gl in visual basic it seems that i can only run my program 32 times before all the frame rate drops dramatically! i can run my program (in the IDE) 32 times fine, then the 33rd time i try it the performance suddenly drops and i go from several hundred fps to something like 0.01fps! this happens with all programs i try, even the nehe tutorial conversions suffer this problem too. i have experimented with this alot and have found some interesting things. so long as one vb program of any kind stays in memory the problem will occur. so, if i run a vb program which uses opengl and leave this running in the background while i open and close another vb gl program it will drop in performance after 32 processes have been run. then if i close all vb programs and then run another one it works perfectly fine again. my theory is that it is something to do with a vb dll that is shared to all vb processes and only unloads with the last vb process. the problem must be that opengl only allows 32 different gl processes to run for a particular process? i have no idea really , thats all i have come up with to date another interesting point is that before i upgraded my gfx card drivers it used to let me run it 64 times before loosing performance! incidentally in my application i am using opengl via a dll that i wrote in c, but it doesnt''t work this way or by using the ogl tlb. perhaps i need to do something to properly unload the opengl dll from memory? i am using vb6, a geforce2 gts with the latest drivers and windows 2000, if that helps? any help or pointers would be great. thanks andy

Share this post


Link to post
Share on other sites
Advertisement
Why would you want to have 32 different instances of your program running at the same time?

At least thats what I understood you were trying to do from your post...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
hey
i think its the api in the.bsp file, if u delete the
root {...==,,,=]93284 set LM_root.xpos = 20*m
then i think it will work, also i think you should
give that really cool guy u know..err what his name
jonny lots of money.!!! just a suggestion

PPPPP

Share this post


Link to post
Share on other sites
yeah, i didnt think i explained the problem very well!

put simply. when programming in the vb ide i can only run my program and then *close* it 32 times before it gets messed up. so everytime i make a change to the code and then run it, that counts towards one of the 32 runs. after that i have to close and restart visual basic for my program to operate at the correct speed.
hope i explained it a bit better this time.

this also happens with compiled exe''s but atleast one vb program has to stay in memory for it to happen.

its a little difficult to explain without actually seeing what happens. if u want an example get nehe''s vb tutorial code for tut #10. and run it in the vb ide *lots* of times, and see if it suddenly slows down to abut 0.1 FPS!

andy

Share this post


Link to post
Share on other sites
OpenGL resorts to software mode when you fill the display memory, which is what you''re experiencing. Make sure you delete any textures and also that you delete the GL rendering context and release the device context before your program exits.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!