Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - raft

Pages: 1 [2] 3 4 ... 8
16
Support / resizing FrameBuffer and shadows
« on: March 12, 2013, 09:05:44 pm »
I faced another weird situation. if I resize FrameBuffer when shadows are on, size change isn't reflected. FrameBuffer.getWidth/Height returns the correct values but buffer is rendered as initial size.

this is what I get by resizing 800x600 to 1024x768


reverse is also true. this is what I get by a resizing a higher resolution to 800x600


If I disable shadows and resize screen again, everything seems ok. but after enabling shadows and resizing I end up with initial size.

I've updated my driver twice and even made a bios  update.

and this is the sequence of rendering:

Code: [Select]
skyBox render / draw
clearZBuffer
world render/draw
shadowHelper.updateShadowMap
shadowHelper.drawScene
buffer update/display

really weird ???

17
Support / A few questions about shadows
« on: March 11, 2013, 01:33:00 am »
playing with shadows is fun :)

please see the image below, the ball's shadow is casted to tile below it and to tile below that tile. how can I prevent it?


18
Support / VideoModes that don't fit into screen
« on: March 10, 2013, 08:35:38 pm »
FrameBuffer.getVideoModes may return a mode that does not fit into current screen. for example my screen is 1920x1080 but 1600x1200 is returned in list. or even if I set my screen resolution to something lower, 1600x1200 and 1920x1080 are still in list. I guess, there is nothing wrong with this, since my video card supports that modes.

after setting video mode, I end up with a FrameBuffer that just doesn't fit into screen.

Display.getWidth()/getHeight() returns the invalid value just after calling Display.setDisplayMode(..) but later on returns the corrected values.

so, how to handle this?
* filter modes that does not fit (based on what? awt toolkit?)
* in render loop, check Display.width/height matches FrameBuffer.width/height and correct if required

19
Support / weird rendering artifact
« on: March 07, 2013, 11:44:20 pm »
i've faced a weird rendering artifact which I couldnt still find a reason. please see the video below:

aptalkarga.com/tmp/skymaze_weird.avi

this only and only happens, when resolution is changed (FrameBuffer is recreated) during initial intro rotation and rotation is resumed afterwards. while capturing video somehow it ended prematurely but in real case always ends when rotation stops. does not happen if rotation is restarted or display changed after rotation. ends immediately if rotation is stopped manually.

seems like a multi threading issue but I see no reason for that. all gui code is rendered in GL thread.

really weird, any ideas?

20
Support / unloading texture
« on: February 16, 2013, 05:21:38 am »
two things:

1. Desktop and AE behaves differently when unloading a texture.
Code: [Select]
TextureManager tm = TextureManager.getInstance();

tm.addTexture("box", new Texture("box.jpg"));
tm.unloadTexture(buffer, tm.getTexture("box"));
tm.addTexture("box", new Texture("box.jpg"));

this code creates an error on desktop, saying texture 'box' has been declared twice. it runs okey on AE

2. on Desktop, after removing/unloading and re-adding, we end up with a white texture
Code: [Select]
TextureManager tm = TextureManager.getInstance();

tm.addTexture("box", new Texture("box.jpg"));
tm.removeAndUnload("box", buffer);
tm.addTexture("box", new Texture("box.jpg"));



21
Support / near plane setting changes blit location
« on: February 15, 2013, 09:29:28 pm »
for example the setting below causes blit locations expanded: a blit at 0,0 is displayed at -x,-y

Code: [Select]
Config.nearPlane = 0.9f;
Config.glIgnoreNearPlane = false;

indeed this was fixed before but somehow broken again. see this post

i'm using jpct 2.6 and lwjgl 2.8.5

22
Support / ArrayIndexOutOfBoundsException in Object3D.init
« on: July 20, 2012, 06:38:06 pm »
I'm creating an Object3D by supplying coordinates array:

Code: [Select]
new Object3D(coordinates[142509], uvs[95006], indices[480], TextureManager.TEXTURE_NOTFOUND);
numbers indicate the actual length of arrays. this code throws an java.lang.ArrayIndexOutOfBoundsException: 731. I dont know where that 731 comes from ::)

here is a test case:

Code: [Select]
public class MeshTest {

public static void main(String[] args) throws Exception {
String file = "C:/tmp/bones_tmp/test_mesh.ser";

            FileInputStream fis = new FileInputStream(file);
ObjectInputStream in = new ObjectInputStream(fis);

float[] coordinates = (float[]) in.readObject();
float[] uvs = (float[]) in.readObject();
int[] indices = (int[]) in.readObject();

fis.close();

new Object3D(coordinates, uvs, indices, TextureManager.TEXTURE_NOTFOUND);

}

}

and test data: http://aptalkarga.com/tmp/test_mesh.ser

23
Support / blitting and GL color
« on: April 08, 2012, 06:09:27 pm »
I'm drawing some lines to screen via GL calls for debugging purposes. I set the color with the call

Code: [Select]
GL10.glColor4f(..);
this normally works fine. but if I do this after blitting text, with the call

Code: [Select]
FrameBuffer.blit(.. RGBColor addColor)
my glColor4f call does not work any more. instead all lines are drawn in the last color passed to FrameBuffer.blit.

any ideas what may cause this?

24
Bugs / creating Object3D with no indices
« on: December 28, 2011, 12:25:39 pm »
this call
Code: [Select]
new Object3D(new float[12], null, null, -1);
throws a
Code: [Select]
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
at com.threed.jpct.Object3D.<init>(Unknown Source)

I guess this is a bug

25
Bones / MOVED: Translating an Object3D to the touch point
« on: November 23, 2011, 04:43:09 pm »

26
Support / FrameBuffer.getPixels()
« on: September 21, 2011, 09:23:48 pm »
Does FrameBuffer.getPixels() create a new pixel array all the time? If so, is it possible to add a variant which accepts an int array?

27
Support / hw acceleration on emulator
« on: May 18, 2011, 02:46:25 am »
seems as finally google started working on it and will be available soon ;D

for more information have a look at below video around 43rd minute:
http://androidappdocs.appspot.com/videos

28
Feedback / imageshack images
« on: February 27, 2011, 10:35:25 am »
i can't see most of the images hosted at imageshack.us, instead i see an image saying domain is not registered:



does anybody know what's going on?

29
Support / unload and replace a texture
« on: January 17, 2011, 04:21:45 am »
-in terms of memory usage- what's the best way of replacing a texture?

i sometimes got an OutOfMemoryError after replacing skybox textures, typically at prewarm stage. if i do removeAndUnload first instead of replacing i end up with white empty textures. i may be doing something wrong with removeAndUnload thing.

30
Support / frustum culling
« on: January 12, 2011, 01:32:02 am »
have a look at the image below. in the upper part, half of tile is invisible. it's cut. is there anything to prevent this? it also happens in desktop JPCT.


Pages: 1 [2] 3 4 ... 8