Show Posts
|
|
Pages: [1] 2
|
|
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 
|
|
|
|
|
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  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  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!
|
|
|
|
|
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  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 
|
|
|
|
|
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  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.
|
|
|
|
|
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()"?
|
|
|
|
|
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?
|
|
|
|
|
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.
|
|
|
|
|
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  any ideas? thx.
|
|
|
|
|
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.
|
|
|
|
|
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). 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.
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|