Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (753)
Games in Android Showcase (228)
games submitted by our members
Games in WIP (842)
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] 2
1  Java Game APIs & Engines / JOGL Development / Re: Is this a smart engine design? on: 2007-05-03 06:52:31
maybe you can take a look at the c++ irrlicht engine ( which has imho a very good and not to difficult design. this helped me a lot.
2  Java Game APIs & Engines / JOGL Development / Re: Mesh Distribution Format on: 2007-04-25 06:31:54
did you look at the quake model formats? you should do, if you need to load character models. there should be many examples out there.
3  Java Game APIs & Engines / JOGL Development / Re: A few questions on gl shaders on: 2007-04-25 06:27:56
if you are mixing shaders and ffp remember using

gl_Position = ftransform();

instead of

gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;

to gain transform invariance. otherwise you will get artefacts...
4  Java Game APIs & Engines / JOGL Development / Re: Browser repaint problem - JOGL applet on: 2007-04-16 16:47:42
it doesnt seem to be an nvidia driver problem... i have this bad scrolling behaviour on my PowerBook with an ATI Mobility Radeon 9700 running an applet in safari.
os x: 10.4.9, java: 1.5.0_07

calls to glReadPixels return wrong values! glReadPixels seems only to work if the scroll position is at the bottom.

are there any other mac and ati users out there?

5  Java Game APIs & Engines / JOGL Development / Re: Timing / Animation / High FPS - wobbling and jerking on: 2007-04-15 08:20:18

what timing method are you using? to get accurate time values you should use System.nanoTime(), wihich is available since java 5. i dont understand how and why mipmaps improved the situation...

low fps:
maybe you have vsync enabled and your fps are limited by your monitors refresh rate, 60Hz -> 60Fps. see GL.setSwapInterval(...) for disabling it.... but 30-60 fps should be enough to get an smooth animation.

give us some more information/code if you need further help Smiley

6  Java Game APIs & Engines / JOGL Development / Re: Editable Textfield on GLCanvas on: 2007-04-12 10:01:20
thanks, you are right... i'll give it a try. The TextLayout class seems to be the thing i've been looking for.
7  Java Game APIs & Engines / JOGL Development / Re: Editable Textfield on GLCanvas on: 2007-04-12 08:12:52
hmm... i'll solve this by using an extra dialog, where the usere can enter his text. after closing the dialog the text is render via textrenderer. this seems to be the cleanest solution, but by far not as comfortable as "in-place" editing.
all this swing event handling made me go crazy Sad one of the main problems is focus handling, i think.
8  Java Game APIs & Engines / JOGL Development / Editable Textfield on GLCanvas on: 2007-04-11 22:14:41

i need to display some editable text inside my application. jogl's text-render-classes are cool, but i want to use the graphics of a jtextfield, because i need the cursor and textselection to be displayed. the result should be something like a 2d textbox, which is draw "over" the 3d scene. so i only need the real text from the jtextfield and not the other elements like border, background,... and all this should be running on java 1.4.2 (even if its slow)

i looked at the renderdelegate class and the texturerenderer class... but i didnt get it working jet. is it possible to just override the jtextfield's paint method and draw its content into and textrenderer image or somethink like that? or is it possible to "extract" the formated text from the jtextfield and render it using the TextRenderer?
9  Java Game APIs & Engines / JOGL Development / Re: FSAA on MacBook on: 2007-04-10 08:15:42
oh, i really thought it would support fsaa, but it definitely doesnt Sad
maybe you could just add some more documentation on the GLCapabilities, because it was confusing me, that it told me fsaa would be present.

never the less, jogl rocks!
10  Java Game APIs & Engines / Java Sound & OpenAL / Re: Access to the sound InputStream on: 2007-04-09 19:27:40
11  Java Game APIs & Engines / JOGL Development / Re: FSAA on MacBook on: 2007-04-09 19:08:15

i had some problems with the netbeans debugger... getChosenGLCapabilities" doesn't return null on my mac, sorry.

unfortunately i still have no fsaa Sad the unmodified multisample demo is not working. the MultisampleChooser seems to be working correctly. there are no "Warning: ... " messages, but the GLCapabilites returned from getChosenGLCapabilities doesn't support multisampling and i have these ugly lines in both windows.

os x: 10.4.9, lastest jogl builds, intel macbook

did you change somethinge in the "multisample-code", should i try another (older) version? i really need to get this working Sad

12  Java Game APIs & Engines / JOGL Development / Re: FSAA on MacBook on: 2007-04-07 08:56:21
hi ken,
i switched to the lasest build (20070404) and also tried it on my windows system. although fsaa is working, getChosenGLCapabilities also returns null. i added a test, that is called on the first call to display and systen.out.println's the canvas and the chosen capabilities:

// for the working fsaa window[canvas0,4,30,512x512]
// no aa window[canvas0,4,30,512x512]
GLCapabilities [DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red: 8, Green: 8, Blue: 8, Alpha: 0, Red Accum: 16, Green Accum: 16, Blue Accum: 16, Alpha Accum: 16, Multisample: false ]

same results on mac with latest jogl libs, except that fsaa is not working.

the chooser:
    static class MultisampleChooser extends DefaultGLCapabilitiesChooser
   public int chooseCapabilities(GLCapabilities desired,
      GLCapabilities[] available,
      int windowSystemRecommendedChoice)
       boolean anyHaveSampleBuffers = false;
       for (int i = 0; i < available.length; i++)
      GLCapabilities caps = available[i];
      if (caps != null && caps.getSampleBuffers())
          anyHaveSampleBuffers = true;
          System.out.println("num samples: " + caps.getNumSamples());

gives me

"num samples: 2" on windows and
"num samples: 4" on mac

If GLCapabilitiesChooser is so difficult on mac, how to get fsaa working? I still dont understand if it is suposed to work someway...


13  Java Game APIs & Engines / JOGL Development / FSAA on MacBook on: 2007-04-06 23:32:11

the multisample demo is not working on my macbook (gfx: intel gma 950) under os x... the MultisampleChooser finds a GLCapabilities with numSamples = 4, but canvas.getChoosenGLCapabilities returns null and nothing is smooth Sad
are there known issues on fsaa on a mac? am i missing something?

14  Java Game APIs & Engines / JOGL Development / Re: Browser repaint problem - JOGL applet on: 2007-02-28 07:55:47
the same on my box...

XP SP2, Firefox

the faster i scroll, the bigger the dirty rects become. even if the applet bounds dont leave the displayed html page.

edit: and ive never seen a jogl version without this problem.
15  Java Game APIs & Engines / JOGL Development / Re: Making a 3ds loader, need help with transforms... on: 2007-02-27 09:07:30

i think the rotation point you need is in the pivot point in chunk 0xB013 (3 floats)

for the order ot the transformations i found this
  // Magical transformations. 3DS manages transformation oddly, IMHO
  Lib3dsMatrix M;
  lib3ds_matrix_copy(M, mesh->matrix);
  Matrix4 M2(M); M2 = M2.transpose();
  Matrix4 nodeM(node->matrix); nodeM = nodeM.transpose();
  Lib3dsObjectData* obj_data = &node->data.object;
  Matrix4 nodeT = Translation4(-Vector(obj_data->pivot)); nodeT = nodeT.transpose();
  trans = trans*nodeM*nodeT*M2;


maybe it helps...
16  Java Game APIs & Engines / Java Sound & OpenAL / Re: Access to the sound InputStream on: 2007-02-04 09:11:01

you should have a look at the openal sdk capture sample (c++).

what Ulraq didnt mention is the enumeration of the input devices. the capture sample uses "alcGetString(NULL, ALC_CAPTURE_DEVICE_SPECIFIER);" to get a double null terminated string containing all input devices.
if you have more than one inputdevices, it would be very interesting if alc.alcGetStringImpl(NULL, ALC.ALC_CAPTURE_DEVICE_SPECIFIER) returns all of them.
17  Java Game APIs & Engines / Java Sound & OpenAL / Missing Method: alcGetCaptureDeviceSpecifiers() on: 2007-01-30 12:58:56

the openal sdk capture sample uses a call to alcGetString(null, ALC_CAPTURE_DEVICE_SPECIFIER) to get a list of available capture devices in the same way alcGetString(null, ALC_DEVICE_SPECIFIER) does (returning this ugly double null terminated string)... shouldn't there be a method "alcGetCaptureDeviceSpecifiers" for this purpose?
i tried to implement the method myself in my java code (not gluegen). i took the sources from "" and modified "alcGetDeviceSpecifiers()", but "alc.alcGetStringImpl(null, ALC.ALC_CAPTURE_DEVICE_SPECIFIER)" just gives me my default capture device.

Are there any differences between alcGetStringImpl if its called from my code and a call to it from gluegen code (the file mentioned above)?
Do we need the new method "alcGetCaptureDeviceSpecifiers()"?
18  Java Game APIs & Engines / Java Sound & OpenAL / applet record from microphone on: 2007-01-23 20:40:31

is it possible to record from the microphone in applet-code?
...recording in applets is disabled in the "java media framework" and also in "java sound"...

19  Java Game APIs & Engines / JOGL Development / JOGLAppletLauncher SecurityException (no existing joal.jar) on: 2007-01-22 21:17:13

i had some problems with the joglappletlauncher... without having joal.jar and joal-natives installed, i think the code below causes a security exception (illegal url redirect)

(joglappletlauncher starting at line 578):
    // See whether JOAL is present
    try {
      Class alClass = Class.forName("", false, this.getClass().getClassLoader());
      haveJOAL = true;
    } catch (ClassNotFoundException cnfe) {

can anyone verify that this is a bug?
20  Java Game APIs & Engines / JOGL Development / Re: noddraw setting programatically on: 2006-11-29 00:39:09

JOGLAppletLauncher would be a great place to set this property... would this be possible? (Ken?)
My unsigned "subapplet" has no access to "sun.java2d.noddraw", but there are still some old drivers out there, which wont display jogl applets correct.
21  Java Game APIs & Engines / JOGL Development / Re: JOGLAppletLauncher v2.0 on: 2006-10-04 19:41:25

calling methods of the unsigned applet from javascript would be great. this would make a better intergration into the website possible... also neat for alle the ajax stuff. (switch from google maps to google earth 3d applet ;-) ) maybe html elements could be used as gui for a 3d applet. But i dont know if there is a way to get access to the nested applet from browsers dom.
22  Java Game APIs & Engines / JOGL Development / Re: JoglAppletLauncher issues summary on: 2006-10-04 19:39:06
ups, wrong thread
23  Java Game APIs & Engines / JOGL Development / Re: Rotation matrix -> quaternion -> matrix problem.. on: 2006-08-31 07:55:18
some code for you...
there is no method for converting a matrix into an quaternion, because the rotations are stored as quaternions. the other direction should be working fine.

    public Quaternion() {
        m_x = m_y = m_z = 0.0f;
        m_w = 1.0f;
    public void createFromAxisAngle(Vector3 vec, float rad)
        float result = (float)Math.sin(rad / 2.0f);
        m_w = (float)Math.cos( rad / 2.0f );
        m_x = vec.x * result;
        m_y = vec.y * result;
        m_z = vec.z * result;
    public Matrix44 getRotMatrix()
        Matrix44 ret = new Matrix44();
        float n,s;
        float xs, ys, zs;
        float wx, wy, wz;
        float xx, xy, xz;
        float yy, yz, zz;
        n = (m_x * m_x) + (m_y * m_y) + (m_z * m_z) + (m_w * m_w);
        s = (n > 0.0f) ? (2.0f / n) : 0.0f;

        xs = m_x * s;  ys = m_y * s;  zs = m_z * s;
        wx = m_w * xs; wy = m_w * ys; wz = m_w * zs;
        xx = m_x * xs; xy = m_x * ys; xz = m_x * zs;
        yy = m_y * ys; yz = m_y * zs; zz = m_z * zs;

        ret._11 = 1.0f - (yy + zz); ret._12 =         xy - wz;  ret._13 =         xz + wy;  ret._14 = 0.0f;
        ret._21 =         xy + wz;  ret._22 = 1.0f - (xx + zz); ret._23 =         yz - wx;  ret._24 = 0.0f;
        ret._31 =         xz - wy;  ret._32 =         yz + wx;  ret._33 = 1.0f - (xx + yy); ret._34 = 0.0f;
        ret._41 = 0.0f;             ret._42 = 0.0f;             ret._43 = 0.0f;             ret._44 = 1.0f;
        return ret;
    public Quaternion multiply(Quaternion q)
        Quaternion r = new Quaternion();
        r.m_w = m_w*q.m_w - m_x*q.m_x - m_y*q.m_y - m_z*q.m_z;
   r.m_x = m_w*q.m_x + m_x*q.m_w + m_y*q.m_z - m_z*q.m_y;
   r.m_y = m_w*q.m_y + m_y*q.m_w + m_z*q.m_x - m_x*q.m_z;
   r.m_z = m_w*q.m_z + m_z*q.m_w + m_x*q.m_y - m_y*q.m_x;
        return r;
    public String toString()
        return "Quaternion: x: " + m_x + " y: " + m_y + " z: " + m_z + " w: " + m_w;
24  Java Game APIs & Engines / JOGL Development / timing once again on: 2006-05-05 16:48:59
i need exact timing unter windows with jre 1.4.2 in my applet.
so a nice signed jar with "queryperformancecounter" (win api) would be the best way to solve the problem.
there must be something like that out there.... but i still didn't find it.

btw.: the only thing i found is GAGETimer, but it seems to be last updated in 2004 and the homepage is down Sad

any ideas? thx.
25  Java Game APIs & Engines / JOGL Development / Re: JOGL Applets on: 2006-05-05 16:34:42
i had this problem myself and it took me one day to find out that the mine type for the .jar files was not proper set.
use this applet ( to find out if your webserver uses special character encoding for your jogl.jar. your webserver docs will explain how to change the mime type...

26  Java Game APIs & Engines / JOGL Development / Re: Phong shading on: 2006-05-01 13:26:01
do you want to use shaders?
27  Java Game APIs & Engines / JOGL Development / Re: ATI Issue (191) and JOGLAppletLaucher on: 2006-04-05 13:08:25
my applet is now running fine on my winXP sp2 ati box.

i just updatet the driver to catalyst 6.3 (as already mentioned in other threads)
now i want to know if the new driver solves the hang problem on other ati systems, too.
please, please update your ati driver and test the applet

28  Java Game APIs & Engines / JOGL Development / Re: how to zoom smoothly on: 2006-03-21 07:19:18
this seams be the right way, but you should add the new scaleFactor the old one.

setScaleFactor((float) (elapsedTime * 0.00000001));
replace by
setScaleFactor((float) (getScaleFactor() + (elapsedTime * 0.00000001)));

also you should make sure, not to start the animator twice (by zooming in and out at the same time).
the 100% cpu load is ok, because the empty canvas rendering is not bound to your graphics card and the animator is not limitet to a number maximum fps. so glClear and swapBuffers are called all the time.
29  Java Game APIs & Engines / JOGL Development / Re: error in method call on: 2006-03-20 11:56:34
type "glxinfo" in a termial, if you are on linux or
use a tool ( if you are on windows/mac.
30  Java Game APIs & Engines / JOGL Development / Re: ATI Issue (191) and JOGLAppletLaucher on: 2006-03-19 22:58:14
although it doesn't work jet, this is great support here!!!

the problem occurs the same way in Firefox and IE.
if i call the GLEventListener's display method directly in the mouseDragged-Event (not via event.getComponent().update()) i get this stack trace form the profiler:


         WindowsOnscreenGLDrawable.swapBuffers (1)
            WindowsOnscreenGLContext.makeCurrentImpl (2)

the time the system is hanging around seams to distribute randomly in (1) and (2).

If the app is stopped in WGL.wglMakeCurrent() and WGL.SwapBuffers() then these are OpenGL driver-level issues, not anything that can be solved at the Java level.

hm... there are some problems with the ati driver, because the applet works on nvidia systems, thats for sure. but the same code used in a jframe works with this problematic ati driver. also passing the events nicely one after the other (moving the mouse slow) reduces (maybe avoids) the problems.
i'll give the "low-jogl-level" methods a try within the next week.
Pages: [1] 2
ivj94 (586 views)
2018-03-24 14:47:39

ivj94 (49 views)
2018-03-24 14:46:31

ivj94 (383 views)
2018-03-24 14:43:53

Solater (63 views)
2018-03-17 05:04:08

nelsongames (110 views)
2018-03-05 17:56:34

Gornova (159 views)
2018-03-02 22:15:33

buddyBro (704 views)
2018-02-28 16:59:18

buddyBro (93 views)
2018-02-28 16:45:17

xxMrPHDxx (494 views)
2017-12-31 17:17:51

xxMrPHDxx (734 views)
2017-12-31 17:15:51
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!