Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / Re: jogl IRC? on: 2003-08-09 21:49:42
#jogl ?
2  Java Game APIs & Engines / JOGL Development / Re: Shadow volume sweetness on: 2003-08-09 07:48:17
Do you have the whole demo somewhere?
3  Java Game APIs & Engines / JOGL Development / Re: Milkshape loader for JOGL on: 2003-08-07 19:41:13
I tried it on "bert.ms3d". I think it's included when you download milkshape.

Here is my timer class
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
public class Timer {
    double timerStart;
    int pauseCount = 0;
    double pauseTime = 0;

    public Timer() {
        timerStart = System.currentTimeMillis();
        pauseCount = 0;
        pauseTime = 0;
    }

    public void reset() {
        timerStart = System.currentTimeMillis();
    }

    public double getTime() {
        if (pauseCount > 0)
            return pauseTime;

        return (System.currentTimeMillis() - timerStart);
    }

    void pause() {
        if (pauseCount == 0)
            pauseTime = System.currentTimeMillis();

        pauseCount++;
    }

    void unpause() {
        if (pauseCount > 0) ;
        pauseCount--;

        if (pauseCount == 0) {
            timerStart = (System.currentTimeMillis() - pauseTime);
        }
    }

}


Remember that c++ uses pointers, porting from c++ to java isn't always very easy. If you get vertices at very odd places it might be because you are passing on a reference to a method when you need to copy the value instead.
4  Java Game APIs & Engines / JOGL Development / Re: Milkshape loader for JOGL on: 2003-08-07 15:49:42
I used the tutorial at http://rsn.gamedev.net/tutorials/ms3danim.asp and got it to work. Since the whole class is to long I'll just post four methods:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
public void setupJoints() {

        for (int i = 0; i < numJoints; i++) {
            Joint joint = joints[i];

            joint.relative.setRotationRadians(joint.rotation);
            joint.relative.setTranslation(joint.translation);
            joint.parent = -1;
            for (int j = 0; j < numJoints; j++) {
                if (joints[j].name.compareTo(joint.parentName) == 0)
                    joint.parent = j;
            }

            if (joint.parent != -1) {
                joint.absolute.set(joints[joint.parent].absolute.getMatrix());
                joint.absolute.postMultiply(joint.relative);
            } else {
                joint.absolute.set(joint.relative.getMatrix());
            }

        }

        for (int i = 0; i < numVertices; i++) {
            Vertex vertex = vertices[i];

            if (vertex.boneId != -1) {
                Matrix matrix = joints[vertex.boneId].absolute;

                vertex.point = matrix.inverseTranslateVect(vertex.point);
                vertex.point = matrix.inverseRotateVect(vertex.point);
            }
        }

        for (int i = 0; i < numTriangles; i++) {
            Triangle triangle = triangles[i];

            for (int j = 0; j < 3; j++) {
                Vertex vertex = vertices[triangle.vertexIndices[j]];
                if (vertex.boneId != -1) {
                    Matrix matrix = joints[vertex.boneId].absolute;

                    triangle.vertexNormals[j] = matrix.inverseRotateVect(triangle.vertexNormals[j]);
                }
            }
        }
    }

void advanceAnimation() {
        double time = timer.getTime();
        if (time > totalTime) {
            if (looping) {
                restart();
                time = 0;
            } else
                time = totalTime;
        }

        for (int i = 0; i < numJoints; i++) {
            float[] transVec = new float[3];
            Matrix transform = new Matrix();
            int frame;
            Joint joint = joints[i];

            if (joint.numRotationKeyframes == 0 && joint.numTranslationKeyframes == 0) {
                joint.m_final.set(joint.absolute.getMatrix());
                continue;      // OBS!
            }

            frame = joint.currentTranslationkeyframe;
            while (frame < joint.numTranslationKeyframes &&
                    joint.translationKeyframes[frame].time < time) {
                frame++;

            }
            joint.currentTranslationkeyframe = frame;
            if (frame == 0)
                transVec = joint.translationKeyframes[0].parameter;
//                     memcpy( transVec, joint.translationKeyframes[0].parameter, sizeof ( float )*3 );
            else if (frame == joint.numTranslationKeyframes)
                transVec = joint.translationKeyframes[frame - 1].parameter;
//                     memcpy( transVec, joint.translationKeyframes[frame-1].parameter, sizeof ( float )*3 );
            else {
//                     assert( frame > 0 && frame < joint.numTranslationKeyframes );

                Keyframe curFrame = joint.translationKeyframes[frame];
                Keyframe prevFrame = joint.translationKeyframes[frame - 1];

                float timeDelta = curFrame.time - prevFrame.time;
                float interpValue = (float) ((time - prevFrame.time) / timeDelta);

                transVec[0] = prevFrame.parameter[0] + (curFrame.parameter[0] - prevFrame.parameter[0]) * interpValue;
                transVec[1] = prevFrame.parameter[1] + (curFrame.parameter[1] - prevFrame.parameter[1]) * interpValue;
                transVec[2] = prevFrame.parameter[2] + (curFrame.parameter[2] - prevFrame.parameter[2]) * interpValue;
            }

            frame = joint.currentRotationkeyframe;
            while (frame < joint.numRotationKeyframes &&
                    joint.rotationKeyframes[frame].time < time) {
                frame++;
            }
            joint.currentRotationkeyframe = frame;

            if (frame == 0)
                transform.setRotationRadians(joint.rotationKeyframes[0].parameter);
            else if (frame == joint.numRotationKeyframes)
                transform.setRotationRadians(joint.rotationKeyframes[frame - 1].parameter);
            else {
//                   assert( frame > 0 && frame < pJoint->m_numRotationKeyframes );

                Keyframe curFrame = joint.rotationKeyframes[frame];
                Keyframe prevFrame = joint.rotationKeyframes[frame - 1];

                float timeDelta = curFrame.time - prevFrame.time;
                float interpValue = (float) ((time - prevFrame.time) / timeDelta);

                //          assert( interpValue >= 0 && interpValue <= 1 );

                Quaternion qPrev = new Quaternion(prevFrame.parameter);
                Quaternion qCur = new Quaternion(curFrame.parameter);
                Quaternion qFinal = new Quaternion(qPrev, qCur, interpValue);
                transform.setRotationQuaternion(qFinal);
            }
            transform.setTranslation(transVec);

            Matrix relativeFinal = new Matrix(joint.relative);
            relativeFinal.postMultiply(transform);

            if (joint.parent == -1)
                joint.m_final.set(relativeFinal.getMatrix());
            else {
                joint.m_final.set(joints[joint.parent].m_final.getMatrix());
                joint.m_final.postMultiply(relativeFinal);
            }
        }
    }


    public void draw() {
        advanceAnimation();
        boolean texEnabled = gl.glIsEnabled(GL.GL_TEXTURE_2D);
        // Draw by group
        for (int i = 0; i < numMeshes; i++) {
            int materialIndex = meshes[i].materialIndex;
            if (materialIndex >= 0) {
                gl.glMaterialfv(GL.GL_FRONT, GL.GL_AMBIENT, materials[materialIndex].ambient);
                gl.glMaterialfv(GL.GL_FRONT, GL.GL_DIFFUSE, materials[materialIndex].diffuse);
                gl.glMaterialfv(GL.GL_FRONT, GL.GL_SPECULAR, materials[materialIndex].specular);
                gl.glMaterialfv(GL.GL_FRONT, GL.GL_EMISSION, materials[materialIndex].emissive);
                gl.glMaterialf(GL.GL_FRONT, GL.GL_SHININESS, materials[materialIndex].shininess);

                if (materials[i].textureFilename.length() > 0) {
                    textureManager.bindTexture(materials[i].textureFilename);
                    gl.glEnable(GL.GL_TEXTURE_2D);
                } else
                    gl.glDisable(GL.GL_TEXTURE_2D);
            } else {
                // Material properties?
                gl.glDisable(GL.GL_TEXTURE_2D);
            }

            gl.glBegin(GL.GL_TRIANGLES);
            {
                for (int j = 0; j < meshes[i].numTriangles; j++) {
                    int triangleIndex = meshes[i].triangleIndices[j];
                    Triangle pTri = (Triangle) (triangles[triangleIndex]);

                    for (int k = 0; k < 3; k++) {

                        int index = pTri.vertexIndices[k];

                        if (vertices[index].boneId == -1) {
                            // same as before
                            gl.glTexCoord2f(pTri.s[k], pTri.t[k]);
                            gl.glNormal3fv(pTri.vertexNormals[k]);
                            gl.glVertex3fv(vertices[index].point);

                        } else {
                            // rotate according to transformation matrix
                            Matrix finalMatrix = joints[vertices[index].boneId].m_final;

                            gl.glTexCoord2f(pTri.s[k], pTri.t[k]);
                            Vector newNormal = new Vector(pTri.vertexNormals[k]);
                            newNormal.transform3(finalMatrix);
                            newNormal.normalize();

                            gl.glNormal3fv(newNormal.getVector3());
                            Vector newVertex = new Vector(vertices[index].point);
                            newVertex.transform(finalMatrix);

                            gl.glVertex3fv(newVertex.getVector3());

                        }
                    }
                }
            }
            gl.glEnd();
        }

        if (texEnabled)
            gl.glEnable(GL.GL_TEXTURE_2D);
        else
            gl.glDisable(GL.GL_TEXTURE_2D);


    }

   public void restart() {
        for (int i = 0; i < numJoints; i++) {
            joints[i].currentRotationkeyframe = joints[i].currentTranslationkeyframe = 0;
            joints[i].m_final.set(joints[i].absolute.getMatrix());
        }

        timer.reset();
    }
5  Java Game APIs & Engines / JOGL Development / Problem with cel shading on: 2003-07-22 16:33:29
I read the tutorial at nehe and found some other resources on the net and thought it would be cool to try. But I don't get it to work, the shading looks more like a zebra than the effect i want. I'm sure the error is very obvious but i've looked at this code for ages now and I don't understand what's wrong.

This is the effect I get: (it's supposed to be a cube)

I'll give a big cel shaded hug to the person who can help me Smiley

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
import net.java.games.jogl.*;

import java.nio.FloatBuffer;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;

public class TestCelShade implements GLEventListener {
    private GL gl;
    private GLU glu;
    private GLDrawable glDrawable;
    private FloatBuffer cubeVertives;
    private FloatBuffer cubeNormals;
    private int numberOfVertices = 0;
    private int[] shaderTexture = new int[1];
    private int[] shaderProgram = new int[1];
    private String programString = "";
    private float rotz = 0;
    private float[] lp = new float[]{1,-2,-3};

    public void initShadow() {
        int[] shaderData = new int[]{127, 127, 127, 191, 191, 191, 191, 191,
                                     255, 255, 255, 255, 255, 255, 255, 255};

        gl.glGenTextures(1, shaderTexture);
        gl.glBindTexture(GL.GL_TEXTURE_1D, shaderTexture[0]);
        gl.glTexImage1D (GL.GL_TEXTURE_1D, 0, GL.GL_RGBA, 16, 0, GL.GL_LUMINANCE , GL.GL_UNSIGNED_BYTE, shaderData);

        gl.glTexParameteri(GL.GL_TEXTURE_1D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST);
        gl.glTexParameteri(GL.GL_TEXTURE_1D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);

        gl.glTexParameteri(GL.GL_TEXTURE_1D, GL.GL_TEXTURE_WRAP_S, GL.GL_CLAMP);
        gl.glTexParameteri(GL.GL_TEXTURE_1D, GL.GL_TEXTURE_WRAP_T, GL.GL_CLAMP);
    }

    public void addVertice(float x, float y, float z) {
        cubeVertives.put(x);
        cubeVertives.put(y);
        cubeVertives.put(z);
        numberOfVertices++;
    }

    public void addNormal(float x, float y, float z) {
        for (int i = 0; i < 4; i++) {
            cubeNormals.put(x);
            cubeNormals.put(y);
            cubeNormals.put(z);
        }
    }

    public void initCube() {
        ByteBuffer verticeByteBuffer = ByteBuffer.allocateDirect(36000);
        verticeByteBuffer.order(ByteOrder.nativeOrder());
        cubeVertives = verticeByteBuffer.asFloatBuffer();


        addVertice(-1.0f, -1.0f, 1.0f);
        addVertice(1.0f, -1.0f, 1.0f);
        addVertice(1.0f, 1.0f, 1.0f);
        addVertice(-1.0f, 1.0f, 1.0f);

        addVertice(-1.0f, -1.0f, -1.0f);
        addVertice(-1.0f, 1.0f, -1.0f);
        addVertice(1.0f, 1.0f, -1.0f);
        addVertice(1.0f, -1.0f, -1.0f);

        addVertice(-1.0f, 1.0f, -1.0f);
        addVertice(-1.0f, 1.0f, 1.0f);
        addVertice(1.0f, 1.0f, 1.0f);
        addVertice(1.0f, 1.0f, -1.0f);

        addVertice(-1.0f, -1.0f, -1.0f);
        addVertice(1.0f, -1.0f, -1.0f);
        addVertice(1.0f, -1.0f, 1.0f);
        addVertice(-1.0f, -1.0f, 1.0f);

        addVertice(1.0f, -1.0f, -1.0f);
        addVertice(1.0f, 1.0f, -1.0f);
        addVertice(1.0f, 1.0f, 1.0f);
        addVertice(1.0f, -1.0f, 1.0f);

        addVertice(-1.0f, -1.0f, -1.0f);
        addVertice(-1.0f, -1.0f, 1.0f);
        addVertice(-1.0f, 1.0f, 1.0f);
        addVertice(-1.0f, 1.0f, -1.0f);

        ByteBuffer normalByteBuffer = ByteBuffer.allocateDirect(36000);
        normalByteBuffer.order(ByteOrder.nativeOrder());
        cubeNormals = normalByteBuffer.asFloatBuffer();

        addNormal(0, 0, 1);
        addNormal(0, 0, -1);
        addNormal(0, 1, 0);
        addNormal(0, -1, 0);
        addNormal(1, 0, 0);
        addNormal(-1, 0, 0);

    }

    public void init(GLDrawable drawable) {
        this.gl = drawable.getGL();
        this.glu = drawable.getGLU();
        this.glDrawable = drawable;


        this.glDrawable.setGL(new DebugGL(drawable.getGL()));
        gl.glEnable(GL.GL_TEXTURE_2D);
        gl.glDisable(GL.GL_LINE_SMOOTH);

        gl.glEnable(GL.GL_CULL_FACE);
        gl.glShadeModel(GL.GL_SMOOTH);
        gl.glClearColor(0.5f, 0.5f, 0.5f, 1f);
        gl.glClearDepth(1.0f);

        gl.glEnable(GL.GL_DEPTH_TEST);
        gl.glDepthFunc(GL.GL_LEQUAL);
        gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
        gl.glLineWidth(2f);

        try {
            BufferedReader input = new
                    BufferedReader(new InputStreamReader(new FileInputStream("shader.txt")));

            String line = input.readLine();
            while (line != null) {
                programString += line + "\n";
                line = input.readLine();
            }
            input.close();
        } catch (Exception e) {
            System.out.println("Error, vertex program not loaded");
        }
        gl.glGenProgramsNV(1, shaderProgram);
        gl.glLoadProgramNV(GL.GL_VERTEX_PROGRAM_NV, shaderProgram[0], programString.length(), programString);
        gl.glBindProgramNV(GL.GL_VERTEX_PROGRAM_NV, shaderProgram[0]);

        gl.glTrackMatrixNV(GL.GL_VERTEX_PROGRAM_NV, 0, GL.GL_MODELVIEW_PROJECTION_NV, GL.GL_IDENTITY_NV);


        initShadow();
        initCube();

        gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
        gl.glVertexPointer(3, GL.GL_FLOAT, 0, cubeVertives);

        gl.glEnableClientState(GL.GL_NORMAL_ARRAY);
        gl.glNormalPointer(GL.GL_FLOAT, 0, cubeNormals);

    }



    public void display(GLDrawable drawable) {

        gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT);
        gl.glLoadIdentity();
        gl.glFrustum(-1, 1, -1, 1, 1, 20);
        float[] imm = new float[16];


        gl.glTranslatef(0.0f, 0.0f, -5.0f);

        gl.glRotatef(-45.0f, 1.0f, 0.0f, 0.0f);
        gl.glRotatef(rotz, 0.0f, 0.0f, 1.0f);
        gl.glGetFloatv(GL.GL_MODELVIEW_MATRIX, imm);

        float modelLightPosX = imm[0]*lp[0] + imm[1]*lp[1] + imm[2]*lp[2];
        float modelLightPosY = imm[4]*lp[0] + imm[5]*lp[1] + imm[6]*lp[2];
        float modelLightPosZ = imm[8]*lp[0] + imm[9]*lp[1] + imm[10]*lp[2];

        gl.glProgramParameter4fNV(GL.GL_VERTEX_PROGRAM_NV, 4,
                                  modelLightPosX, modelLightPosY,
                                  modelLightPosZ, 1f);



        gl.glColor4f(0.75f, 0.95f, 1.0f, 1.0f);
        gl.glDisable(GL.GL_TEXTURE_2D);
        gl.glBindTexture(GL.GL_TEXTURE_1D, shaderTexture[0]);
        gl.glEnable(GL.GL_TEXTURE_1D);
        gl.glEnable(GL.GL_VERTEX_PROGRAM_NV);
        gl.glDrawArrays(GL.GL_QUADS, 0, numberOfVertices);
        gl.glDisable(GL.GL_VERTEX_PROGRAM_NV);

        gl.glDisable(GL.GL_TEXTURE_1D);

        gl.glEnable(GL.GL_CULL_FACE);
        gl.glCullFace(GL.GL_FRONT);
        gl.glColor4f(0.0f, 0.0f, 0.0f, 0.0f);
        gl.glPolygonMode(GL.GL_BACK, GL.GL_LINE);
        gl.glDrawArrays(GL.GL_QUADS, 0, numberOfVertices);
        gl.glCullFace(GL.GL_BACK);



        rotz -= 0.8f;

    }

    public void reshape(GLDrawable drawable, int x, int y, int width, int height) {

        gl.glViewport(0, 0, width, height);
        gl.glMatrixMode(GL.GL_PROJECTION);
        gl.glLoadIdentity();
        gl.glMatrixMode(GL.GL_MODELVIEW);
        gl.glLoadIdentity();
    }

    public void displayChanged(GLDrawable drawable, boolean modeChanged, boolean deviceChanged) {
    }
}


and the vertex program
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
!!VP1.0
# Vertex Program for cel shading
# c[0]-c[3] modelviewProjection matrix
# c[4]      model space light position

# Compute position
DP4 o[HPOS].x, c[0], v[OPOS];
DP4 o[HPOS].y, c[1], v[OPOS];
DP4 o[HPOS].z, c[2], v[OPOS];
DP4 o[HPOS].w, c[3], v[OPOS];

#output color
MOV o[COL0], v[COL0];

#calculate tex coord
#R0=light vector
ADD R0, c[4], -v[OPOS];

#R1 = normalize R0
DP3 R1.w, R0, R0;
RSQ R1.w, R1.w;
MUL R1.xyz, R0, R1.w;

#dot with normal for tex0.x
DP3 o[TEX0].x, R1, v[NRML];

END

6  Java Game APIs & Engines / JOGL Development / Re: VertexArray on: 2003-07-22 08:55:14
I got it to work when I changed
1  
gl.glDrawArrays(GL.GL_TRIANGLES, 0, 1);
to
1  
gl.glDrawArrays(GL.GL_TRIANGLES, 0, 3); 


I'll try to think before I post next time  Grin
7  Java Game APIs & Engines / JOGL Development / Re: VertexArray on: 2003-07-22 05:33:28
I thought this code would paint something to the screen, what did i do wrong?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
ByteBufferbb = ByteBuffer.allocateDirect(9 * 4);
bb.order(ByteOrder.nativeOrder());
FloatBuffer bufPoints = bb.asFloatBuffer();
bufPoints.put(-1f);
bufPoints.put(-1f);
bufPoints.put(1f);
bufPoints.put(1f);
bufPoints.put(-1f);
bufPoints.put(1f);
bufPoints.put(1f);
bufPoints.put(1f);
bufPoints.put(1f);
gl.glEnableClientState(GL.GL_VERTEX_ARRAY);
g.glVertexPointer(3, GL.GL_FLOAT, 0, bufPoints);

gl.glDrawArrays(GL.GL_TRIANGLES, 0, 1);
8  Java Game APIs & Engines / JOGL Development / VertexArray on: 2003-07-21 22:35:04
I'm stuck with VertexArrays, I can't get it to work. Cry Does anyone have a small working example (for jogl)? Tongue
9  Java Game APIs & Engines / JOGL Development / Re: Arrrgggg on: 2003-07-21 06:25:12
I had the same problem yesterday with the stencil buffer. I almost threw my computer out of the window  before I found the solution Tongue
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (71 views)
2014-11-26 15:22:04

toopeicgaming1999 (60 views)
2014-11-26 15:20:36

toopeicgaming1999 (14 views)
2014-11-26 15:20:08

SHC (27 views)
2014-11-25 12:00:59

SHC (25 views)
2014-11-25 11:53:45

Norakomi (31 views)
2014-11-25 11:26:43

Gibbo3771 (25 views)
2014-11-24 19:59:16

trollwarrior1 (38 views)
2014-11-22 12:13:56

xFryIx (77 views)
2014-11-13 12:34:49

digdugdiggy (55 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!