Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 08:52:31
maybe you can take a look at the c++ irrlicht engine (http://irrlicht.sourceforge.net/) 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 08: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 08: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 18: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

interesting:
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 10:20:18
Hi,

timing:
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 12: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.
http://www.cs.wisc.edu/~cs368-1/JavaTutorial/jdk1.2/api/java/awt/font/TextLayout.html
7  Java Game APIs & Engines / JOGL Development / Re: Editable Textfield on GLCanvas on: 2007-04-12 10: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-12 00:14:41
Hi,

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 10: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 21:27:40
thx
11  Java Game APIs & Engines / JOGL Development / Re: FSAA on MacBook on: 2007-04-09 21:08:15
hi,

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 10: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
javax.media.opengl.GLCanvas[canvas0,4,30,512x512]
null
// no aa window
javax.media.opengl.GLCanvas[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:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
    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());
          break;
      }
       }
           ...

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...

thx.

13  Java Game APIs & Engines / JOGL Development / FSAA on MacBook on: 2007-04-07 01:32:11
hi,

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 08:55:47
the same on my box...

XP SP2, Firefox 2.0.0.2
GL_VENDOR: NVIDIA Corporation
GL_RENDERER: GeForce 6600/PCI/SSE2
GL_VERSION: 2.0.3

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 10:07:30
hi,

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
Quote
  // Magical transformations. 3DS manages transformation oddly, IMHO
  Lib3dsMatrix M;
  lib3ds_matrix_copy(M, mesh->matrix);
  lib3ds_matrix_inv(M);
  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;

here http://www.google.com/codesearch?hl=en&q=+lib3ds+pivot+show:FYE8Zsgkq0M:WfyM-M5Y7XQ:uMnIUe0wuyc&sa=N&cd=6&ct=rc&cs_p=http://savannah.nongnu.org/download/top10/top10-src-rel050108.tar.gz&cs_f=top10-rel050108/src/helpers/3dsRead.cpp#a0

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

you should have a look at the openal sdk capture sample (c++).
http://developer.creative.com/articles/article.asp?cat=1&sbcat=31&top=38&aid=45&file=OpenAL11CoreSDK.exe&l=1

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 13:58:56
hi,

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 "joal-alc-impl-CustomJavaCode.java" 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 21:40:31
hi,

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"...

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

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("net.java.games.joal.AL", 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 01:39:09
hi,

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 21:41:25
hi,

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 21:39:06
ups, wrong thread
23  Java Game APIs & Engines / JOGL Development / Re: Rotation matrix -> quaternion -> matrix problem.. on: 2006-08-31 09: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.

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  
    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 18: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 18: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 (http://mindprod.com/jgloss/mime.html) 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 15: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 15: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 http://www-users.rwth-aachen.de/Felix.Heidrich/jogl.htm


28  Java Game APIs & Engines / JOGL Development / Re: how to zoom smoothly on: 2006-03-21 08: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 12:56:34
type "glxinfo" in a termial, if you are on linux or
use a tool (http://www.realtech-vr.com/glview/download.html) if you are on windows/mac.
30  Java Game APIs & Engines / JOGL Development / Re: ATI Issue (191) and JOGLAppletLaucher on: 2006-03-19 23: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:

myInput.mouseDragged
mySceneManager.update

GLCanvas.display
   GLCanvas.maybeDoSingleThreadedWorkaround
      GLDrawableHelper.invokeGL
         WindowsOnscreenGLDrawable.swapBuffers (1)
         GLContextImpl.makeCurrent
            WindowsOnscreenGLContext.makeCurrentImpl (2)

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

Quote
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
 

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

The first screenshot will be displayed as a thumbnail.

Riven (3 views)
2014-07-23 21:16:32

Riven (5 views)
2014-07-23 21:07:15

Riven (5 views)
2014-07-23 20:56:16

ctomni231 (39 views)
2014-07-18 06:55:21

Zero Volt (36 views)
2014-07-17 23:47:54

danieldean (29 views)
2014-07-17 23:41:23

MustardPeter (32 views)
2014-07-16 23:30:00

Cero (47 views)
2014-07-16 00:42:17

Riven (48 views)
2014-07-14 18:02:53

OpenGLShaders (38 views)
2014-07-14 16:23:47
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!