Grid code is overloading and not working

Started by
12 comments, last by VISQI 13 years, 3 months ago
Quote:But the point is that ~App only gets called at the termination of the whole program, not run-time.

Exactly. That's the whole point, though your statement is incorrect. "Run-time" is "program time" and "termination of the whole program" should include destruction of the App.

If you don't need to change the vertex buffer (assuming your grid is static), then you only need one vertex/index buffer for the entire duration of the program. You just render it multiple times. When the App destructor is called when the program terminates, the memory gets released.

If you do need to change the contents of the vertex buffer and don't need to change the size of the vertex buffer, don't create a new buffer, just lock it, fill it and unlock it.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

Advertisement
that solved it. Can't thank you enough, buckeye
any suggestion on the grid algorithm??? a picture of it is on my last reply
Quote:any suggestion on the grid algorithm?

If you've got it working (and you now realize you only have to execute the loading code once), go with it. You may be able to improve it next project, but, for now, I'd suggest you continue on your learning curve.

Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.

You don't forget how to play when you grow old; you grow old when you forget how to play.

really Appreciate the help

This topic is closed to new replies.

Advertisement