Meshes flicker on mousemovement


i noticed that that in the test programms the meshes starts to flicker when i move my mouse anyone knows why or how i can stop that??

Well stop moving your mouse…duh.  :stuck_out_tongue:

…sorry, I didn't have anything constructive to add.

darkfrog said:

....sorry, I didn't have anything constructive to add.

Do you ever?  :P

Which tests, all of them?  What is your computer specification? Graphics card? Driver version? etc etc etc

Nvidia Geforce 6600GT, AMD 3200+ 64, 1024 DDR, WinXP,Dont know driver version

for example HelloSimpleGame when i Move around the cube by pressing d and moving the mouse (first i need to go a little bit closer to see it)

and then edges which should look like this:




go this:




Well your computer is certainly good enough to run jME.

A picture says a thousand words! (An actual picture, as in a screenshot [F1]).

f1 doesnt do a screenshot on my system but the printScreen key does but on the screenshots u cant see the problem (maybe because i m too slow - the printScreen key is a little bit far away from the d key) but maybe its a hint that somethings wrong with my monitor?? but on the other hand all games with 3d work correctly

maybe it is a vsync problem?

ah great idea…    hm…      wtf is a vsync problem??  :smiley: - and how to fix it??

all right that demo didnt usie simple game. but the demo i tested it with now did it and so now i can defntly say that you dont see anything unusual on that screenshot.

If the demo extends SimpleGame (most of them do) then pressing F1 will save a screen shot in the directory the VM was started from.

sounds like tearing to me, from vsync like wooyay said. You would need to synchronise to vertical refresh, dunno how you do that though :slight_smile:

vsync or "Sync to Vblank" means that a new image is only displayed when the graphics card has just sent the last image to the monitor. VBlank is the point in time when the cathode ray of a CRT display has finished drawing the image and returns to the start position. When the display changes between vsyncs, the upper half of your screen shown the old image and the lower half show a newer image.

Try display.setVSyncEnabled(true) - i think this only works under windows.

When this does not solve the problem, check your windows display settings for a global setting.

I think under Linux+NVidia, you can enable vsyncing by setting the environment variable __SYNC_TO_VBLANK to true.

Ok,…back to the top with this old topic that catched me for about 3 days now.

My situation is that I wanted to prepare a linux computer for additional testing and realized that vsync is not working

with linux. So movments are quite broken and not smooth anymore. I tried lots of stuff, also driver, other driver, other settings, environment vars __SYNC_TO_VBLANK or __GL_SYNC_TO_VBLANK . Nothing helped to produce an acceptable result. What is the best crossplatform ability worth if there is such an issue? I'm quite frustrated right now, and wonder why this topic is not like "I can't install jME with netbeans" been asked over and over again? Noone have this problem?

Where are all the linux-users? There is no sollution yet,right?

That here was a quite promissing link that actually used everything I found in the internet the last days:

But sadly it did not work.

@JackNeil: How did you realize vsynch? It seems quite ok on linux for grappling hook for me…

Edit: For some reason if using SimpleGame it detects my monitor at a refreshrate of 50hz!? Changing the mode in xorg.conf doesn't change that…

Here a modified teststandardgame with vsync on and a moving box. In windows it is running smoothly in linux it is not so nice:

import java.util.concurrent.Callable;

import com.jme.bounding.BoundingSphere;
import com.jme.math.Vector3f;
import com.jme.scene.Controller;
import com.jme.scene.shape.Box;
import com.jme.system.DisplaySystem;
import com.jme.util.GameTaskQueueManager;
import com.jmex.editors.swing.settings.GameSettingsPanel;

 * <code>TestStandardGame</code> is meant to be an example replacement of
 * <code>jmetest.base.TestSimpleGame</code> using the StandardGame implementation
 * instead of SimpleGame.
 * @author Matthew D. Hicks
public class TestStandardGame {
   public static void main(String[] args) throws Exception {
       // Enable statistics gathering
       System.setProperty("jme.stats", "set");
      // Instantiate StandardGame
      StandardGame game = new StandardGame("A Simple Test");
      // Show settings screen
      if (GameSettingsPanel.prompt(game.getSettings())) {
         // Start StandardGame, it will block until it has initialized successfully, then return
         GameTaskQueueManager.getManager().update(new Callable<Void>() {

            public Void call() throws Exception {
               // Create a DebugGameState - has all the built-in features that SimpleGame provides
               // NOTE: for a distributable game implementation you'll want to use something like
               // BasicGameState instead and provide control features yourself.

               DebugGameState state = new DebugGameState();
               // Put our box in it
               final Box box = new Box("my box", new Vector3f(0, 0, 0), 2, 2, 2);
               box.addController(new Controller() {
                  float x = -1;
                  public void update(final float time) {
                     GameTaskQueueManager.getManager().update(new Callable<Object>() {

                        public Object call() throws Exception {
                           // TODO Auto-generated method stub
                           if (x<0)
                              if (box.getLocalTranslation().x>-20)
                              if (box.getLocalTranslation().x<20)
                           return null;
                box.setModelBound(new BoundingSphere());
                // We had to add the following line because the render thread is already running
                // Anytime we add content we need to updateRenderState or we get funky effects
               // Add it to the manager
               // Activate the game state
               return null;