Skip to content

Commit 7e1d7ba

Browse files
committed
add texture coordinates to addSurface mesh generator
1 parent 83b6d69 commit 7e1d7ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

allocore/src/graphics/al_Shapes.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ int addSurface(Mesh& m, int Nx, int Ny, float width, float height){
412412
for(int j=0; j<Ny; ++j){ float y=(float(j)/(Ny-1) - 0.5f) * height;
413413
for(int i=0; i<Nx; ++i){ float x=(float(i)/(Nx-1) - 0.5f) * width;
414414
m.vertex(x, y);
415+
m.texCoord(float(i)/(Nx-1), float(j)/(Ny-1));
415416
}}
416417

417418
// Note: the start and end points of each row are duplicated to create

0 commit comments

Comments
 (0)