Hi everybody,
First of all, I'm new with JPCT (I've been testing it for a week). I'm trying to create an invisible object that should make objects after it invisible too. But I do not know how to make an object transparent (If played with setTransparency but it does not work as I want).
I will explain what I want to do with an example:
Object3D cono = Primitives.getCone(90, 4, 1.5f);
cono.setAdditionalColor(new Color(100, 0, 0, 100));
cono.build();
world.addObject(cono);
Object3D plane = Primitives.getPlane(1, 10);
plane.rotateX(3.141596f/4.0f);
plane.setAdditionalColor(new Color(0, 100, 0, 100));
plane.build();
world.addObject(plane);
world.getCamera().setPosition(0, 0, -20);
world.getCamera().lookAt(cono.getTransformedCenter());
In this example, I draw a red cone, and a green plane is cutting it. What I want is that the areas of the green plane that are shown become transparent and to see blue instead of green. In OpenGL I can do it (with alpha in green plane) enabling first the dept test and disabling it then and enabling gl_blend. However, when I try to use glEnable(GL11.GL_DEPTH_TEST); I get GL11 not found.
There is a way to do it? I know this question could be very basic, but I only have work with OpenGL, and I still can't understand correctly jpct, and I do not know how to access OpenGL functionality from jpct.
Finally, I'll say that I use jpct because I want to use 3d objects and jpct support them.
Thanks, and I hope anyone could help me or give any tip.