Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (483)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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 / OpenGL Development / Re: Help ANT and LWJGL ! on: 2012-02-03 05:11:52
I had just the idea of ​​creating a 'jar' which is one of my application launcher and launch just the 'jar' that needs libraries that seems a good idea right?
2  Java Game APIs & Engines / OpenGL Development / Re: Help ANT and LWJGL ! on: 2012-02-02 19:02:19
I fixed the bug for the Compile and Run Ant Task.... but... don't for the Creat .jar task...

My build.xml :
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  
<?xml version="1.0" encoding="utf-8"?>
<project name="..." default="but">
  <target name="init" depends="initprojet,initPerso,initstructure,initClasspath"/>

  <target name="but"
      description=" : cible par defaut" depends="run"/>

  <target name="initprojet"
         description=" : initialisation des proprietes du projet">
   <property name="MainClass"      value="MainClass"/>
   <property name="TestClass"      value="TestClass"/>
   <property name="build.compiler" value="javac1.5"/>
   <property name="JarFile"        value="JarFile.jar"/>
    <property name="charset"        value="utf8"/>
   <property name="compiler"       value="javac1.6"/>
   <property name="source"         value="1.6"/>
    <!-- You OS : macosx, linux, windows -->
    <property name="os"             value="macosx"/>
  </target>
 
  <target name="initPerso"
         description=" : initialisation des chemins sur son ordinateur">
    <property name="pathAPI"       value="file:///Ressources/javadoc/api"/>
  </target>
 
  <target name="initstructure"
         description=" : initialisation des proprietes liees a la stucture">
      <property name="dirRes"     value="ress"/>
      <property name="dirClass"   value="class"/>
      <property name="dirDocs"    value="doc"/>
      <property name="dirSource"  value="src"/>
      <property name="dirBuild"   value="build"/>
      <property name="dirLib"     value="lib"/>

      <property name="pathSrc"    value="${basedir}/${dirSource}"/>
      <property name="pathClass"  value="${basedir}/${dirClass}"/>
      <property name="pathDocs"   value="${basedir}/${dirBuild}/${dirDocs}"/>
      <property name="pathRes"    value="${basedir}/${dirRes}"/>
      <property name="pathBuild"  value="${basedir}/${dirBuild}"/>
      <property name="pathLib"    value="${basedir}/${dirLib}"/>
     
     <mkdir dir="${pathClass}"/>
  </target>
 
  <target name="initClasspath"
      description=" : initialisation des chemins d'acces aux classes">
     <path id="projectClasspath">
      <pathelement path="${pathClass}/"/>
      <pathelement path="${pathLib}/junit/junit-4.8.2.jar"/>
      <pathelement path="${pathLib}/lwjgl/lwjgl.jar"/>
      <pathelement path="${pathLib}/lwjgl/lwjgl_util.jar"/>
     </path>
      <property name="pathNativeLwjgl" value="${pathLib}/lwjgl/${os}" />
  </target>

   <target name="compile" depends="init"
      description=" : compilation des programmes sous le repertoire sources">
      <mkdir dir="${pathClass}"/>
      <javac srcdir="${pathSrc}" destdir="${pathClass}" source="${source}"
        debug="on" debuglevel="lines,vars,source"
        compiler="${compiler}" includeantruntime="false">
        <classpath refid="projectClasspath"/>
      </javac>
      <!-- For uzip all library in the class path
      <unzip dest="${pathClass}">
        <fileset dir="${pathLib}">
        </fileset>
      </unzip>
      -->
   </target>
   
   <target name="tests" depends="compile"
      description=" : tests du modele">
      <java classname="${TestClass}" fork="true">
      <classpath refid="projectClasspath"/>
        <assertions>
            <enable/>
        </assertions>
      </java>
   </target>
   
   <target name="doc" depends="compile"
      description=" : documentation des programmes sous le repertoire sources">
      <mkdir dir="${pathDocs}"/>
      <javadoc destdir="${pathDocs}" Author="true" Version="true" Private="true"
         encoding="${charset}" charset="${charset}" docencoding="${charset}">
         <fileset dir="${pathSrc}"/>
         <classpath refid="projectClasspath"/>
         <link href="${pathAPI}"/>
      </javadoc>
   </target>
     
   <target name="run" depends="compile"
      description=" : execution de la classe principale de l application">
      <java classname="${MainClass}" fork="true">
      <classpath refid="projectClasspath"/>
        <assertions>
            <enable/>
        </assertions>
      <jvmarg value="-Djava.library.path=${pathNativeLwjgl}"/>
      </java>
   </target>
   
   <target name="build" depends="compile"
      description=" : construction d une application double-clickable">
      <jar destfile="${pathBuild}/${JarFile}" index="true">
            <manifest>
                <attribute name="Main-Class" value="${MainClass}" />
                <attribute name="Built-By"   value="${user.name}" />
            </manifest>
            <fileset dir="${pathClass}"/>
            <fileset dir="${basedir}">
                <include name="${dirRes}/"/>
                <include name="${dirLib}/"/>
            </fileset>
      </jar>
   </target>
   
   <target name="clean" depends="init"
    description=" : nettoyage des .class et de la documentation">
      <delete dir="${dirClass}" />
      <delete dir="${dirDocs}" />
   </target>
   
   <target name="cleanall" depends="init"
    description=" : nettoyage des .class, de la documentation et de l'application double-clickable.">
      <delete dir="${dirClass}" />
      <delete dir="${dirDocs}" />
        <delete dir="${dirBuild}" />
   </target>
</project>


How can I do for the simple double click the jar file can be run taking into account the '-Djava.library.path = $ {pathNativeLwjgl}'?
3  Java Game APIs & Engines / OpenGL Development / Re: Help ANT and LWJGL ! on: 2012-02-01 16:02:27
I've this error :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
     [java]    at net.battlesquare.src.Battlesquare.<init>(Battlesquare.java:16)
     [java]    at net.battlesquare.src.BattlesquareImpl.<init>(BattlesquareImpl.java:14)
     [java]    at net.battlesquare.client.BattlesquareClient.main(BattlesquareClient.java:21)
     [java] Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
     [java]    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java]    at java.security.AccessController.doPrivileged(Native Method)
     [java]    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java]    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [java]    ... 3 more
4  Java Game APIs & Engines / OpenGL Development / Help ANT and LWJGL ! on: 2012-02-01 10:53:26
Hi all,

I would like to use 'Ant' to compile and create the '.jar' of my project.
But I can not properly integrate the LWJGL library, I wonder what I should put in the 'Ant task' which I use at compile time, the launch and creation of the executable file ('.jar').

The three 'Ant task':
Compilation:
1  
2  
3  
4  
5  
6  
7  
8  
9  
<target name="compile" depends="init"
      description=" : compilation des programmes sous le repertoire sources">
      <mkdir dir="${pathClass}"/>
      <javac srcdir="${pathSrc}" destdir="${pathClass}" source="${source}"
        debug="on" debuglevel="lines,vars,source"
        compiler="${compiler}" includeantruntime="false">
        <classpath refid="projectClasspath"/>
      </javac>
</target>


Running:
1  
2  
3  
4  
5  
6  
7  
8  
<target name="run" depends="compile"
      description=" : execution de la classe principale de l application">
      <java classname="${MainClass}" classpath="${pathClass}" fork="true">
        <assertions>
            <enable/>
        </assertions>
      </java>
</target>


Creat .jar:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
<target name="build" depends="compile"
      description=" : construction d une application double-clickable">
      <jar destfile="${pathBuild}/${JarFile}" index="true">
            <manifest>
                <attribute name="Main-Class" value="${MainClass}" />
                <attribute name="Built-By"   value="${user.name}"/>
            </manifest>
            <fileset dir="${pathClass}"/>
            <fileset dir="${basedir}">
                <include name="${dirRes}/"/>
            </fileset>
      </jar>
</target>


How do I do to integrate the library in my project?
5  Java Game APIs & Engines / OpenGL Development / Re: Problem with classpath and inclued LWJGL library for my .jar file ! on: 2011-05-31 15:27:59
Another tool you can use is JarSplice, this will create a single executable jar file (from all your jars and native files). This will then work on windows, mac and linux.

A BIG THANK YOU for your link JarSplice ")!
It solves my all problems at once;)!
6  Java Game APIs & Engines / OpenGL Development / Re: Problem with classpath and inclued LWJGL library for my .jar file ! on: 2011-05-31 15:12:45
When I use the tool "Jar Bundler" mac, I add the files in the library as a resource and there it works ... but how am I going to create the. exe for windows and linux? For the "Jar Bundler" creates one .app, and it does not seem to me that it turned a bit. app in. exe or running Linux.
7  Java Game APIs & Engines / OpenGL Development / Re: Problem with classpath and inclued LWJGL library for my .jar file ! on: 2011-05-31 14:57:50
Is it also necessary that the line "Class-Path:" I Mettes link to. jnilib and. dylib that is located in the native / macosx /?
Otherwise these files. jnilib and. dylib are in the folder "lib", I forget to put them in my drawing.
8  Java Game APIs & Engines / OpenGL Development / Re: GL11.glRenderMode(GL11.GL_SELECT) problem :s !! on: 2011-05-31 12:19:05
Can you tell me more about this method ? (with the code)
9  Java Game APIs & Engines / OpenGL Development / Problem with classpath and inclued LWJGL library for my .jar file ! on: 2011-05-31 12:15:28
With ANT write the line Class-Path from MANIFEST.MF like this:
1  
Class-Path: lib/lwjgl.jar lib/lwjgl_util.jar lib/jinput.jar


And yet it tells me it can not find the library classes, I began well for all files .jar library in a sub-folder lib!
1  
2  
3  
4  
5  
6  
+build
   +lib
       lwjgl.jar
       lwjgl_util.jar
       jinput.jar
   app.jar


Why it does not work?
10  Java Game APIs & Engines / OpenGL Development / Re: GL11.glRenderMode(GL11.GL_SELECT) problem :s !! on: 2011-05-31 09:24:06
Problem solved! Wink

I was calling this function after calling my function to display the HUD, the coup matrices were taking the wrong values​​.
11  Java Game APIs & Engines / OpenGL Development / Re: GL11.glRenderMode(GL11.GL_SELECT) problem :s !! on: 2011-05-31 09:18:00
I found it :
1  
2  
3  
        IntBuffer selectBuffer = BufferUtils.createIntBuffer(512);
        GL11.glSelectBuffer(selectBuffer);
        GL11.glRenderMode(GL11.GL_SELECT);


But strangely, now in 3D target point through the center of the screen is always in the same manner, 0 to X, 0 to Y and -0 .**** to Z.
(0, 0, -0 .***)
Why?
12  Java Game APIs & Engines / OpenGL Development / GL11.glRenderMode(GL11.GL_SELECT) problem :s !! on: 2011-05-31 08:33:02
I do not know why, but when I try to use GL11.glRenderMode (GL11.GL_SELECT) to manage a viewfinder on the objects of my 3D scenes it gets me this error:
1  
2  
3  
4  
5  
6  
Exception in thread "main" org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:59)
   at org.lwjgl.opengl.GL11.glRenderMode(GL11.java:2573)
   at Renderer.test(Renderer.java:117)
   at Renderer.start(Renderer.java:77)
   at Main.main(Main.java:19)


Line 117 of file Renderer.java corresponds to the line where I call to GL11.glRenderMode (GL11.GL_SELECT)!

Here is the complete code of the function:
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  
public void test(float xcam, float zcam, float ycam)
    {
        GL11.glRenderMode(GL11.GL_SELECT);
        IntBuffer viewport = BufferUtils.createIntBuffer(16);
        FloatBuffer modelview = BufferUtils.createFloatBuffer(16);
        FloatBuffer projection = BufferUtils.createFloatBuffer(16);
        FloatBuffer fDepth = BufferUtils.createFloatBuffer(1);
        FloatBuffer position = BufferUtils.createFloatBuffer(3);
       
        GL11.glGetInteger(GL11.GL_VIEWPORT, viewport);
        GL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelview);
        GL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projection);
       
        GL11.glReadPixels( SCREEN_WIDTH/2, viewport.get(3) - (SCREEN_HEIGHT/2), 1, 1, GL11.GL_DEPTH_COMPONENT, GL11.GL_FLOAT, fDepth);
        GLU.gluUnProject((float)(SCREEN_WIDTH/2), viewport.get(3) - (float)(SCREEN_HEIGHT/2), fDepth.get(), modelview, projection, viewport, position);
   
        float distMaxPick = (float)Math.sqrt(Math.pow(xcam - position.get(0), 2)+Math.pow(ycam - position.get(1), 2)+Math.pow(zcam - position.get(2), 2));
        if (distMaxPick <= 2.5*CUBESIZE)
            tabCube[(int)(position.get(0)/CUBESIZE)][(int)(position.get(2)/CUBESIZE)][(int)(position.get(1)/CUBESIZE)].aimed(basicTexPack, CUBESIZE);
   
        /*
        System.out.println("World coords at z=" + fDepth.get(0) + "are (" +
           (int)(position.get(0)/CUBESIZE) + ", " +
           (int)(position.get(1)/CUBESIZE) + ", " +
           (int)(position.get(2)/CUBESIZE)+
                                            ")");
        */

        GL11.glRenderMode(GL11.GL_RENDER);
    }
13  Java Game APIs & Engines / JOGL Development / Re: Cube Texturing, HELP pls ! on: 2011-05-24 15:03:01
Quote
Did you set your near-clipping-plane to (almost) zero? (in the projection matrix)
I must admit I'm confused ... How can I do to do this?
Quote
Did you remember to request a depth buffer when creating your display?
Same question ... lol
14  Java Game APIs & Engines / JOGL Development / Cube Texturing, HELP pls ! on: 2011-05-24 10:22:09
I feel there is a problem with the Z-BUFFER!
I can not make the faces of the cubes are properly textured visible or not.
Here is what I obtain:

and here is my code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
@Override
    public void init(GLAutoDrawable gLDrawable)
    {
       System.out.println("init() called");
        GL2 gl = gLDrawable.getGL().getGL2();
        gl.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
        gl.glEnable(GL2.GL_DEPTH_TEST);                                          // Enables Depth Testing
       gl.glDepthFunc(GL2.GL_LESS);
    }

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  
gl.glColor3f(1.0f, 1.0f, 1.0f);
        gl.glEnable(GL2.GL_BLEND);
        gl.glBlendFunc(GL2.GL_SRC_ALPHA, GL2.GL_ONE_MINUS_SRC_ALPHA);
       
        texPack.getTexture(numtex).getTop().enable();
        texPack.getTexture(numtex).getTop().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glBegin(GL2.GL_QUADS);
        gl.glNormal3f(0.0f, 1.0f, 0.0f);
        gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z + CUBESIZE);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x, y + CUBESIZE, z + CUBESIZE);
        gl.glEnd();
        texPack.getTexture(numtex).getTop().disable();
       
   texPack.getTexture(numtex).getBottom().enable();
        texPack.getTexture(numtex).getBottom().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glNormal3f(0.0f, -1.0f, 0.0f);
   gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y, z);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x, y, z);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x, y, z + CUBESIZE);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y, z + CUBESIZE);
        gl.glEnd();
        texPack.getTexture(numtex).getBottom().disable();
       
   texPack.getTexture(numtex).getRight().enable();
        texPack.getTexture(numtex).getRight().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glBegin(GL2.GL_QUADS);
        gl.glNormal3f(1.0f, 0.0f, 0.0f);
   gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z + CUBESIZE);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y, z);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y, z + CUBESIZE);
        gl.glEnd();
        texPack.getTexture(numtex).getRight().disable();
   
   texPack.getTexture(numtex).getLeft().enable();
        texPack.getTexture(numtex).getLeft().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glBegin(GL2.GL_QUADS);
        gl.glNormal3f(-1.0f, 0.0f, 0.0f);
   gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x, y + CUBESIZE, z + CUBESIZE);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x, y, z + CUBESIZE);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x, y, z);
        gl.glEnd();
        texPack.getTexture(numtex).getLeft().disable();
   
   texPack.getTexture(numtex).getFront().enable();
        texPack.getTexture(numtex).getFront().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glBegin(GL2.GL_QUADS);
        gl.glNormal3f(0.0f, 0.0f, 1.0f);
   gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x, y + CUBESIZE, z + CUBESIZE);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z + CUBESIZE);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y, z + CUBESIZE);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x, y, z + CUBESIZE);
        gl.glEnd();
        texPack.getTexture(numtex).getFront().disable();
   
   texPack.getTexture(numtex).getBack().enable();
        texPack.getTexture(numtex).getBack().bind();
        gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MAG_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_MIN_FILTER, GL2.GL_NEAREST);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_S, GL2.GL_REPEAT);
   gl.glTexParameteri(GL2.GL_TEXTURE_2D, GL2.GL_TEXTURE_WRAP_T, GL2.GL_REPEAT);
   gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glBegin(GL2.GL_QUADS);
        gl.glNormal3f(0.0f, 0.0f, -1.0f);
   gl.glTexCoord2d(0.0f, 0.0f); gl.glVertex3f(x + CUBESIZE, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 0.0f); gl.glVertex3f(x, y + CUBESIZE, z);
   gl.glTexCoord2d(1.0f, 1.0f); gl.glVertex3f(x, y, z);
   gl.glTexCoord2d(0.0f, 1.0f); gl.glVertex3f(x + CUBESIZE, y, z);
        gl.glEnd();
        texPack.getTexture(numtex).getBack().disable();
       
        gl.glDisable(GL2.GL_BLEND);

texPack.getTexture(numtex).getTop() // Renvoi l'objet Texture ou est charger le fichier top.png
texPack.getTexture(numtex).getBottom() // Renvoi l'objet Texture ou est charger le fichier bottom.png
texPack.getTexture(numtex).getRight() // Renvoi l'objet Texture ou est charger le fichier right.png
texPack.getTexture(numtex).getLeft() // Renvoi l'objet Texture ou est charger le fichier left.png
texPack.getTexture(numtex).getFront() // Renvoi l'objet Texture ou est charger le fichier front.png
texPack.getTexture(numtex).getBack() // Renvoi l'objet Texture ou est charger le fichier back.png

Please HELP ME !!
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.

CopyableCougar4 (18 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (63 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (38 views)
2014-08-06 19:49:38
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

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!