Hey everybody,
I've got a VBO class where I create a vbo with texture and stuff.
This is how it looks like
Code :
GLfloat vertexBuffer[8] = {
        0.0F, 0.0F,
        0.0F, height,
        width, height,
        width, 0.0F
    };
 
    GLfloat textureBuffer[8] = {
        texturePositionX, texturePositionY,
        texturePositionX, texturePositionY + textureHeight,
        texturePositionX + textureWidth, texturePositionY + textureHeight,
        texturePositionX + textureWidth, texturePositionY
    };
 
    GLubyte indexBuffer[4] = {
        0, 2, 4, 6
    };
    glGenBuffers(1, &vbIdentifier);
    glBindBuffer(GL_ARRAY_BUFFER, vbIdentifier);
    glBufferData(GL_ARRAY_BUFFER, 8 * sizeof(GLfloat), NULL, GL_STATIC_DRAW);
    glBufferSubData(GL_ARRAY_BUFFER, 0, 8 * sizeof(GLfloat), vertexBuffer);
    glVertexPointer(2, GL_FLOAT, sizeof(GLfloat), 0);
    glBindBuffer(GL_ARRAY_BUFFER, 0);
 
    glGenBuffers(1, &tbIdentifier);
    glBindBuffer(GL_ARRAY_BUFFER, tbIdentifier);
    glBufferData(GL_ARRAY_BUFFER, 8 * sizeof(GLfloat), NULL, GL_STATIC_DRAW);
    glBufferSubData(GL_ARRAY_BUFFER, 0, 8 * sizeof(GLfloat), textureBuffer);
    glTexCoordPointer(2, GL_FLOAT, sizeof(GLfloat), 0);
    glBindBuffer(GL_ARRAY_BUFFER, 0);
 
    glGenBuffers(1, &ivbIdentifier);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ivbIdentifier);
    glBufferData(GL_ELEMENT_ARRAY_BUFFER, 4 * sizeof(GLubyte), indexBuffer, GL_STATIC_DRAW);
    glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
(I program under mac osx)
Thats how i initialize my VBO. Now when I create two different VBOs the first VBO is the same as the second VBO. Why does this happen?
Thx for help !
Greetings Cookiesoft