|
@ -75,6 +75,7 @@ void QuadSurface::draw() { |
|
|
/*if(mesh.haveVertsChanged() || mesh.haveTexCoordsChanged()){
|
|
|
/*if(mesh.haveVertsChanged() || mesh.haveTexCoordsChanged()){
|
|
|
calculate4dTextureCoords(); |
|
|
calculate4dTextureCoords(); |
|
|
}*/ |
|
|
}*/ |
|
|
|
|
|
/*
|
|
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
|
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY); |
|
|
glTexCoordPointer(4, GL_FLOAT, 0, quadTexCoordinates); |
|
|
glTexCoordPointer(4, GL_FLOAT, 0, quadTexCoordinates); |
|
|
glVertexPointer(3, GL_FLOAT, 0, quadVertices); |
|
|
glVertexPointer(3, GL_FLOAT, 0, quadVertices); |
|
@ -82,6 +83,11 @@ void QuadSurface::draw() { |
|
|
source->getTexture()->bind(); |
|
|
source->getTexture()->bind(); |
|
|
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, quadIndices); |
|
|
glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_BYTE, quadIndices); |
|
|
source->getTexture()->unbind(); |
|
|
source->getTexture()->unbind(); |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
source->getTexture()->bind(); |
|
|
|
|
|
mesh.draw(); |
|
|
|
|
|
source->getTexture()->unbind(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void QuadSurface::setVertex(int index, ofVec2f p) { |
|
|
void QuadSurface::setVertex(int index, ofVec2f p) { |
|
|