Should JCD create a thread specific to his demos?

After spending few hours creating my first LWJGL fragment/Vertex shaders demo, I was ready to start a JWS thread where I expose webstart applications, zip files and online code.
But then it hit me; do people really care what a guy on the other side of the planet does with his free time?
Am I bothering some of you fellow programers with my posting habits?
Am I just a cocky bastard? <— I know for sure I’m not
Anyways, here’s a little snap shot of my awt/swing less lwjgl demo:

http://www.users.xith.org/JavaCoolDude/Pictures/CEBM.jpg

Some little code


  private static void makeShaderCode(String filename, boolean isFragment){

    ClassLoader   fileLoader      = ModelLoader.class.getClassLoader();
    InputStream   fileInputStream = fileLoader.getResourceAsStream(filename);
    StringBuffer  fileContent     = new StringBuffer();

    int           charByChar      =  0;

     try{
       if(fileInputStream == null)
        fileInputStream = new java.io.FileInputStream(filename);
      while ((charByChar = fileInputStream.read()) != -1)
        fileContent.append((char)charByChar);

     fileInputStream.close();
    }
    catch(Exception e ){}

    byte[] shaderCode = fileContent.toString().getBytes();

    if(isFragment){
      IntBuffer   id          = createIntBuffer(1);
      ByteBuffer  fragmentPro = ByteBuffer.allocateDirect(shaderCode.length)
                                          .order(ByteOrder.nativeOrder())
                                          .put(shaderCode);
      fragmentPro.flip();
      ARBFragmentProgram.glGenProgramsARB(id);
      fragmentProID = id.get(0);

      ARBFragmentProgram.glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB ,
                                          fragmentProID);
      ARBFragmentProgram.glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB,
                                            ARBFragmentProgram.GL_PROGRAM_FORMAT_ASCII_ARB,
                                            fragmentPro);
    }
    else{
      IntBuffer   id        = createIntBuffer(1);
      ByteBuffer  vertexPro = ByteBuffer.allocateDirect(shaderCode.length)
                                        .order(ByteOrder.nativeOrder())
                                        .put(shaderCode);
      vertexPro.flip();
      ARBVertexProgram.glGenProgramsARB(id);
      vertexProID = id.get(0);

      ARBVertexProgram.glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB ,
                                        vertexProID);
      ARBVertexProgram.glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB,
                                          ARBVertexProgram.GL_PROGRAM_FORMAT_ASCII_ARB,
                                          vertexPro);
    }
  }

FWIW, I like when people show what is possible using an API (be it any api). especially the more advanced stuff, since it shows what is possible using OpenGL (with Java).

Would you mind donating (and releasing under bsd) some of your demos for inclusion in an LWJGL example package?

Keep 'em coming!

ps. Turn on anti aliasing!!

One day somebody will tell me how to write shaders :slight_smile:
Or better still there will just be a nice big library of them then I can pick and choose from…

Cas :slight_smile:

I wish I had a graphics card that ran ARB Fragment Programs. :’(

as an artist, it makes me wish java games start to appear everywhere. Few free engines in c++ to do some of the features you show.

True realtime reflection is something I even doubt is possible in a game, though…

I have worked in a game , and we just used environment maps…

the md3 demo (hey, I think I saw that sony character too in the Lone Runner opengl demos :wink: ) for example showed me java can display md3 quite well…

I have lately seen some java engines like JMEL or something and JTPtc or something like that, with which I saw this first basic demo : www.tokima.com .Seriously these days I’m discovering a new world. I thought it all was restricted to c++, blitz3d , dbpro and gamestudio…

[quote] ps. Turn on anti aliasing!!
[/quote]
yep… :wink:

[quote]True realtime reflection is something I even doubt is possible in a game, though…
[/quote]
cough Project Gotham Racing cough

I’d love to see them, and I’m sure a lot of people who are new opengl/lwjgl (me for one) will be able to pick up a few pointers from your code. As long as I don’t get the culling bug that is ;D

[quote] cough Project Gotham Racing cough
[/quote]
oops

And I even read the review in a magazine…

heck

getting old

Check my newly created thread ;D

And if any of them could legitimately be called “games”, and are webstart, then I’d rush to include them in the java games list…