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.

Messages - generalJ

Pages: [1]
Support / Re: Texture interpolation
« on: August 07, 2013, 09:34:43 pm »
Silly me, thank you.

Support / Texture interpolation
« on: August 07, 2013, 12:58:58 pm »
Is it possible to disable texture filtering in jPCT? I would rather see sharp pixels than blurry texture.

Projects / Re: Flight Physics
« on: May 20, 2013, 03:10:13 pm »
Am I the only one who is getting Exception in thread "main" java.lang.IllegalStateException: Cannot determine close requested state of uncreated window when running the jar?

Support / Re: 3ds file loading problem
« on: February 15, 2013, 01:20:20 pm »
Thank you, that pretty much solves my problem. I just didn't expect the result of not calling the render method would be random objects disappearing.

My idea was to load the terrain to separate world and since it was static and unchanging, render it once and then just draw it every frame. It actually worked, when the terrain consisted only of one object. So, am I assuming correctly that I just have to call the renderScene fuction for every frame? Is there even some recognisable performance improvement when not doing so? The world is really static and I just move its camera.

Anyway I really appreciate your help. Thanks.

Support / Re: 3ds file loading problem
« on: February 14, 2013, 09:56:40 pm »
I cut all off all non related code. It  is based on HelloWorld example, still produces the error.

Code: [Select]
package com.threed.jpct.example;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.opengl.GLSurfaceView;

import com.threed.jpct.FrameBuffer;
import com.threed.jpct.Light;
import com.threed.jpct.Loader;
import com.threed.jpct.Matrix;
import com.threed.jpct.Object3D;
import com.threed.jpct.RGBColor;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;
import com.threed.jpct.util.MemoryHelper;

class MyRenderer implements GLSurfaceView.Renderer {
private FrameBuffer fb = null;
public World world = null;
public World terrainWorld = null;
private RGBColor back = new RGBColor(50, 50, 100);

private HelloWorld king;

public void setKing(HelloWorld a) {
king = a;

public MyRenderer() {

public void onSurfaceChanged(GL10 gl, int w, int h) {
try {
if (fb != null) {
fb = new FrameBuffer(gl, w, h);

if (king.master == null) {
terrainWorld = new World();
terrainWorld.setAmbientLight(100, 100, 100);

Light[] lizatka = new Light[3];
for (int i = 0; i < 3; i++)
lizatka[i] = new Light(terrainWorld);
SimpleVector moveVec = new SimpleVector();
moveVec.x = -8f;
moveVec.z = 2f;
moveVec.y = -2;
lizatka[0].setIntensity(85, 85, 85);
moveVec.x = 8f;
lizatka[1].setIntensity(85, 85, 85);
moveVec = new SimpleVector(0, -5, 0);
lizatka[2].setIntensity(85, 85, 85);

Object3D [] terrain = Loader.load3DS(king.getAssets().open("index.3ds"), 1f);
for(Object3D obj : terrain){
obj.rotateX((float) (-.5 * Math.PI));
obj.setRotationMatrix(new Matrix());

terrainWorld.getCamera().setPosition(0, -4, -10);


} catch (Exception ex) {
throw new RuntimeException(ex);
public void onSurfaceCreated(GL10 gl, EGLConfig config) {

public void onDrawFrame(GL10 gl) {




Support / 3ds file loading problem
« on: February 14, 2013, 07:17:14 pm »
Hello JPCT community, firstly I would like to thank you for this splendid engine.

Nevertheless, there is a problem I've been struggling with lately. When I load this particular 3ds file created in blender, consisting of multiple objects, I'm only able to see some of them. More precisely speaking, file should consist of road object, two houses, fence and lawn, while I'm not able to see second house and fence when I load this file to jPCT.

I'm pretty much out of all ideas why is this happening. When I import file back in blender, the objects are actually there so I don't think this is an exporter problem. I'm attaching the file to the topic, I hope you can figure out something.

Note: Just rename the file to index.3ds

[attachment deleted by admin]

Pages: [1]