• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About yoursort

  • Rank
  1. Quadtree delete-method

    Oh yes! Now it works! Thank you all for your replies! Problem solved.
  2. Quadtree delete-method

    Yes Demus that´s right. I´m accessing an object after it is deleted because the pointer that points on this (deleted) object points to 0xfeeefeee and not to NULL! In my code I try the following: // Creates a quadtree (depth=3) a = BuildQuadtree(Vector2(), 200, 3); // Deletes first subtree delete (a->mpChild[0]); // ... some time later if(a->mpChild[0]) { drawQuadtree(node->mpChild[0], hdc, ...); } a->mpChild[0] == TRUE because it doesn´t points to NULL and the drawQuadtree()-Function accesses data from the deleted subtree and it crashes. :(
  3. Quadtree delete-method

    First, thank you. But the problem still exists: I´ve implented the destructor variant from Demus79. The child-pointers were correctly set to NULL in the destructor but after the "delete node;" command has finished the child pointers point to the address 0xfeeefeee ?? This is != NULL and so my other methods try to use the data members of the deleted node and my programm crashes.
  4. Quadtree delete-method

    Thank you for the fast answer! I allready thought off that deleting the this-pointer can´t be good. ;) I will try your suggestion as soon I´ve some time! Thx
  5. Hello, I need your help. I´m developing a quadtree class for a small game engine. Currently my project targets normal Windows but in the future I will migrate the code to compile for Windows Mobile. So don´t wonder about using fixed-point math. The creation of a quadtree runs fine but my deletion method works not right. Every quadtree-node has a pointer to its parent and 4 pointers to its children. The method should delete this node and all its children. The quadrant order is 1 -> top left, 2->top right, 3->bottom left, 4->bottom right. Please have a look at my code. I´m staring at it but I can´t find anything wrong. I don´t know if I can do "delete this" at the last line of the code? Thank you for your help! // Delete a QuadtreeNode and its children void QuadtreeNode::DeleteQuadtree() { for(int i = 0; i < 4; i++) { // Recursively delete children of this node if(mpChild[i]) { mpChild[i]->DeleteQuadtree(); } } // Update parents child pointer to NULL if(mpParent) { // Compute the quadrant the obects AAR is in // and set parents child pointer to NULL if(mCenter.y > mpParent->mCenter.y) { if(mCenter.x < mpParent->mCenter.x) mpParent->mpChild[0] = NULL; else mpParent->mpChild[1] = NULL; } else { if(mCenter.x < mpParent->mCenter.x) mpParent->mpChild[2] = NULL; else mpParent->mpChild[3] = NULL; } } // Delete this node delete this; }
  6. OpenGL ES vs. Direct3DMobile

    First thx for all your replies! @avigessa: There are no noticeable speed differences for the little example programms between c++ and c#. @don: A while ago I checked my D3DM driver and didn´t thought about the reference driver because I thought every device with no hardware acceleration uses the reference driver. But of course every vendor can write an optimized specific device driver. I hope there will be an OS update soon. No, I do not blame Intel for an driver failing to run on a competitor's CPU. :) But I thought that I´ve read something like: Samsung-CPUs are XScale-compatibe. But maybe that´s wrong. @Anonymous Poster: Until now I only used the vincent implementation but I will give the rasteroid implementation a try. By now I´ve got a bit time until I have to decide the topic of my bachelor thesis. I only wanted to play a bit with the different APIs to see which fits best for me (especially for my device because I´ve got no money for another one ;) [Edited by - yoursort on February 3, 2006 7:36:38 AM]
  7. OpenGL ES vs. Direct3DMobile

    @ AVigesaa: Yes that´s right, I´m using c++ for GL|ES and c# for D3DM. I cannot imagine that writing managed code can causes a heavy performance reduction on a so simple example programm, but I should try the unmanaged d3dm samples to check out the perfomance with c++. @ don: Yes I have Samsung processor in my iPAQ but I thought these are 100 % compatible to XScales?! Maybe it doesn´t uses the optimized implementation. I´m running Mobile 5 and not 2003. I have no answer how Anonymous Poster tested d3dm on a 2003 device. Do you have any good resources for GL|ES and D3DM? I found www.typhoonlabs.com and http://www.zeuscmd.com/ very usefull. Thx for your replies.
  8. OpenGL ES vs. Direct3DMobile

    I also think that my iPAQ has no hardware acceleration. And I have a 300MHz Samsung SC32442 processor, not an Intel XScale, so I cannot use the XScale optimized libraries. I use the normal "vincent" library from sourceforge.net.
  9. I´ve got the same problem: I develop a little game for Pocket-PC (2003 SDK). On a 2003 device it runs fine, but on my new Mobile 5 (also iPAQ 1950) the game do not react on button pressing. But sometimes if I press the buttons often enough (20-30 times) the game reacts?! I have only embedded Visual C++ and so I cannot debug my apps on my new PocketPC ;( At the moment I´ve got no solution for this problem. Maybe some other has?!
  10. Hi, for my bachelor thesis I want to develop a small 3D engine for the PocketPC (2003 and WM5). I think there are only 2 APIs for this: OpenGL ES and D3DM. I´ve been playing around with those two 3D APIs for a few days. I´ve tried some tutorials with basic stuff, e.g. initialization, render a textured cube and so on. The GLES samples are fine, they are running in an acceptable framerate on my iPAQ 1950 (300MHz). But the D3DM samples are very slow! A one triangle sample runs under 10 fps (the samples are from msdn). Before I tried the samples D3DM was my favourite because I can write in C# (I like the class hierarchy of the CompactFramework) and I wrote some DirectX stuff before. But now GLES seems to be the better one. What do you think? Do you have any experience with these APIs? Can I use GLES under C# (are there wrapper classes for it?) Why is D3DM so slow? Thx! [Edited by - yoursort on January 13, 2006 4:32:51 AM]
  • Advertisement