Using a simple paint program (such as Windows Paint or GIMP [GI16]), draw a freehand picture of

Question:

Using a simple “paint” program (such as Windows “Paint” or GIMP [GI16]), draw a freehand picture of your own design. Then use your image to texture the pyramid in Program 5.1.

Program 5.1JAVA/JOGL Application // the following additional imports will be necessary for the texture functions: importpublic Code() { // unchanged... } public void display(GLAutoDrawable drawable) { GL4 gl= (GL4)} // activate buffer #1, which contains the texture coordinates gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[1]);private void setupVertices() { GL4 gl = (GL4) GLContext.getCurrentGL(); float[] pyramidPositions = { /* dataVertex shader #version 430 layout (location=0) in vec3 pos; layout (location=1) in vec2 texCoord; out vec2uniform mat4 mv_matrix; uniform mat4 p_matrix; layout (binding=0) uniform sampler2D samp; // not used inFragment shader #version 430 in vec2 tc; out vec4 color; // interpolated incoming texture coordinate uniform

Step by Step Answer:

Related Book For  book-img-for-question

Computer Graphics Programming In OpenGL With JAVA

ISBN: 9781683922193

2nd Edition

Authors: V. Scott Gordon PhD, John L. Clevenger PhD

Question Posted: