Hi,
I am having some problems getting glMultMatrixf and glLoadMatrixf to work. I am using JOGL, downloaded from https://jogl.dev.java.net/ current nightly builds. Have successfully got my code running using perspective, etc. But as soon as I try to create my own matrix using the above commands, it won’t compile. The errors given are:
DrawWorld.java:264: cannot find symbol
symbol : method glMultMatrixf(float[])
location: interface javax.media.opengl.GL
gl.glMultMatrixf(tt);
^
DrawWorld.java:265: cannot find symbol
symbol : method glLoadMatrixf(float[])
location: interface javax.media.opengl.GL
gl.glLoadMatrixf(tt);
^
2 errors
Here is a section of the code.
import javax.media.opengl.;
import javax.media.opengl.glu.; /* Some confusion over these ?? java.net.jogl /
import com.sun.opengl.utils.;
GL gl = drawable.getGL();
GLU glu = new GLU();
gl.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
gl.glClear(GL.GL_COLOR_BUFFER_BIT);
gl.glMatrixMode(GL.GL_MODELVIEW);
gl.glLoadIdentity();
/* Load The Model View Matrix */
/* Works Fine Without The Next 2 Lines */
gl.glMultMatrixf(ModelView); /* ModelView is float[16] */
gl.glLoadMatrixf(ModelView);
/* Draw The Square */
gl.glPushMatrix();
gl.glTranslatef(0.0f, 0.0f, -50.0f);
gl.glColor3f(1.0f, 0.0f, 0.0f);
gl.glRotatef(value, 0, 0, 1);
value++;
gl.glRecti(-8, -8, 8, 8);
gl.glPopMatrix();
Any ideas. I need to get this working as I am implementing my own frustum culling based on the 4X4 matrix passed to glLoadMatrixf, to render a large terrain system.
Thanks,
Speedie.