Where do you call chunk::createMesh()?
You must do it before begin scene or After end scene.
Regards
thanh
How to access device in different cpp file.
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: How to access device in different cpp file.
I call chunk::createMesh() from the for loop in chunk::chunk() (i.e the constructor of chunk).
do note that generating the scene nodes in the constructor of chunk works fine.
Also do note that all these calls take place before I've even initiated while(device->run)
I've conducted a short test of my build environment and while I'm not entirely sure how to interpret the results I'm pretty sure it's insane.
I linked the paste in my previous post (that I edited a few minutes ago) but here it is again
http://pastebin.com/KG9d7zc9
6 nested for loops with a conditional check at the end should not fail.
Maybe I'm just missing something vital seeing it's 2 am, I might be able to find a solution later.
For now I'll just go and sleep or something.
do note that generating the scene nodes in the constructor of chunk works fine.
Also do note that all these calls take place before I've even initiated while(device->run)
I've conducted a short test of my build environment and while I'm not entirely sure how to interpret the results I'm pretty sure it's insane.
I linked the paste in my previous post (that I edited a few minutes ago) but here it is again
http://pastebin.com/KG9d7zc9
6 nested for loops with a conditional check at the end should not fail.
Maybe I'm just missing something vital seeing it's 2 am, I might be able to find a solution later.
For now I'll just go and sleep or something.
"this is not the bottleneck you are looking for"
Re: How to access device in different cpp file.
You're not very good at this. Why not do a desk check with, say, chunk size = 2. Your problem is with both x and y. Why don't *you* try to work it out. You'll need a pencil and paper. Good luck!
-
- Posts: 1010
- Joined: Mon Oct 24, 2011 10:03 pm
- Location: 0x45 61 72 74 68 2c 20 69 6e 20 74 68 65 20 73 6f 6c 20 73 79 73 74 65 6d
Re: How to access device in different cpp file.
I've already tried with a chunk size of 2, either way I was just about to post that I had solved it and can now generate my full sized chunks without problem.
I must now get some sleep, this late night programming is killing my ability to process information.
I must now get some sleep, this late night programming is killing my ability to process information.
"this is not the bottleneck you are looking for"