Create Custom Video Driver

So jMonkeyEngine is good for Video Games, normal java applications, databases connections, and any Java related software but my graphics driver is too old, so i thought why dont i create a new Video Driver with jMonkeyEngine? Hey i started the project today ok

Here it is what i have done.-

Created a jMonekeyEngine java game project jme3 basic game

   package xvideo;

   import com.jme3.app.SimpleApplication;
   import com.jme3.system.AppSettings;
   import java.awt.DisplayMode;
   import java.awt.GraphicsEnvironment;

   public class ChameleonX extends SimpleApplication {

             public void toggleToFullscreen(AppSettings appS) {
                      GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();
                      DisplayMode[] modes = device.getDisplayModes();
                      int i=0;
    
                      settings.setResizable(false);
                      settings.setRenderer(AppSettings.LWJGL_OPENGL3);
                      settings.setResolution(modes[i].getWidth(),modes[i].getHeight());
                      settings.setFrequency(modes[i].getRefreshRate());
                      settings.setBitsPerPixel(modes[i].getBitDepth());
                      settings.setFullscreen(device.isFullScreenSupported());
                      ChameleonX app = new ChameleonX();
                      app.setSettings(settings);
                      app.restart(); 
             }

             public static void main(String[] args)
             {
              
                      String[] capacidad_video = {"resolucion","pantallacompleta","versionOpenGL", "versionDirectX"};
                      String[] AppSettings = {"LWJGL_OPENGL2","LWJGL_OPENGL3","LWJGL_OPENAL","ANDROID_OPENAL_SOFT","JOGL_OPENGL_FORWARD_COMPATIBLE","JOGL_OPENGL_BACKWARD_COMPATIBLE"};
    
                      for(String x : AppSettings)
                      {
                              if(x.startsWith("LWJGL_OPENGL" + "2"))                
                              {               

                              }              
                             else if(x.startsWith("LWJGL_OPENGL" + "3")
                             {
                      
                             }
                             else if(x.startsWith("LWJGL_OPENGL" + "3"))
                             {
            
                              }
                     }
    
                     ChameleonX app = new ChameleonX();
                     app.start(); // start the game
           }

           @Override
           public void simpleInitApp()
           {
                  throw new UnsupportedOperationException("Not supported yet."); 
           }    
 }

Well i know its Very basic, but do you have any ideas? i will work on it on these days. :sunglasses:

1 Like

If your having that many problems with 3.1 SDK have you tried 3.0?

1 Like

Wait so I’m confused, are you trying to make JME compatible with your current video card driver or are you making your own drivers entirely? Because the first one I have no idea how to do, but it shouldn’t be too difficult. The second though I know how to do, but it’s EXTREMELY difficult, mainly because of how secretive graphics companies are.

First you have to get very extensive information on the card you’re using. This means register level access, memory stuff, card management, a bunch of ick. Good luck finding this information, I have a bunch of graphics chips sitting around collecting dust because I have zero information on them. Companies never tell you this stuff, i know this because I’ve contacted ATI and S3 Graphics for information. S3 never replied and ATI sent me through a loop and gave me register information for an ancient core that I didn’t even request for. I can’t even get something as simple as a pinout diagram. The only GPU I do have information for is one from an old playstation (the original one, not one of the newer ones).

If you do manage to pirate that information without getting caught (who knows, maybe you’ll get lucky and they’ll just hand the information over), then next you’ll have to learn assembly language and C. Already know this, then more power to you. But you’ll have to find out what code to do to get the card to do what you want, and how you want it. Someone in the forums posted a video about what it’s like to be a programmer, using a simple peanut butter and jelly sandwich as an example, maybe he can enlighten us.

THEN you’d have to debug the driver. I’m not sure how this is like, but being that my graphics driver has brought down my entire system numerous times, I’d imagine it’s pretty difficult.

And once you get a working driver, you’ll have to most likely battle the company of your card in court, as they will more than likely sue you. They keep this information a secret, I find it pretty stupid but they get pretty butthurt when the details of their GPU is released to the public. If you manage to succeed in all of that then I’d be super impressed. I’m not trying to say it’s impossible, because it is possible. It’s just not practical at the moment. I hate it too, trust me.

Keep in mind all of that is if you want to make your own GPU driver. Adapting JME to work on your card should be way easier and “safer”, but at that point maybe a different version like suggested above me (@mitm beat me to it)?

3 Likes

I was trying to make my own driver for my personal use, but as you told me it seems difficult, so what about the other option? How can i adapt jMonkeyEngine with my driver completley, gaining all the posibilities of my graphics card? Which btw is a little old :confused: SDK is ok, running better than 3.0

1 Like

Hmmm I’m not sure about that, I haven’t taken much of a look into JME’s source code. Maybe @pspeed can enlighten us? I actually will need to know this too at some point.

Also, it’d help if we knew which graphics card you have

1 Like

Thank you it is a NVIDIA Geforce 9500 GT, it is a good gpu but a little old. Thought that with a correct Driver i could bring it to life again. Btw im using Linux, so drivers are a little more difficult to find.

1 Like

http://www.nvidia.com/object/linux_display_ia32_180.22.html

?

1 Like

Thanks but i have already version 340.102 and im using Linux Mint 64 bits or should i change to the Nouveau Xorg display driver? Anyway, whats of interest here is not my graphics card or graphics driver is to get te Top moust advantage of the graphics card with jMonkeyengine, dont you agree?

1 Like

Hmm, Nouveau is usually the one people seem to have issues with.

You’d probably get better help from people here if you explained the problem you’re seeing, rather than trying to get help with a solution before a problem is diagnosed. :slight_smile: Are you able to run any of the tests/demos at all? I think some of them are broken, so I wouldn’t assume it’s a hardware issue right away.

There isn’t any magic bullet to get an old card to work better, other than running the latest drivers from the GPU vendor. Anyway that card is old, but it supports OpenGL 3.3 according to wiki.

1 Like

I have the same card with the same proprietary driver version installed on my PC, I am on Linux and have no problem running JME. It works fine with both lwjgl2 and 3.

INFO: OpenGL Renderer Information
 * Vendor: NVIDIA Corporation
 * Renderer: GeForce 9500 GT/PCIe/SSE2
 * OpenGL Version: 3.3.0 NVIDIA 340.101
 * GLSL Version: 3.30 NVIDIA via Cg compiler
 * Profile: Compatibility
1 Like

I didnt said i had a problem running it, i just said i could get more of the graphics card

1 Like

If there was a way to get JME to use CUDA and PhysX then you could. I’m not sure how the core devs would feel about that though

2 Likes

Dont know which approach will be good, but it would be wise. The thing is that i have created a FPS terrain and map with a city in 2 days with your wounderfull engine, im amazed cant we do better? And all becouse of you

1 Like

Ah, sorry for my misunderstanding, I thought you have problem running it.

1 Like

No no problem at all the Engine is great, and i have tried other ones and othel programming languages and god, never felt this power in my fingertips. I have also done a MDI java applet with a little database in 10 minutes.

CUDA = openCL, PhysX = License Problems, not entirely free, have to register projects and we already have a physics engine, so it would lead to twice the work and interferring.

Actually PhysX is only of interest if your visuals aren’t 100% stressing the GPU/ Your game is phyiscally heavy.

No, you can’t beat the linux driver guys, some of which even are from nvidia having the most knowledge about their GPUs.

You have to buy a new GPU, you’d be amazed about the huge performance gain. I guess none of your players would have such an old GPU anyway.

At least trying to optimize at first is wrong, you won’t get anywhere with that.

1 Like