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 - EgonOlsen

Pages: 1 [2] 3 4 ... 822
16
Support / Re: 3D modeler app made with JPCT-AE, possible or not?
« on: July 08, 2023, 08:35:34 am »
I don't think that jPCT-AE is very well suited for this kind of application. It's made to render more or less static assets fast, not so much for updating them constantly. Also, it doesn't supports lines properly (mainly because GLES is limited in that regard).

17
Support / Re: using multiple renderers in 1 process?
« on: July 08, 2023, 08:33:18 am »
It depends, I guess. You can run software and hardware renderer in parallel if you are using distinct worlds and objects. You can also make the software renderer use all available cores. If that's faster or not highly depend on the application and if it's worth the hasle...I'm really not sure.

18
Support / Re: using multiple renderers in 1 process?
« on: July 06, 2023, 01:50:39 pm »
Yes, that should work. Would it be faster...faster than what?

19
Support / Re: using multiple renderers in 1 process?
« on: July 03, 2023, 07:06:20 am »
It is possible to use the renderers in parallel to a degree. IIRC, it will hinder the GL renderers performance slightly and combining the results of both will most likely eat up all the benefits that doing so might have. I don't think, that it's worth it.

20
Projects / Re: Rubik's Cube - 2D
« on: June 07, 2023, 08:24:18 am »
This is sick... ;D I'm already bad at solving the 3D cube, this one is even more confusing...but pretty cool nonetheless! I like the tiles shifting around.

A little remark about the german translation: "Speisekarte" for "Menu" is correct only in the context of a restaurant. The correct translation in this context would be "Menü".

21
Support / Re: raspberry pi, orange pi, etc
« on: January 26, 2023, 04:01:20 pm »
Yes, looks like it. Not sure, how well LWJGL works on the Raspi though. It should run, because there is support for Linux ARM32/64 and I found some threads about it.

In that case, Vulkan or not, it should be possible to run jPCT...BUT...that would require to port jPCT to LWJGL3 and I don't think that this is worth the effort.


22
Support / Re: raspberry pi, orange pi, etc
« on: January 22, 2023, 12:18:45 am »
Have you ever looked at Vulkan? I'm all for low level coding if needed. I'm still coding some stuff in assembly language. But Vulkan...I can't be bothered, to be honest. You have to do really complicated calls to do basic things and I fail to see why this is supposed to be an advantage...yeah, performance and such. But to be honest, I rather think that the better performance comes from the fact that the old APIs and their supporting drivers got bloated over the years, not because going low level is the only way to go. After all, you are still going to wrap the low level calls of Vulkan in some higher level calls, so why not design them higher level it the first place?
Anyway, that's actually not the point. It's not that there is no support for OpenGL ES on the Raspi, because there is. There's no binding to Java for it. And there's none for Vulkan either, so it wouldn't help anyway... ;)

23
Support / Re: raspberry pi, orange pi, etc
« on: December 04, 2022, 10:54:26 pm »
Yes, sure...the software renderer will work just as it is on a Pie.

24
Support / Re: raspberry pi, orange pi, etc
« on: December 04, 2022, 09:04:11 am »
No, not as it is. While you can run a JVM on these devices, I don't think (correct me, if I'm wrong please) that there is an OpenGL (ES) binding for Java available on these devices. Without that, it can't be ported.

25
Support / Re: How does JPCT-AE Vertex works on Object3D.addTriangle(...)?
« on: November 26, 2022, 09:31:27 pm »
Order matters here. jPCT culls away back faces (unless you disable this with setCullling(), but the lighting will be wrong in this case). What is a back face and what isn't is defined by the order of the vertices in a triangle. In this case, reverse the order of the vertices for the faces that aren't visible and they should show up.

26
Support / Re: Bug with diffuse lighting
« on: November 11, 2022, 11:38:10 am »
I made this test case, but I fail to see an issue with it:



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

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.os.Bundle;

import com.threed.jpct.Camera;
import com.threed.jpct.FrameBuffer;
import com.threed.jpct.Light;
import com.threed.jpct.Object3D;
import com.threed.jpct.Primitives;
import com.threed.jpct.RGBColor;
import com.threed.jpct.SimpleVector;
import com.threed.jpct.World;

import java.util.ArrayList;
import java.util.List;

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

public class HelloWorld extends Activity {
    private GLSurfaceView mGLView;
    private MyRenderer renderer = null;
    private FrameBuffer fb = null;
    private World world = null;
    private final List<Light> lights = new ArrayList<>();
    private float[] dir = null;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mGLView = new GLSurfaceView(getApplication());
        mGLView.setEGLContextClientVersion(2);
        mGLView.setPreserveEGLContextOnPause(true);

        renderer = new MyRenderer();
        mGLView.setRenderer(renderer);
        setContentView(mGLView);
    }

    @Override
    protected void onPause() {
        super.onPause();
        mGLView.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
        mGLView.onResume();
    }

    @Override
    protected void onStop() {
        super.onStop();
        System.exit(0);
    }


    class MyRenderer implements GLSurfaceView.Renderer {

        public MyRenderer() {
            //
        }

        public void onSurfaceChanged(GL10 gl, int w, int h) {
            world = new World();
            world.setAmbientLight(0, 0, 0);

            SimpleVector[] cols = new SimpleVector[]{
                    SimpleVector.create(64, 128, 64),
                    SimpleVector.create(0, 128, 128),
                    SimpleVector.create(128, 0, 128),
                    SimpleVector.create(128, 128, 0),
                    SimpleVector.create(0, 0, 128),
                    SimpleVector.create(128, 0, 0),
                    SimpleVector.create(0, 128, 0),
                    SimpleVector.create(0, 64, 64)};

            for (int i = 0; i < 8; i++) {
                Object3D obj = Primitives.getSphere(50, 8);
                world.addObject(obj);
                int pos = 30 + (i - 7) * 10;
                obj.translate(10 - 20 * (i % 2), pos, 0);
                obj.build();
            }

            for (int i = 0; i < 8; i++) {
                int pos = 30 + (i - 7) * 30;
                Light light = new Light(world);
                light.setIntensity(cols[i]);
                SimpleVector sv = new SimpleVector();
                sv.y = pos;
                sv.z -= 20 - 40 * (i % 2);
                light.setPosition(sv);
                lights.add(light);
            }

            dir = new float[lights.size()];
            for (int i = 0; i < lights.size(); i++) {
                dir[i] = 1f;
            }

            Camera cam = world.getCamera();
            cam.moveCamera(Camera.CAMERA_MOVEOUT, 45);
            cam.lookAt(SimpleVector.ORIGIN);

            fb = new FrameBuffer(w, h);
        }

        public void onSurfaceCreated(GL10 gl, EGLConfig config) {
            //
        }

        public void onDrawFrame(GL10 gl) {
            fb.clear(RGBColor.BLACK);
            world.renderScene(fb);
            world.draw(fb);
            fb.display();

            for (int i = 0; i < lights.size(); i++) {
                Light light = lights.get(i);
                SimpleVector sv = light.getPosition();
                sv.y += dir[i];
                if (sv.y > 150 || sv.y < -150) {
                    dir[i] *= -1f;
                }
                light.setPosition(sv);
            }
        }
    }
}


Do you have a test case that shows this problem?

27
Support / Re: Bug with diffuse lighting
« on: November 09, 2022, 08:27:19 am »
I'll have a look...

28
News / Re: Maintainability
« on: November 09, 2022, 08:26:02 am »
As Aero said, it's not a problem. The stuff in the util-package is decoupled from the engine, everything that is done in there can be done with the means provided by the public interfaces.

29
News / Re: Maintainability
« on: November 08, 2022, 12:20:06 pm »
The library is still maintained, but no new major features will be added to it in the foreseeable future. Therefor, releases contain mainly bug fixes and after all these years, there aren't many bugs to fix anymore. That's the update frequency decreased.

30
News / Forum upgraded to 2.0.19
« on: September 09, 2022, 01:49:45 pm »
Because...why not!?

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