Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualBrother Bob

Posted 22 July 2013 - 12:33 PM

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.  


#7marcClintDion

Posted 22 July 2013 - 03:04 AM

There is far too much arrogance and out right abuse by site moderators, they are teaching other people to behave this way.  The posts I've made will all be shorty removed and replaced with this notice.  Game development is not the only thing being taught here, bad behavior is being taught as well.


#6marcClintDion

Posted 05 June 2013 - 07:09 PM

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.

 


#5marcClintDion

Posted 05 June 2013 - 06:37 PM

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.

 


#4marcClintDion

Posted 05 June 2013 - 06:35 PM

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.

To find out at what point in the loop the crash is taking place you could try something like:

//###########################################################################################
#include <fstream.h>
//---------------------
int indextester;
bool mkeyIsReset = true;
//---------------------

void Render(void)
{
         ofstream outSettings("index.c");
         //----------------------------------------


         for(int i = 0; i < index; i++)
         {
                 outSettings << "index = " << index << "\n";
                 //----------------------------------------------------
                 //..
                 //..
                glBindBuffer(GL_ARRAY_BUFFER, vbo[index] - vbo[index] + indexTester);
         }
}

void ProcessKeyboard(void)
{
               if (keys['M'] && mkeyIsReset)//__use a reset switch to prevent multiple increments from only one key press
               {
                          indexTester += 1;
                          mkeyIsReset = false;
               }
               if (!keys['M'])
               {
                          mkeyIsReset = true;
               }
}


//############################################################################################################


Now slowly increment indexTester one value at a time until it crashes.


#3marcClintDion

Posted 05 June 2013 - 06:34 PM

Buffers allocate and access memory, if your index goes past the bounds of what's been allocated you will have problems. I just tested this by using glBindBuffer(GL_ARRAY_BUFFER, 1000); in a program that only has a few dozen models and it not only crashed the program, it took down VirtualBox OS emulator running Windows7. Make sure '[vbo[index]' is sending valid information to glBindBuffer.

To find out at what point in the loop the crash is taking place you could try something like:

//###########################################################################################
#include <fstream.h>
//---------------------
int indextester;
bool mkeyIsReset = true;
//---------------------

void Render(void)
{
          ofstream outSettings("index.c");


         //==========================================================================
         for(int i = 0; i < index; i++)
        {
                 outSettings << "index = " << index << "\n";
                 //----------------------------------------------------
                 //..
                 //..
                glBindBuffer(GL_ARRAY_BUFFER, vbo[index] - vbo[index] + indexTester);
        }
}

void ProcessKeyboard(void)
{
               if (keys['M'] && mkeyIsReset)//__use a reset switch to prevent multiple increments from only one key press
               {
                          indexTester += 1;
                          mkeyIsReset = false;
               }
               if (!keys['M'])
               {
                          mkeyIsReset = true;
               }
}


//############################################################################################################


Now slowly increment indexTester one value at a time until it crashes.


PARTNERS