Original Post
Hihi~ i am trying to have a larger textured ground which look 3D. Problem 1: this is what i did:
gl.glBindTexture(GL.GL_TEXTURE_2D, Map);
gl.glEnable(GL.GL_TEXTURE_2D);
gl.glColor4f(1,1,1,0);
gl.glBegin(GL.GL_QUADS);
gl.glTexCoord2f(0.0f, 0.0f);
gl.glVertex3f(-10f,-10f,-1.0f);
gl.glTexCoord2f(0.0f, 4.0f);
gl.glVertex3f(10f,-10f,-1.0f);
gl.glTexCoord2f(4.0f, 4.0f);
gl.glVertex3f(10f,10f,-1.0f);
gl.glTexCoord2f(4.0f, 0.0f);
gl.glVertex3f(-10f,10f,-1.0f);
gl.glEnd();
gl.glDisable(GL.GL_TEXTURE_2D); i tried changing the vertex and also texcoord, but the size seems unchanged. Problem 2: my viewport seems abit wierd cause when i tried rotating my floor, some angle make some of the part a bit chipped off.. also when i draw lines, those with different z-value requires me to zoom in or out before i can see them. final GL gl = glDrawable.getGL();
if (height <= 0) // avoid a divide by zero error!
height = 1;
h = (float)width / (float)height;
gl.glViewport(0, 0, width, height);
gl.glMatrixMode(GL.GL_PROJECTION);
gl.glLoadIdentity();
glu.gluPerspective(55.0f, h, 1.0, 20.0);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity(); feel that it might be because of my lookat:glu.gluLookAt(0,15,3,0,0,0,0,0,1); Sorry for my lengthy problem.. Help on any of the qns would be appreciated=D thanks