If I use the Animator object, programs works (not correctly, because it consumes all cpu), but at least i see the window with the triangle. If i use Renderer, nothing is shown at all - i'm in despair right now, and thinking of going back to c++, though i don't like it.
No need to go back to c++ because of this

. I checked the Animator source once again and I noticed that it calls setNoAutoRedrawMode(true) on the GLDrawable. Can you try to call that on the GLCanvas after it is created. Does this make a difference when using the Renderer class?
Edit: Here's a new version of the Renderer class, which should be more compliant with the Animator class. Can you test it and see if it fixes your problem?:
[CODE]
import net.java.games.jogl.GLDrawable;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
public class Renderer
implements Runnable
{
private GLDrawable glDrawable;
private ScheduledExecutorService scheduler;
private boolean threadSet;
private float framesPerSecond;
public Renderer(GLDrawable glDrawable, float framesPerSecond)
{
this.glDrawable = glDrawable;
this.framesPerSecond = framesPerSecond;
}
public void start()
{
glDrawable.setNoAutoRedrawMode(true);
if (isRunning()) stop();
scheduler = Executors.newScheduledThreadPool(1, new RendererThreadFactory());
scheduler.scheduleAtFixedRate(this, 0, (int) (1000.0f / framesPerSecond), TimeUnit.MILLISECONDS);
}
public void stop()
{
if (!isRunning()) return;
scheduler.shutdown();
scheduler = null;
glDrawable.setNoAutoRedrawMode(false);
}
public boolean isRunning()
{
return scheduler != null;
}
/**
* Render a single frame
*
*/
public void run()
{
if (!threadSet)
{
glDrawable.setRenderingThread(Thread.currentThread());
threadSet = true;
}
// XXX: Catch for debug only
try
{
glDrawable.display();
}
catch (Throwable t)
{
System.out.println("Throwable thrown during display:");
t.printStackTrace();
System.exit(1);
}
}
}
class RendererThreadFactory
implements ThreadFactory
{
public Thread newThread(Runnable runnable)
{
Thread thread = new Thread(runnable);
thread.setDaemon(false);
thread.setPriority(Thread.NORM_PRIORITY);
return thread;
}
}
[/CODE]