コード例 #1
0
  /** @see com.googlecode.gwtquake.shared.client.Renderer#Shutdown() */
  public void Shutdown() {
    Commands.RemoveCommand("modellist");
    Commands.RemoveCommand("screenshot");
    Commands.RemoveCommand("imagelist");
    Commands.RemoveCommand("gl_strings");

    Models.Mod_FreeAll();

    Images.GL_ShutdownImages();

    /*
     * shut down OS specific OpenGL stuff like contexts, etc.
     */
    GlState.gl.shutdow();
  }
コード例 #2
0
  /** @see com.googlecode.gwtquake.shared.client.Renderer#Init() */
  public boolean Init(int vid_xpos, int vid_ypos) {
    // pre init
    assert (GlConstants.SIN.length == 256) : "warpsin table bug";

    Window.Printf(Constants.PRINT_ALL, "ref_gl version: " + GlConstants.REF_VERSION + '\n');
    Images.Draw_GetPalette();
    GlConfig.init();

    Commands.addCommand(
        "imagelist",
        new ExecutableCommand() {
          public void execute() {
            Images.GL_ImageList_f();
          }
        });

    Commands.addCommand(
        "screenshot",
        new ExecutableCommand() {
          public void execute() {
            Misc.GL_ScreenShot_f();
          }
        });
    Commands.addCommand(
        "modellist",
        new ExecutableCommand() {
          public void execute() {
            Models.Mod_Modellist_f();
          }
        });
    Commands.addCommand(
        "gl_strings",
        new ExecutableCommand() {
          public void execute() {
            Misc.GL_Strings_f();
          }
        });

    // set our "safe" modes
    GlState.prev_mode = 3;

    // create the window and set up the context
    if (!R_SetMode()) {
      Window.Printf(Constants.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n");
      return false;
    }

    // post init
    GlState.qglPointParameterfEXT = true;

    Misc.GL_SetDefaultState();

    Images.GL_InitImages();
    Models.Mod_Init();
    Particles.R_InitParticleTexture();
    Drawing.Draw_InitLocal();

    int err = GlState.gl.glGetError();
    if (err != Gl1Context.GL_NO_ERROR) {
      Window.Printf(
          Constants.PRINT_ALL,
          "glGetError() = 0x%x\n\t%s\n",
          new Vargs(2).add(err).add("" + GlState.gl.glGetString(err)));
      //	return false;
    }
    return true;
  }
コード例 #3
0
 /** @see com.googlecode.gwtquake.shared.client.Renderer#EndRegistration() */
 public final void EndRegistration() {
   Models.R_EndRegistration();
 }
コード例 #4
0
 /** @see com.googlecode.gwtquake.shared.client.Renderer#RegisterModel(java.lang.String) */
 public final void RegisterModel(String name, AsyncCallback<Model> callback) {
   Models.R_RegisterModel(name, callback);
 }
コード例 #5
0
 /** @see com.googlecode.gwtquake.shared.client.Renderer#BeginRegistration(java.lang.String) */
 public final void BeginRegistration(String map, Command callback) {
   Models.R_BeginRegistration(map, callback);
 }
コード例 #6
0
 protected void init() {
   GlState.r_world_matrix = Lib.newFloatBuffer(16);
   Images.init();
   Mesh.init();
   Models.init();
 }
コード例 #7
0
ファイル: Db.java プロジェクト: CFutureTeam/eweb4j-framework
 public static <T> ModelHelper<T> ar(Class<T> cls, String dsName) {
   ModelHelper<T> inst = Models.inst(cls);
   inst.setDsName(dsName);
   return inst;
 }
コード例 #8
0
ファイル: Db.java プロジェクト: CFutureTeam/eweb4j-framework
 public static <T> ModelHelper<T> ar(Class<T> cls) {
   return Models.inst(cls);
 }
コード例 #9
0
ファイル: ModelsTest.java プロジェクト: Elegie/luchess
 @Test
 public void testCreateModelWithNavigation() {
   assertNotNull(Models.createModelWithNavigation().get(Models.NAVIGATION.getValue()));
 }
コード例 #10
0
ファイル: ModelsTest.java プロジェクト: Elegie/luchess
 @Test
 public void testCreateEmptyModel() {
   assertEquals(new Model(), Models.createEmptyModel());
 }