Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (727)
Games in Android Showcase (217)
games submitted by our members
Games in WIP (796)
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 3 ... 13
1  Java Game APIs & Engines / JOGL Development / Re: Java FloatBuffers don't always translate nicely to C API on: 2007-05-07 09:20:32
My problem is that if I interleave a FloatBuffer in T2F_N3F_V3F (texture, normal, vertex), and I don't use a VBO, I need to jump through hoops to get the offset into the FloatBuffer. I could write something like this:
      FloatBuffer interleavedBuffer = generateT2F_N3F_V3FInterleavedBuffer();
      gl.glTexCoordPointer(2, GL.GL_FLOAT, 8 * BufferUtil.SIZEOF_FLOAT, interleavedBuffer);
      FloatBuffer normalSlice = interleavedBuffer.slice();
      gl.glNormalPointer(GL.GL_FLOAT, 8 * BufferUtil.SIZEOF_FLOAT, normalSlice);
      FloatBuffer vertexSlice = interleavedBuffer.slice();
      gl.glVertexPointer(3, GL.GL_FLOAT, 8 * BufferUtil.SIZEOF_FLOAT, vertexSlice);

There's no need to do the slicing since the gl...Pointer methods already take the current position of a buffer into account.
2  Java Game APIs & Engines / JOGL Development / Re: Two questions on JOGL bindings on: 2007-04-25 05:58:53
A post on the apple OpenGL mailing list provides some ideas on how to work around the POLYGON_SMOOTH artifacts.
3  Java Game APIs & Engines / JOGL Development / Re: Run a JOGL application with NVPerfHUD on: 2007-03-09 13:15:02
NVPerfHUD is a Direct3D tool. Since it doesn't work with OpenGL it won't work with jogl either.
4  Java Game APIs & Engines / JOGL Development / Re: Texture problems in nehe lesson on: 2007-03-08 06:45:22
If I remember well nehe tutorials ports are based on old jogl implementations so you may have to twek the code a little if you're using the latest releases.
They've been updated to 1.1.1rc3 in the meantime Wink
5  Game Development / Performance Tuning / Re: Modified Concurrent Exception on: 2007-03-06 06:59:48
If you just want to get rid of the concurrent modification exception you can also use Iterator#remove.
Collection c;
Iterator i = c.iterator();
while(i.hasNext()) {
  Object o =;
  if (/*should remove o*/) {
6  Game Development / Performance Tuning / Re: profiling rules! on: 2007-03-04 15:19:46
If you set your profiler to sampling instead of code instrumentation, you shouldn't have that problem.
7  Game Development / Performance Tuning / Re: float[] view of direct FloatBuffer + mapped objects (finally!) on: 2007-01-11 18:14:56
Could you tell me the vm-arguments to enable this compacting GC?
Lists the different options in a table about halfway the article
8  Game Development / Performance Tuning / Re: float[] view of direct FloatBuffer + mapped objects (finally!) on: 2007-01-10 15:47:08
I'd really like to see the code behind this, it sounds like a neat hack.
I'll second that.

Perhaps you can pin the objects in JNI using getCritical thingies?
The JNI spec says you're only allowed to use get*Critical for small bits of code. I don't think you can pin objects in memory for an extended period of time. The spec also mentions that these methods don't necessarily pin the object. You still might get a copy.
9  Game Development / Performance Tuning / Re: float[] view of direct FloatBuffer + mapped objects (finally!) on: 2007-01-10 13:10:17
To be honest, I'm surprised you got this working. Java objects aren't necessarily located at a fixed place in memory. What happens if the GC decides to move the mapped Object to a different place in memory?
10  Game Development / Shared Code / Re: Point in Triangle Test on: 2006-12-19 09:26:04
If you have a guaranteed winding you could use cross products. Given a point p and a triangle a,b,c that is wound clockwise ab x ap, bc x bp and ca x cp all have to be greater or equal to zero in order for the point to lie inside the triangle.
11  Java Game APIs & Engines / Tools Discussion / Re: Game Studio (GS) on: 2006-12-18 07:06:00
Since I don't work in the games industry, I don't really know how people work in that sector on a day to day basis, but from my point of view it seems that a lot of existing tools already cover the features you're asking for. Using basic stuff like a version control system and some build system, an instant messenger or plain old  telephones, and existing tools such as blender and the gimp it seems like you should be able to set up a pretty decent working environment. I don't see why you would want to put so much time (it really sounds like a  huge project) in basically reinventing stuff that already exists. In other words, do you really think this kind of 'integrate everything' tool is commercially viable?
12  Game Development / Performance Tuning / Re: Java 6-what we really got? on: 2006-12-18 06:57:15
A big boost in number crunching performance too. JSquish (pure java s3tc texture compressor) compresses images about twice as fast under jse6 compared to jse5.
13  Java Game APIs & Engines / JOGL Development / Re: OpenGL integration in Java SE6? on: 2006-12-13 13:06:41
James Gosling is refering to the possibility to integrate jogl and java2d. One of the java2d implementations (not the default one) in jse6 is based on opengl. It has been designed so that you can take the opengl rendering context of a component and render on it using both java2d and jogl. In other words you can easily combine 2d and 3d rendering in a single component without having to render to intermediate images. See the Java2D/JOGL Interoperability thread for more detailed info.
14  Discussions / Miscellaneous Topics / Re: books u read to learn , and read for pastime on: 2006-12-13 08:54:53
Whatever I can get my hands on that seems relevant to my work. In college I worked my way through books on OSes, compiler construction, AI, hardware architecture, programming alngauges, software design, user inteface design, computer graphics, ...
Currently on my desk (work related):
  • The OpenGL programming guide (red book)
  • The OpenGL shading language book (orange book)
  • Designing interfaces by Jeniffer Tidwell
  • Concurrent Programming in Java by Doug Lea
  • Mastering the JFC (The big Swing reference book)
  • Artifical Intelligence - A Modern Approach by Russel and Norvig
  • Visual Explanations by Edward Tufte
I'm not going to pretend I've read all of these back to front, but I have gotten tons of useful information out of each one.

In my spare time I'm currently reading 'The design of everyday things' by Don Norman. Next on the to read pile is 'The Humane Interface' by Jef Raskin.
15  Game Development / Newbie & Debugging Questions / Re: AffineTransform... on: 2006-12-13 08:44:38
Each Graphics2D object has a current transformation. By default this is an identity transformation, i.e. do nothing. This transformation is represented by an instance of AffineTransform. You can modify this transformation implictly using methods like Graphics2D#scale, Graphics2D#translate, Graphics2D#shear, ... or explicitly set a transformation using Graphics2D#setTransform.
The problem in your code is that you do
AffineTransform transform = new AffineTransform();
transform.scale(this.zoomLevel, this.zoomLevel);

but after that you don't do anything with the transformation. Depending on what you're trying to exactly you'll have to pass this transformation to the Graphics2D object somewhere using one of the methods I mentioned above.
If you want some more info on the mathematics behind all this stuff Martin Baker's math site is a pretty good starting point. I would recommend you make sure you thoroughly understand this stuff. It will all make a lot more sense then...
16  Game Development / Newbie & Debugging Questions / Re: AffineTransform... on: 2006-12-12 07:36:57
Asking an actual question might help. Wink
17  Game Development / Shared Code / Re: JSquish - DXT Compression Library on: 2006-12-07 14:04:58
Squish on its own only performs the DXT compression. The output is just a bunch of DXT blocks. It's pretty straightforward to write these to a DDS file afterwards, so offline processing is definitely possible.
18  Game Development / Shared Code / Re: JSquish - DXT Compression Library on: 2006-12-07 08:01:29
int b1 = packed[pOffset + 0 + cOffset * 2] & 0xff;
int b2 = packed[pOffset + 1 + cOffset * 2] & 0xff;

int b1 = packed[pOffset + 0] & 0xff;
int b2 = packed[pOffset + 1] & 0xff;


If not, why do you need to add cOffset * 2 to the packed offset?
19  Game Development / Newbie & Debugging Questions / Re: Some IO Help Needed, on a project.. on: 2006-12-05 10:22:13
You can access files that are located in the classpath using a ClassLoader. More specifically you can use the methods ClassLoader#getSystemResourceAsStream or ClassLoader#getResourceAsStream.
As far as I know j2se doesn't provide any API to update an existing jar file. It's pretty straightforward to create a new one though using a JarOutputStream.
20  Java Game APIs & Engines / JOGL Development / Re: getting the name of OpenGL errors on: 2006-12-01 14:28:22
There are only 7 or so error codes, so the switch doesn't seem that big a deal. You can't get a very specific error description out of OpenGL though. You basically have to deduce what actually went wrong based on the context in which the error occurs. DebugGL helps...
21  Game Development / Newbie & Debugging Questions / Re: Question regarding StringUtils.bytesToHex() on: 2006-11-30 11:18:43
You should probably replace "do this" with "the value of this". Otherwise it sounds like ?: is a flow control statement.
22  Java Game APIs & Engines / JOGL Development / Re: Textures and BufferedImage on: 2006-11-30 09:31:22
Out of curiosity, I had a look at the TextureData code. It seems that for 4BYTE_ABGR it goes through the slowest code path (createFromCustom). You have to do something with the data since OpenGL only supports RGBA and BGRA, not ABGR, but you can do this conversion much faster than via the image apis. I did this by grabbing the bytes directly from the DataBuffer and swizzling them in place.
23  Java Game APIs & Engines / JOGL Development / Re: good jogl books, tutorials, resources?? on: 2006-11-30 09:14:06
IIRC I packaged each lesson as a jar containing all the required classes and resources. Those jars should also contain the source code of the lessons. If you prefer you can also download one big zip file containing all the source code.
24  Java Game APIs & Engines / JOGL Development / Re: Swing components above OpenGL window dont update. on: 2006-11-23 14:02:20
You can fix this by forcing swing to use heavyweight components for popups, menus and tooltips as follows:
25  Java Game APIs & Engines / JOGL Development / Re: Swing components above OpenGL window dont update. on: 2006-11-22 10:53:21
I've noticed similar issues in my application. I tried tracking down the cause of this and as far as I could tell this was (at least partially) due to the prioritizing of events in java.awt.EventQueue. You'll see there that heavyweight paint events get the lowest possible priority. My hunch was that when a new popup menu or tooltip (using heavyweights for both) triggered some event that got low priority and due to my opengl view hogging the EDT, that these events didn't get much chance to actually be processed. After optimizing my rendering code, the delay for the popups and tooltips to actually draw improved considerably. This also seems to point in the direction that some event isn't being processed in a timely fashion.
I don't have exact knowledge of how all the different parts (native side, java side, popup menus, ...) in awt interact though, so I might have drawn a wrong conclusion. Hopefully one of the awt engineers can shed some light on this?
26  Discussions / General Discussions / Re: HWND Reference on: 2006-11-09 18:29:22
You can access this information from JNI using the jawt stuff (jawt.h and jawt_md.h). Check the JNI documentation for more info.
27  Game Development / Newbie & Debugging Questions / Re: overriding locale (swing l&f) on: 2006-11-09 11:54:41
I've tried this on my machine and it works just fine here. I simply added
static {
  Locale.setDefault(new Locale("fr", "BE"));

to the class containing the main method and this has the expected behavior of making swing french.
28  Java Game APIs & Engines / JOGL Development / Re: Java implementation of FreeType on: 2006-11-03 17:29:53
I've only implemented the bitmap font technique described in the red book. It's pretty straightforward using BufferedImage and Font. Make an image of type BufferedImage.TYPE_BYTE_BINARY, render the character you want to it and read back the contents of the data buffer. That data can then be used as input for glBitmap. This gives you crisp, non-scaling text.
29  Discussions / Miscellaneous Topics / Re: It's time to gently smash your head through the wall on: 2006-11-01 14:04:42
That's seriously messed up Smiley
30  Discussions / Miscellaneous Topics / Re: It's time to gently smash your head through the wall on: 2006-10-31 14:53:06
Does File#canRead return true in this case? If so, that might be an option.
Pages: [1] 2 3 ... 13
Archive (299 views)
2017-04-27 17:45:51

buddyBro (486 views)
2017-04-05 03:38:00

CopyableCougar4 (933 views)
2017-03-24 15:39:42

theagentd (955 views)
2017-03-24 15:32:08

Rule (955 views)
2017-03-19 12:43:22

Rule (924 views)
2017-03-19 12:42:17

Rule (925 views)
2017-03-19 12:36:21

theagentd (989 views)
2017-03-16 05:07:07

theagentd (903 views)
2017-03-15 22:37:06

theagentd (698 views)
2017-03-15 22:32:18
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!