Changeset 764


Ignore:
Timestamp:
Apr 29, 2011, 3:28:34 PM (9 years ago)
Author:
sam
Message:

debug: re-add old fixed pipeline code to the debugquad.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/debugquad.cpp

    r758 r764  
    156156    };
    157157
     158#if defined __CELLOS_LV2__
     159    glEnableClientState(GL_VERTEX_ARRAY);
     160    glEnableClientState(GL_COLOR_ARRAY);
     161    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
     162
     163    glActiveTexture(GL_TEXTURE0);
     164    glBindTexture(GL_TEXTURE_2D, data->texlist[0]);
     165
     166    glBindBuffer(GL_ARRAY_BUFFER, data->buflist[0]);
     167    glBufferData(GL_ARRAY_BUFFER, 12 * sizeof(GLfloat), verts, GL_STATIC_DRAW);
     168    glVertexPointer(2, GL_FLOAT, GL_FALSE, 0);
     169
     170    glBindBuffer(GL_ARRAY_BUFFER, data->buflist[1]);
     171    glBufferData(GL_ARRAY_BUFFER, 24 * sizeof(GLfloat), cols, GL_STATIC_DRAW);
     172    glColorPointer(4, GL_FLOAT, GL_FALSE, 0);
     173
     174    glBindBuffer(GL_ARRAY_BUFFER, data->buflist[2]);
     175    glBufferData(GL_ARRAY_BUFFER, 12 * sizeof(GLfloat), tcs, GL_STATIC_DRAW);
     176    glTexCoordPointer(2, GL_FLOAT, GL_FALSE, 0);
     177
     178    glDrawArrays(GL_TRIANGLES, 0, 6);
     179
     180    glDisableClientState(GL_VERTEX_ARRAY);
     181    glDisableClientState(GL_COLOR_ARRAY);
     182    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
     183#else
    158184    data->shader->Bind();
    159185    GLuint attr_pos, attr_col, attr_tex;
     
    162188    attr_tex = data->shader->GetAttribLocation("in_TexCoord");
    163189
    164 #if !defined __CELLOS_LV2__
    165190    glEnableVertexAttribArray(attr_pos);
    166191    glEnableVertexAttribArray(attr_col);
Note: See TracChangeset for help on using the changeset viewer.