Jump to content
  • Advertisement

bobason456

Member
  • Content Count

    175
  • Joined

  • Last visited

Community Reputation

156 Neutral

About bobason456

  • Rank
    Member
  1. bobason456

    new char ... heap error? [SOLVED]

    Thanks… Yes I just found it. Added a line that broke an if statement without brackets yada yada. Was writing well past the end of the allocated memory space. Thanks for your time though.
  2. Please help me work this out. VC++ 2005 Express is giving me the following runtime error at delete in the destructor of this class. "...This may be due to a corruption of the heap..." So I'm doing something wrong with this char array? In the Output window I'm getting... HEAP[NeHeGL.exe]: Heap block at 003782E8 modified at 00378333 past requested size of 43 Windows has triggered a breakpoint in NeHeGL.exe. So perhaps I've writen past the array? ... unsigned char *Buffer; cPacket(int Size) { Buffer = new unsigned char[Size]; for(int a=0;a<Size;a++) Buffer[a] = 'g'; } ~cPacket() { delete [] Buffer; } ... Thanks DaveC [Edited by - bobason456 on May 7, 2006 7:37:58 AM]
  3. I put an application together quickly using the NeHe base code, in VC 2005 Express. It was running fine, except this morning I’m getting no polygons drawn in Debug mode, while release mode works fine? I’ve not changed any project settings since I began.. It was working now it’s not. I know I’ve done something stupid, because an older debug .exe runs fine, but not sure what? I can trace the code, through my Draw function, GlClear works as it should, the primitives functions are being called.. (GL_LINES, etc) but nothing is showing.
  4. bobason456

    Backpropagation of the error

    The training of Perceptrons can go on endlessly. At some point you’ll have to decide how much error you want in the system. In other words what error you are willing to live with. Over training can give you undesirable results, But it depends largely on the application.
  5. bobason456

    Changing the delete operator

    Quote:Original post by Conner McCloud Quote:Original post by bobason456 I find it quite useful.. #define __delete(p) if(p!=NULL){ delete p; p = NULL;} The behavior of "delete 0;" is perfectly well defined, and does nothing. Also, double underscores are against the rules. I'm fairly certain this applies to macros, and even if not its a good practice to avoid. And you've accessed p three times in a single macro. Bad form, what if p has side effects? CM Just showing off my inexperience with C / C++ in general again..
  6. bobason456

    Changing the delete operator

    I find it quite useful.. #define __delete(p) if(p!=NULL){ delete p; p = NULL;}
  7. bobason456

    Problems with NeHe Tutorials

    Lets work through this one step by step.. If the only difference were those computer specs, then you have solved your own problem.. but .. The NeHe Tuts are plane text files CPP and Headers The Compiler takes the files and inspects them and performs it's voodoo magic to produce an Executable. Compilers are smart things, perhaps even Borland Builder 6. So the problem being the code crashing the computer is not likely the problem. Perhaps libraries you have installed are bad? Perhaps you have a dodgy copy of Borland C++ Builder 6. I remember in VS6 I could crash the IDE some times by pressing F7 (build) twice quickly :) But never the computer.. Aside from compilers being smart Modern OS's, such as the one you are using are quite smart also.. I've have not yet locked up XP SP2, perhaps I'm lucky. Does other code compile OK? Solutions - Get a good copy of your compiler - Get a good computer, yours is not good enough.. You need at least a DUAL CPU system and 2GB of ram to use Borland C++, because of it's Mandatory Hyper threading in the Inter-predictive type safety of the State machine reciprocals. Or switch your build settings to Jazz mode. I should go now.
  8. bobason456

    Speedy particle draw ?

    I'm no expert, but 11'000 - 15'000 is heaps.. like lots. are you sure you cant use them more sparingly?
  9. bobason456

    Polygon Drawing Order

    Add this to your set up... removes back faces. glFrontFace(GL_CCW); glPolygonMode(GL_FRONT,GL_FILL); glEnable(GL_CULL_FACE); glCullFace(GL_BACK); p.s. cant see your picture..
  10. bobason456

    Reference count nightmare

    This is a topic of personal interest, because I've been working on such a system for a while now that operates are you described Xai. Could you please comment further or provide links to some modern methods as you say the reference counting is old hat. I also have a class called an AssetManager that controls the loading and destroying and references to Assets. When another part of code needs an Asset it creates a instance of my pointer class (CAsset_Item) and requests a reference from the AssetManager. Like so... GUI_Main = new CAsset_Item<GUI_Item>(Asset_Manager->Request_listNode(18, ASTP_GUI_Form)); The asset manager loads the Asset and returns a pointer to it. In the CAsset_Item constructor I dynamically cast the type, and increment the reference counter. When that code is done with the Asset it deletes GUI_Main (from above example) the CAsset_Item object destructor de-increments the reference counter in the AssetManager. The code never deletes the Asset it self, that job is left up to incremental garbage collection of the Asset Manager that simply tests Reference count = 0. This works well for me, the only issue come in destroying the AssetManager then the programme ends, Where care must be taken in the way
  11. bobason456

    Movie playback

    You one of those google haters hu? MPEG2Lib http://logicnet.dk/lib/
  12. bobason456

    Is math platonic?

    PI is a number that expresses an observation that all perfect circles share. Can the cow count one apple? how many apples are in front of it. The thousands in the next vineyard don’t count? In other words how far from you can something be before it is no longer in front of you. This is all aside from the fact that cows are stupid. Such questions must be framed because they are very dependant on your point of view, and the numbers we have only exist because people’s minds can see such relationships. What if I were to tell you, theoretically, all circles extended into a dimension where they were all lines of equal length. We've not seen that yet. But the constant is called MYASS and it equals 1. Numbers sure exist out side of your head, unless your claming to have discovered PI. The human mind has, I think, developed - through natural selection - the ability to count. It keeps us alive. Think about it.
  13. bobason456

    How to Translate glScissor ???

    Cool.. thank you.. I was just thinking that if a GL method existed it would be slower any way.. so I’ll re-write some code.
  14. bobason456

    TropicBall beta

    is it Lost Brick Bat?
  15. bobason456

    TropicBall beta

    Half of your post in HTML is.. looks good by the way.
  • 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!