Show Posts
|
|
Pages: [1] 2 3 ... 17
|
|
7
|
Game Development / Newbie & Debugging Questions / loading textures on 64bit VM
|
on: 2010-02-13 13:05:25
|
hello, it seems my texture loader doesnt work anymore when run in a 64bit environment. im not sure if the cause is the 64bit VM itself or if the file lying on a 64bit filesystem. the image to load is a RGBA png file. here is my code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path); BufferedImage bi = ImageIO.read(is); is.close(); byte[] databytes = ((DataBufferByte) bi.getRaster().getDataBuffer()).getData(); ByteBuffer data = ByteBuffer.allocateDirect(databytes.length); data.order(ByteOrder.nativeOrder()); data.put(databytes, 0, databytes.length); data.rewind();
IntBuffer texb = IntBuffer.allocate(1);
binding.genTextures(1, texb); binding.bindTexture(binding.TEXTURE_2D(), texb.get(0)); binding.texParameter(binding.TEXTURE_2D(), binding.TEXTURE_MIN_FILTER(), binding.LINEAR()); binding.texParameter(binding.TEXTURE_2D(), binding.TEXTURE_MAG_FILTER(), binding.LINEAR()); binding.texParameter(binding.TEXTURE_2D(), binding.TEXTURE_WRAP_S(), binding.CLAMP()); binding.texParameter(binding.TEXTURE_2D(), binding.TEXTURE_WRAP_T(), binding.CLAMP()); binding.texEnvi(binding.TEXTURE_ENV(), binding.TEXTURE_ENV_MODE(), binding.MODULATE()); binding.texImage2D(binding.TEXTURE_2D(), 0, binding.RGBA(), bi.getWidth(), bi.getHeight(), 0, binding.RGBA(), binding.UNSIGNED_BYTE(), data); |
does anyone know what could be wrong? thanks!
|
|
|
|
|
9
|
Java Game APIs & Engines / Tools Discussion / Re: update keystore
|
on: 2009-11-09 17:48:36
|
|
thank you!
the reason why i would like to resuse the same keystore is, that i use more than one jar. for example libaries are in their own jars. and afaik the user has to accept one security warning per keystore. and i dont want him to have accept more than one.
|
|
|
|
|
12
|
Java Game APIs & Engines / Tools Discussion / webstart with nativelibs
|
on: 2009-11-08 21:37:08
|
hello, when i look at some webstart files, i see that they use something called nativelib. these jars seem to contain just the nativelibraries (dlls, so, ...) example: 1 2 3 4 5 6 7 8 9 10 11
| <resources os="Linux"> <nativelib href="lwjgl-native.jar"/> </resources> <resources os="Windows"> <nativelib href="lwjgl-native.jar"/> </resources>
<resources os="Mac OS X"> <nativelib href="lwjgl-native.jar"/> </resources> |
my questions is: how do you create these nativelib-jars? is there an ant task for this? thanks!
|
|
|
|
|
13
|
Java Game APIs & Engines / Tools Discussion / proguard: library doesnt work after optimization
|
on: 2009-11-08 20:04:32
|
hello, i am optimizing a jar with proguard, but it crashes after optimization. here is my proguard task: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <proguard> -injars ${dist}/${jarname} -outjars ${dist}-proguard/${jarname}
-target 5
-libraryjars '${java.home}/lib/rt.jar'
-dontobfuscate -optimizationpasses 4 -overloadaggressively -repackageclasses '' -allowaccessmodification
-keep public class * { public static void main(java.lang.String[]); } </proguard> |
as soon as i put in the -dontoptimize option, it works. according to the stack of the exception it crashes when accessing a static public member of a class with a nullpointer. what could be the problem? thanks!
|
|
|
|
|
14
|
Java Game APIs & Engines / Tools Discussion / update keystore
|
on: 2009-11-08 18:40:49
|
|
hello i use a keystore file to sign my jars. now it says it has been expired. is it possible to update it without recreating it?
this is the error message: "The signer certificate has expired."
thanks!
|
|
|
|
|
20
|
Java Game APIs & Engines / JOGL Development / Re: multitexturing and glsl
|
on: 2009-01-07 16:04:40
|
|
well, i did look at those replies, but maybe i am not getting things here...
only thing i can say is, that in my shaders i use glUniform with the id of the texture objects and it works perfectly like this:
glUniform1i( location, texture.getId() );
|
|
|
|
|
26
|
Game Development / Newbie & Debugging Questions / how to read an image from a zipfile
|
on: 2008-12-10 18:30:31
|
|
hello, i have a zip file that contains images, which i want to load so that they exist as BufferedImages.
i already got so far, that i have a ZipEntry and the corresponding BufferedReader but how can i convert the stream from the BufferedReader into a suitable format that is accepted by the ImageIO class?
thanks!
|
|
|
|
|
28
|
Java Game APIs & Engines / JOGL Development / Re: How to access Texture3D data with texture coordinates?
|
on: 2008-12-06 16:46:12
|
the jogl-dds loader crashes for me with this stack: java.lang.NullPointerException at com.sun.opengl.util.texture.TextureData.<init>(TextureData.java:258) at com.sun.opengl.util.texture.TextureIO.newTextureDataImpl(TextureIO.java:842) at com.sun.opengl.util.texture.TextureIO.newTextureData(TextureIO.java:250) at com.sun.opengl.util.texture.TextureIO.newTexture(TextureIO.java:538) lhkbob, yeah i would be happy to have a look at your dds reader!  btw: does anyone know of a good standalone TGA loader/writer for java?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|