From: Carsten W. <ca...@us...> - 2004-07-16 10:11:48
|
Update of /cvsroot/jake2/jake2/src/jake2/render/jogl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10930/src/jake2/render/jogl Modified Files: Main.java Surf.java Draw.java Warp.java Image.java Misc.java Model.java Mesh.java Light.java Log Message: refimport_t deleted Index: Model.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Model.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Model.java 12 Jul 2004 22:08:03 -0000 1.3 --- Model.java 16 Jul 2004 10:11:35 -0000 1.4 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.game.cplane_t; import jake2.game.cvar_t; *************** *** 73,77 **** if (model == null || model.nodes == null) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node --- 74,78 ---- if (model == null || model.nodes == null) ! Com.Error (Defines.ERR_DROP, "Mod_PointInLeaf: bad model"); node = model.nodes[0]; // root node *************** *** 170,174 **** total = 0; ! ri.Con_Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { --- 171,175 ---- total = 0; ! VID.Printf(Defines.PRINT_ALL,"Loaded models:\n"); for (i=0; i < mod_numknown ; i++) { *************** *** 177,184 **** continue; ! ri.Con_Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! ri.Con_Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } --- 178,185 ---- continue; ! VID.Printf (Defines.PRINT_ALL, "%8i : %s\n", new Vargs(2).add(mod.extradatasize).add(mod.name)); total += mod.extradatasize; } ! VID.Printf (Defines.PRINT_ALL, "Total resident: " + total +'\n'); } *************** *** 212,216 **** if (name == null || name.length() == 0) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // --- 213,217 ---- if (name == null || name.length() == 0) ! Com.Error(Defines.ERR_DROP, "Mod_ForName: NULL name"); // *************** *** 221,225 **** i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! ri.Sys_Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } --- 222,226 ---- i = Integer.parseInt(name.substring(1)); if (i < 1 || r_worldmodel == null || i >= r_worldmodel.numsubmodels) ! Com.Error (Defines.ERR_DROP, "bad inline model number"); return mod_inline[i]; } *************** *** 251,255 **** { if (mod_numknown == MAX_MOD_KNOWN) ! ri.Sys_Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; --- 252,256 ---- { if (mod_numknown == MAX_MOD_KNOWN) ! Com.Error (Defines.ERR_DROP, "mod_numknown == MAX_MOD_KNOWN"); mod_numknown++; mod = mod_known[i]; *************** *** 261,270 **** // load the file // ! fileBuffer = ri.FS_LoadFile(name); if (fileBuffer == null) { if (crash) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; --- 262,271 ---- // load the file // ! fileBuffer = FS.LoadFile(name); if (fileBuffer == null) { if (crash) ! Com.Error(Defines.ERR_DROP, "Mod_NumForName: " + mod.name + " not found"); mod.name = ""; *************** *** 301,305 **** break; default: ! ri.Sys_Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } --- 302,306 ---- break; default: ! Com.Error(Defines.ERR_DROP,"Mod_NumForName: unknown fileid for " + mod.name); break; } *************** *** 383,387 **** if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; --- 384,388 ---- if ( (l.filelen % mvertex_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / mvertex_t.DISK_SIZE; *************** *** 430,434 **** if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; --- 431,435 ---- if ((l.filelen % qfiles.dmodel_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dmodel_t.SIZE; *************** *** 470,474 **** if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; --- 471,475 ---- if ( (l.filelen % medge_t.DISK_SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / medge_t.DISK_SIZE; *************** *** 503,507 **** if ((l.filelen % texinfo_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; --- 504,508 ---- if ((l.filelen % texinfo_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / texinfo_t.SIZE; *************** *** 533,537 **** out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } --- 534,538 ---- out[i].image = GL_FindImage(name, it_wall); if (out[i].image == null) { ! VID.Printf(Defines.PRINT_ALL, "Couldn't load " + name + '\n'); out[i].image = r_notexture; } *************** *** 615,619 **** if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; --- 616,620 ---- if ((l.filelen % qfiles.dface_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dface_t.SIZE; *************** *** 649,653 **** ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; --- 650,654 ---- ti = in.texinfo; if (ti < 0 || ti >= loadmodel.numtexinfo) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: bad texinfo number"); out[surfnum].texinfo = loadmodel.texinfo[ti]; *************** *** 721,725 **** if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; --- 722,726 ---- if ((l.filelen % qfiles.dnode_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dnode_t.SIZE; *************** *** 778,782 **** if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; --- 779,783 ---- if ((l.filelen % qfiles.dleaf_t.SIZE) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dleaf_t.SIZE; *************** *** 823,827 **** if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); --- 824,828 ---- if ((l.filelen % Defines.SIZE_OF_SHORT) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_SHORT; // out = Hunk_Alloc ( count*sizeof(*out)); *************** *** 838,842 **** j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! ri.Sys_Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; --- 839,843 ---- j = bb.getShort(); if (j < 0 || j >= loadmodel.numsurfaces) ! Com.Error(Defines.ERR_DROP, "Mod_ParseMarksurfaces: bad surface number"); out[i] = loadmodel.surfaces[j]; *************** *** 856,864 **** if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! ri.Sys_Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; --- 857,865 ---- if ( (l.filelen % Defines.SIZE_OF_INT) != 0) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / Defines.SIZE_OF_INT; if (count < 1 || count >= Defines.MAX_MAP_SURFEDGES) ! Com.Error (Defines.ERR_DROP, "MOD_LoadBmodel: bad surfedges count in " + loadmodel.name + ": " + count); offsets = new int[count]; *************** *** 888,892 **** if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! ri.Sys_Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; --- 889,893 ---- if ((l.filelen % qfiles.dplane_t.SIZE) != 0) ! Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size in " + loadmodel.name); count = l.filelen / qfiles.dplane_t.SIZE; *************** *** 931,935 **** loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! ri.Sys_Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); --- 932,936 ---- loadmodel.type = mod_brush; if (loadmodel != mod_known[0]) ! Com.Error(Defines.ERR_DROP, "Loaded a brush model after the world"); header = new qfiles.dheader_t(buffer); *************** *** 937,941 **** i = header.version; if (i != Defines.BSPVERSION) ! ri.Sys_Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; --- 938,942 ---- i = header.version; if (i != Defines.BSPVERSION) ! Com.Error (Defines.ERR_DROP, "Mod_LoadBrushModel: " + mod.name + " has wrong version number (" + i + " should be " + Defines.BSPVERSION + ")"); mod_base = fileBuffer; //(byte *)header; *************** *** 971,975 **** starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! ri.Sys_Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); --- 972,976 ---- starmod.firstnode = bm.headnode; if (starmod.firstnode >= loadmodel.numnodes) ! Com.Error(Defines.ERR_DROP, "Inline model " + i + " has bad firstnode"); Math3D.VectorCopy(bm.maxs, starmod.maxs); *************** *** 1009,1032 **** if (pheader.version != qfiles.ALIAS_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! ri.Sys_Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! ri.Sys_Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // --- 1010,1033 ---- if (pheader.version != qfiles.ALIAS_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(pheader.version).add(qfiles.ALIAS_VERSION)); if (pheader.skinheight > MAX_LBM_HEIGHT) ! Com.Error(Defines.ERR_DROP, "model "+ mod.name +" has a skin taller than " + MAX_LBM_HEIGHT); if (pheader.num_xyz <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no vertices"); if (pheader.num_xyz > qfiles.MAX_VERTS) ! Com.Error(Defines.ERR_DROP, "model " + mod.name +" has too many vertices"); if (pheader.num_st <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no st vertices"); if (pheader.num_tris <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no triangles"); if (pheader.num_frames <= 0) ! Com.Error(Defines.ERR_DROP, "model " + mod.name + " has no frames"); // *************** *** 1121,1129 **** if (sprout.version != qfiles.SPRITE_VERSION) ! ri.Sys_Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! ri.Sys_Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); --- 1122,1130 ---- if (sprout.version != qfiles.SPRITE_VERSION) ! Com.Error(Defines.ERR_DROP, "%s has wrong version number (%i should be %i)", new Vargs(3).add(mod.name).add(sprout.version).add(qfiles.SPRITE_VERSION)); if (sprout.numframes > qfiles.MAX_MD2SKINS) ! Com.Error(Defines.ERR_DROP, "%s has too many frames (%i > %i)", new Vargs(3).add(mod.name).add(sprout.numframes).add(qfiles.MAX_MD2SKINS)); *************** *** 1157,1161 **** // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = ri.Cvar_Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); --- 1158,1162 ---- // explicitly free the old map if different // this guarantees that mod_known[0] is the world map ! flushmap = Cvar.Get("flushmap", "0", 0); if ( !mod_known[0].name.equals(fullname) || flushmap.value != 0.0f) Mod_Free(mod_known[0]); Index: Main.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Main.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Main.java 15 Jul 2004 14:37:34 -0000 1.4 --- Main.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import jake2.Globals; import jake2.client.*; + import jake2.game.*; import jake2.game.cplane_t; import jake2.game.cvar_t; *************** *** 420,424 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 421,425 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 454,458 **** break; default : ! ri.Sys_Error(Defines.ERR_DROP, "Bad modeltype"); break; } --- 455,459 ---- break; default : ! Com.Error(Defines.ERR_DROP, "Bad modeltype"); break; } *************** *** 826,834 **** // included by cwei if (r_newrefdef == null) { ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! ri.Sys_Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { --- 827,835 ---- // included by cwei if (r_newrefdef == null) { ! Com.Error(Defines.ERR_DROP, "R_RenderView: refdef_t fd is null"); } if (r_worldmodel == null && (r_newrefdef.rdflags & Defines.RDF_NOWORLDMODEL) == 0) ! Com.Error(Defines.ERR_DROP, "R_RenderView: NULL worldmodel"); if (r_speeds.value != 0.0f) { *************** *** 863,867 **** if (r_speeds.value != 0.0f) { ! ri.Con_Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", --- 864,868 ---- if (r_speeds.value != 0.0f) { ! VID.Printf( Defines.PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n", *************** *** 930,1001 **** protected void R_Register() { ! r_lefthand = ri.Cvar_Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = ri.Cvar_Get("r_norefresh", "0", 0); ! r_fullbright = ri.Cvar_Get("r_fullbright", "0", 0); ! r_drawentities = ri.Cvar_Get("r_drawentities", "1", 0); ! r_drawworld = ri.Cvar_Get("r_drawworld", "1", 0); ! r_novis = ri.Cvar_Get("r_novis", "0", 0); ! r_nocull = ri.Cvar_Get("r_nocull", "0", 0); ! r_lerpmodels = ri.Cvar_Get("r_lerpmodels", "1", 0); ! r_speeds = ri.Cvar_Get("r_speeds", "0", 0); ! r_lightlevel = ri.Cvar_Get("r_lightlevel", "1", 0); ! gl_nosubimage = ri.Cvar_Get("gl_nosubimage", "0", 0); ! gl_allow_software = ri.Cvar_Get("gl_allow_software", "0", 0); ! gl_particle_min_size = ri.Cvar_Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = ri.Cvar_Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = ri.Cvar_Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = ri.Cvar_Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = ri.Cvar_Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = ri.Cvar_Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = ri.Cvar_Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = ri.Cvar_Get("gl_log", "0", 0); ! gl_bitdepth = ri.Cvar_Get("gl_bitdepth", "0", 0); ! gl_mode = ri.Cvar_Get("gl_mode", "1", Globals.CVAR_ARCHIVE); ! gl_lightmap = ri.Cvar_Get("gl_lightmap", "0", 0); ! gl_shadows = ri.Cvar_Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = ri.Cvar_Get("gl_dynamic", "1", 0); ! gl_nobind = ri.Cvar_Get("gl_nobind", "0", 0); ! gl_round_down = ri.Cvar_Get("gl_round_down", "1", 0); ! gl_picmip = ri.Cvar_Get("gl_picmip", "0", 0); ! gl_skymip = ri.Cvar_Get("gl_skymip", "0", 0); ! gl_showtris = ri.Cvar_Get("gl_showtris", "0", 0); ! gl_ztrick = ri.Cvar_Get("gl_ztrick", "0", 0); ! gl_finish = ri.Cvar_Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = ri.Cvar_Get("gl_clear", "0", 0); ! gl_cull = ri.Cvar_Get("gl_cull", "1", 0); ! gl_polyblend = ri.Cvar_Get("gl_polyblend", "1", 0); ! gl_flashblend = ri.Cvar_Get("gl_flashblend", "0", 0); ! gl_playermip = ri.Cvar_Get("gl_playermip", "0", 0); ! gl_monolightmap = ri.Cvar_Get("gl_monolightmap", "0", 0); ! gl_driver = ri.Cvar_Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = ri.Cvar_Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = ri.Cvar_Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = ri.Cvar_Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = ri.Cvar_Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = ri.Cvar_Get("gl_vertex_arrays", "0", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = ri.Cvar_Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = ri.Cvar_Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = ri.Cvar_Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = ri.Cvar_Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = ri.Cvar_Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = ri.Cvar_Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = ri.Cvar_Get("gl_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = ri.Cvar_Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = ri.Cvar_Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = ri.Cvar_Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = ri.Cvar_Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = ri.Cvar_Get("vid_ref", "jogl", Globals.CVAR_ARCHIVE); ! ri.Cmd_AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); --- 931,1002 ---- protected void R_Register() { ! r_lefthand = Cvar.Get("hand", "0", Globals.CVAR_USERINFO | Globals.CVAR_ARCHIVE); ! r_norefresh = Cvar.Get("r_norefresh", "0", 0); ! r_fullbright = Cvar.Get("r_fullbright", "0", 0); ! r_drawentities = Cvar.Get("r_drawentities", "1", 0); ! r_drawworld = Cvar.Get("r_drawworld", "1", 0); ! r_novis = Cvar.Get("r_novis", "0", 0); ! r_nocull = Cvar.Get("r_nocull", "0", 0); ! r_lerpmodels = Cvar.Get("r_lerpmodels", "1", 0); ! r_speeds = Cvar.Get("r_speeds", "0", 0); ! r_lightlevel = Cvar.Get("r_lightlevel", "1", 0); ! gl_nosubimage = Cvar.Get("gl_nosubimage", "0", 0); ! gl_allow_software = Cvar.Get("gl_allow_software", "0", 0); ! gl_particle_min_size = Cvar.Get("gl_particle_min_size", "2", Globals.CVAR_ARCHIVE); ! gl_particle_max_size = Cvar.Get("gl_particle_max_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_size = Cvar.Get("gl_particle_size", "40", Globals.CVAR_ARCHIVE); ! gl_particle_att_a = Cvar.Get("gl_particle_att_a", "0.01", Globals.CVAR_ARCHIVE); ! gl_particle_att_b = Cvar.Get("gl_particle_att_b", "0.0", Globals.CVAR_ARCHIVE); ! gl_particle_att_c = Cvar.Get("gl_particle_att_c", "0.01", Globals.CVAR_ARCHIVE); ! gl_modulate = Cvar.Get("gl_modulate", "1", Globals.CVAR_ARCHIVE); ! gl_log = Cvar.Get("gl_log", "0", 0); ! gl_bitdepth = Cvar.Get("gl_bitdepth", "0", 0); ! gl_mode = Cvar.Get("gl_mode", "1", Globals.CVAR_ARCHIVE); ! gl_lightmap = Cvar.Get("gl_lightmap", "0", 0); ! gl_shadows = Cvar.Get("gl_shadows", "0", Globals.CVAR_ARCHIVE); ! gl_dynamic = Cvar.Get("gl_dynamic", "1", 0); ! gl_nobind = Cvar.Get("gl_nobind", "0", 0); ! gl_round_down = Cvar.Get("gl_round_down", "1", 0); ! gl_picmip = Cvar.Get("gl_picmip", "0", 0); ! gl_skymip = Cvar.Get("gl_skymip", "0", 0); ! gl_showtris = Cvar.Get("gl_showtris", "0", 0); ! gl_ztrick = Cvar.Get("gl_ztrick", "0", 0); ! gl_finish = Cvar.Get("gl_finish", "0", Globals.CVAR_ARCHIVE); ! gl_clear = Cvar.Get("gl_clear", "0", 0); ! gl_cull = Cvar.Get("gl_cull", "1", 0); ! gl_polyblend = Cvar.Get("gl_polyblend", "1", 0); ! gl_flashblend = Cvar.Get("gl_flashblend", "0", 0); ! gl_playermip = Cvar.Get("gl_playermip", "0", 0); ! gl_monolightmap = Cvar.Get("gl_monolightmap", "0", 0); ! gl_driver = Cvar.Get("gl_driver", "opengl32", Globals.CVAR_ARCHIVE); ! gl_texturemode = Cvar.Get("gl_texturemode", "GL_LINEAR_MIPMAP_NEAREST", Globals.CVAR_ARCHIVE); ! gl_texturealphamode = Cvar.Get("gl_texturealphamode", "default", Globals.CVAR_ARCHIVE); ! gl_texturesolidmode = Cvar.Get("gl_texturesolidmode", "default", Globals.CVAR_ARCHIVE); ! gl_lockpvs = Cvar.Get("gl_lockpvs", "0", 0); ! gl_vertex_arrays = Cvar.Get("gl_vertex_arrays", "0", Globals.CVAR_ARCHIVE); ! gl_ext_swapinterval = Cvar.Get("gl_ext_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_ext_palettedtexture = Cvar.Get("gl_ext_palettedtexture", "0", Globals.CVAR_ARCHIVE); ! gl_ext_multitexture = Cvar.Get("gl_ext_multitexture", "1", Globals.CVAR_ARCHIVE); ! gl_ext_pointparameters = Cvar.Get("gl_ext_pointparameters", "1", Globals.CVAR_ARCHIVE); ! gl_ext_compiled_vertex_array = Cvar.Get("gl_ext_compiled_vertex_array", "1", Globals.CVAR_ARCHIVE); ! gl_drawbuffer = Cvar.Get("gl_drawbuffer", "GL_BACK", 0); ! gl_swapinterval = Cvar.Get("gl_swapinterval", "1", Globals.CVAR_ARCHIVE); ! gl_saturatelighting = Cvar.Get("gl_saturatelighting", "0", 0); ! gl_3dlabs_broken = Cvar.Get("gl_3dlabs_broken", "1", Globals.CVAR_ARCHIVE); ! vid_fullscreen = Cvar.Get("vid_fullscreen", "0", Globals.CVAR_ARCHIVE); ! vid_gamma = Cvar.Get("vid_gamma", "1.0", Globals.CVAR_ARCHIVE); ! vid_ref = Cvar.Get("vid_ref", "jogl", Globals.CVAR_ARCHIVE); ! Cmd.AddCommand("imagelist", new xcommand_t() { public void execute() { GL_ImageList_f(); *************** *** 1003,1017 **** }); ! ri.Cmd_AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! ri.Cmd_AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! ri.Cmd_AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); --- 1004,1018 ---- }); ! Cmd.AddCommand("screenshot", new xcommand_t() { public void execute() { GL_ScreenShot_f(); } }); ! Cmd.AddCommand("modellist", new xcommand_t() { public void execute() { Mod_Modellist_f(); } }); ! Cmd.AddCommand("gl_strings", new xcommand_t() { public void execute() { GL_Strings_f(); *************** *** 1031,1036 **** // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // ri.Con_Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // ri.Cvar_SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } --- 1032,1037 ---- // if (vid_fullscreen.modified && !gl_config.allow_cds) { ! // VID.Printf(Defines.PRINT_ALL, "R_SetMode() - CDS not allowed with this driver\n"); ! // Cvar.SetValue("vid_fullscreen", (vid_fullscreen.value > 0.0f) ? 0.0f : 1.0f); // vid_fullscreen.modified = false; // } *************** *** 1048,1066 **** else { if (err == rserr_invalid_fullscreen) { ! ri.Cvar_SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! ri.Cvar_SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } --- 1049,1067 ---- else { if (err == rserr_invalid_fullscreen) { ! Cvar.SetValue("vid_fullscreen", 0); vid_fullscreen.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - fullscreen unavailable in this mode\n"); if ((err = GLimp_SetMode(dim, (int) gl_mode.value, false)) == rserr_ok) return true; } else if (err == rserr_invalid_mode) { ! Cvar.SetValue("gl_mode", gl_state.prev_mode); gl_mode.modified = false; ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - invalid mode\n"); } // try setting it back to something safe if ((err = GLimp_SetMode(dim, gl_state.prev_mode, false)) != rserr_ok) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_SetMode() - could not revert to safe mode\n"); return false; } *************** *** 1085,1089 **** } ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); --- 1086,1090 ---- } ! VID.Printf(Defines.PRINT_ALL, "ref_gl version: " + REF_VERSION + '\n'); Draw_GetPalette(); *************** *** 1096,1100 **** // create the window and set up the context if (!R_SetMode()) { ! ri.Con_Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } --- 1097,1101 ---- // create the window and set up the context if (!R_SetMode()) { ! VID.Printf(Defines.PRINT_ALL, "ref_gl::R_Init() - could not R_SetMode()\n"); return false; } *************** *** 1103,1107 **** protected boolean R_Init2() { ! ri.Vid_MenuInit(); /* --- 1104,1108 ---- protected boolean R_Init2() { ! VID.MenuInit(); /* *************** *** 1109,1119 **** */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! ri.Con_Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); --- 1110,1120 ---- */ gl_config.vendor_string = gl.glGetString(GL.GL_VENDOR); ! VID.Printf(Defines.PRINT_ALL, "GL_VENDOR: " + gl_config.vendor_string + '\n'); gl_config.renderer_string = gl.glGetString(GL.GL_RENDERER); ! VID.Printf(Defines.PRINT_ALL, "GL_RENDERER: " + gl_config.renderer_string + '\n'); gl_config.version_string = gl.glGetString(GL.GL_VERSION); ! VID.Printf(Defines.PRINT_ALL, "GL_VERSION: " + gl_config.version_string + '\n'); gl_config.extensions_string = gl.glGetString(GL.GL_EXTENSIONS); ! VID.Printf(Defines.PRINT_ALL, "GL_EXTENSIONS: " + gl_config.extensions_string + '\n'); String renderer_buffer = gl_config.renderer_string.toLowerCase(); *************** *** 1146,1157 **** if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! ri.Cvar_Set("gl_monolightmap", "A"); ! ri.Con_Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("gl_monolightmap", "0"); } else { ! ri.Cvar_Set("gl_monolightmap", "0"); } } --- 1147,1158 ---- if (monolightmap.length() < 2 || monolightmap.charAt(1) != 'F') { if (gl_config.renderer == GL_RENDERER_PERMEDIA2) { ! Cvar.Set("gl_monolightmap", "A"); ! VID.Printf(Defines.PRINT_ALL, "...using gl_monolightmap 'a'\n"); } else if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("gl_monolightmap", "0"); } else { ! Cvar.Set("gl_monolightmap", "0"); } } *************** *** 1160,1176 **** // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! ri.Cvar_Set("scr_drawall", "1"); } else { ! ri.Cvar_Set("scr_drawall", "0"); } // #ifdef __linux__ ! ri.Cvar_SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! ri.Cvar_SetValue("gl_finish", 1); } --- 1161,1177 ---- // the screen needs to redraw the tiled background every frame if ((gl_config.renderer & GL_RENDERER_POWERVR) != 0) { ! Cvar.Set("scr_drawall", "1"); } else { ! Cvar.Set("scr_drawall", "0"); } // #ifdef __linux__ ! Cvar.SetValue("gl_finish", 1); // #endif // MCD has buffering issues if (gl_config.renderer == GL_RENDERER_MCD) { ! Cvar.SetValue("gl_finish", 1); } *************** *** 1186,1192 **** if (gl_config.allow_cds) ! ri.Con_Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! ri.Con_Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* --- 1187,1193 ---- if (gl_config.allow_cds) ! VID.Printf(Defines.PRINT_ALL, "...allowing CDS\n"); else ! VID.Printf(Defines.PRINT_ALL, "...disabling CDS\n"); /* *************** *** 1195,1199 **** if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) --- 1196,1200 ---- if (gl_config.extensions_string.indexOf("GL_EXT_compiled_vertex_array") >= 0 || gl_config.extensions_string.indexOf("GL_SGI_compiled_vertex_array") >= 0) { ! VID.Printf(Defines.PRINT_ALL, "...enabling GL_EXT_compiled_vertex_array\n"); // qglLockArraysEXT = ( void * ) qwglGetProcAddress( "glLockArraysEXT" ); if (gl_ext_compiled_vertex_array.value != 0.0f) *************** *** 1205,1217 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); } if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! ri.Con_Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! ri.Con_Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } --- 1206,1218 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_compiled_vertex_array not found\n"); } if (gl_config.extensions_string.indexOf("WGL_EXT_swap_control") >= 0) { qwglSwapIntervalEXT = true; ! VID.Printf(Defines.PRINT_ALL, "...enabling WGL_EXT_swap_control\n"); } else { qwglSwapIntervalEXT = false; ! VID.Printf(Defines.PRINT_ALL, "...WGL_EXT_swap_control not found\n"); } *************** *** 1221,1232 **** qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } --- 1222,1233 ---- qglPointParameterfEXT = true; // qglPointParameterfvEXT = ( void (APIENTRY *)( GLenum, const GLfloat * ) ) qwglGetProcAddress( "glPointParameterfvEXT" ); ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_point_parameters\n"); } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_point_parameters\n"); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_point_parameters not found\n"); } *************** *** 1236,1240 **** // if ( gl_ext_palettedtexture->value ) // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; --- 1237,1241 ---- // if ( gl_ext_palettedtexture->value ) // { ! // VID.Printf( Defines.PRINT_ALL, "...using 3DFX_set_global_palette\n" ); // qgl3DfxSetPaletteEXT = ( void ( APIENTRY * ) (GLuint *) )qwglGetProcAddress( "gl3DfxSetPaletteEXT" ); //// qglColorTableEXT = Fake_glColorTableEXT; *************** *** 1242,1251 **** // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // ri.Con_Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif --- 1243,1252 ---- // else // { ! // VID.Printf( Defines.PRINT_ALL, "...ignoring 3DFX_set_global_palette\n" ); // } // } // else // { ! // VID.Printf( Defines.PRINT_ALL, "...3DFX_set_global_palette not found\n" ); // } // #endif *************** *** 1255,1273 **** && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { if (gl_ext_multitexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" ); // qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" ); --- 1256,1274 ---- && gl_config.extensions_string.indexOf("GL_EXT_shared_texture_palette") >= 0) { if (gl_ext_palettedtexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; // true; TODO jogl bug } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_EXT_shared_texture_palette\n"); qglColorTableEXT = false; } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_EXT_shared_texture_palette not found\n"); } if (gl_config.extensions_string.indexOf("GL_ARB_multitexture") >= 0) { if (gl_ext_multitexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_ARB_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMultiTexCoord2fARB" ); // qglActiveTextureARB = ( void * ) qwglGetProcAddress( "glActiveTextureARB" ); *************** *** 1280,1289 **** } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); Cvar.SetValue("r_fullbright", 0); } --- 1281,1290 ---- } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_ARB_multitexture not found\n"); Cvar.SetValue("r_fullbright", 0); } *************** *** 1291,1298 **** if (gl_config.extensions_string.indexOf("GL_SGIS_multitexture") >= 0) { if (qglActiveTextureARB) { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 1); } else if (gl_ext_multitexture.value != 0.0f) { ! ri.Con_Printf(Defines.PRINT_ALL, "...using GL_SGIS_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" ); // qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" ); --- 1292,1299 ---- if (gl_config.extensions_string.indexOf("GL_SGIS_multitexture") >= 0) { if (qglActiveTextureARB) { ! VID.Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture deprecated in favor of ARB_multitexture\n"); Cvar.SetValue("r_fullbright", 1); } else if (gl_ext_multitexture.value != 0.0f) { ! VID.Printf(Defines.PRINT_ALL, "...using GL_SGIS_multitexture\n"); // qglMTexCoord2fSGIS = ( void * ) qwglGetProcAddress( "glMTexCoord2fSGIS" ); // qglSelectTextureSGIS = ( void * ) qwglGetProcAddress( "glSelectTextureSGIS" ); *************** *** 1303,1312 **** // //GL_TEXTURE1 = GL.GL_TEXTURE1_SGIS; } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! ri.Con_Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture not found\n"); if (!qglActiveTextureARB) Cvar.SetValue("r_fullbright", 0); --- 1304,1313 ---- // //GL_TEXTURE1 = GL.GL_TEXTURE1_SGIS; } else { ! VID.Printf(Defines.PRINT_ALL, "...ignoring GL_SGIS_multitexture\n"); Cvar.SetValue("r_fullbright", 0); } } else { ! VID.Printf(Defines.PRINT_ALL, "...GL_SGIS_multitexture not found\n"); if (!qglActiveTextureARB) Cvar.SetValue("r_fullbright", 0); *************** *** 1322,1326 **** int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! ri.Con_Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", --- 1323,1327 ---- int err = gl.glGetError(); if (err != GL.GL_NO_ERROR) ! VID.Printf( Defines.PRINT_ALL, "glGetError() = 0x%x\n\t%s\n", *************** *** 1336,1343 **** */ protected void R_Shutdown() { ! ri.Cmd_RemoveCommand("modellist"); ! ri.Cmd_RemoveCommand("screenshot"); ! ri.Cmd_RemoveCommand("imagelist"); ! ri.Cmd_RemoveCommand("gl_strings"); Mod_FreeAll(); --- 1337,1344 ---- */ protected void R_Shutdown() { ! Cmd.RemoveCommand("modellist"); ! Cmd.RemoveCommand("screenshot"); ! Cmd.RemoveCommand("imagelist"); ! Cmd.RemoveCommand("gl_strings"); Mod_FreeAll(); *************** *** 1367,1371 **** cvar_t ref; ! ref = ri.Cvar_Get("vid_ref", "jogl", 0); ref.modified = true; } --- 1368,1372 ---- cvar_t ref; ! ref = Cvar.Get("vid_ref", "jogl", 0); ref.modified = true; } *************** *** 1400,1404 **** putenv( envbuffer ); */ ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } --- 1401,1405 ---- putenv( envbuffer ); */ ! VID.Printf(Defines.PRINT_DEVELOPER, "gamma anpassung fuer VOODOO nicht gesetzt"); } } Index: Surf.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Surf.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Surf.java 12 Jul 2004 18:19:42 -0000 1.4 --- Surf.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 29,32 **** --- 29,33 ---- import jake2.client.*; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Lib; *************** *** 425,429 **** if ( !LM_AllocBlock( smax, tmax, lightPos) ) { ! ri.Sys_Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax + "," + tmax + ") failed (dynamic)\n"); } --- 426,430 ---- if ( !LM_AllocBlock( smax, tmax, lightPos) ) { ! Com.Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax + "," + tmax + ") failed (dynamic)\n"); } *************** *** 1406,1410 **** gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! ri.Sys_Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); --- 1407,1411 ---- gl_lms.lightmap_buffer ); if ( ++gl_lms.current_lightmap_texture == MAX_LIGHTMAPS ) ! Com.Error( Defines.ERR_DROP, "LM_UploadBlock() - MAX_LIGHTMAPS exceeded\n" ); *************** *** 1557,1561 **** if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! ri.Sys_Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } --- 1558,1562 ---- if ( !LM_AllocBlock( smax, tmax, lightPos ) ) { ! Com.Error( Defines.ERR_FATAL, "Consecutive calls to LM_AllocBlock(" + smax +"," + tmax +") failed\n"); } } Index: Image.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Image.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Image.java 12 Jul 2004 22:08:03 -0000 1.4 --- Image.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 27,32 **** --- 27,34 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.particle_t; import jake2.game.cvar_t; + import jake2.qcommon.*; import jake2.qcommon.longjmpException; import jake2.qcommon.qfiles; *************** *** 264,268 **** if (i == NUM_GL_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } --- 266,270 ---- if (i == NUM_GL_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad filter name: [" + string + "]\n"); return; } *************** *** 298,302 **** if (i == NUM_GL_ALPHA_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } --- 300,304 ---- if (i == NUM_GL_ALPHA_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad alpha texture mode name: [" + string + "]\n"); return; } *************** *** 318,322 **** if (i == NUM_GL_SOLID_MODES) { ! ri.Con_Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } --- 320,324 ---- if (i == NUM_GL_SOLID_MODES) { ! VID.Printf(Defines.PRINT_ALL, "bad solid texture mode name: [" + string + "]\n"); return; } *************** *** 336,340 **** final String[] palstrings = { "RGB", "PAL" }; ! ri.Con_Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; --- 338,342 ---- final String[] palstrings = { "RGB", "PAL" }; ! VID.Printf(Defines.PRINT_ALL, "------------------\n"); texels = 0; *************** *** 347,367 **** switch (image.type) { case it_skin : ! ri.Con_Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! ri.Con_Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! ri.Con_Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! ri.Con_Printf(Defines.PRINT_ALL, "P"); break; default : ! ri.Con_Printf(Defines.PRINT_ALL, " "); break; } ! ri.Con_Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", --- 349,369 ---- switch (image.type) { case it_skin : ! VID.Printf(Defines.PRINT_ALL, "M"); break; case it_sprite : ! VID.Printf(Defines.PRINT_ALL, "S"); break; case it_wall : ! VID.Printf(Defines.PRINT_ALL, "W"); break; case it_pic : ! VID.Printf(Defines.PRINT_ALL, "P"); break; default : ! VID.Printf(Defines.PRINT_ALL, " "); break; } ! VID.Printf( Defines.PRINT_ALL, " %3i %3i %s: %s\n", *************** *** 369,373 **** image.name)); } ! ri.Con_Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } --- 371,375 ---- image.name)); } ! VID.Printf(Defines.PRINT_ALL, "Total texel count (not counting mipmaps): " + texels + '\n'); } *************** *** 465,472 **** // load the file // ! byte[] raw = ri.FS_LoadFile(filename); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } --- 467,474 ---- // load the file // ! byte[] raw = FS.LoadFile(filename); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad pcx file " + filename + '\n'); return null; } *************** *** 484,488 **** || pcx.ymax >= 480) { ! ri.Con_Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } --- 486,490 ---- || pcx.ymax >= 480) { ! VID.Printf(Defines.PRINT_ALL, "Bad pcx file " + filename + '\n'); return null; } *************** *** 560,568 **** // load the file // ! raw = ri.FS_LoadFile (name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } --- 562,570 ---- // load the file // ! raw = FS.LoadFile (name); if (raw == null) { ! VID.Printf(Defines.PRINT_DEVELOPER, "Bad tga file "+ name +'\n'); return null; } *************** *** 571,578 **** if (targa_header.image_type != 2 && targa_header.image_type != 10) ! ri.Sys_Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! ri.Sys_Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; --- 573,580 ---- if (targa_header.image_type != 2 && targa_header.image_type != 10) ! Com.Error(Defines.ERR_DROP, "LoadTGA: Only type 2 and 10 targa RGB images supported\n"); if (targa_header.colormap_type != 0 || (targa_header.pixel_size != 32 && targa_header.pixel_size != 24)) ! Com.Error (Defines.ERR_DROP, "LoadTGA: Only 32 or 24 bit images supported (no colormaps)\n"); columns = targa_header.width; *************** *** 1102,1106 **** if (scaled_width * scaled_height > 256 * 256) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha --- 1104,1108 ---- if (scaled_width * scaled_height > 256 * 256) ! Com.Error(Defines.ERR_DROP, "GL_Upload32: too big"); // scan the texture for any non-255 alpha *************** *** 1120,1124 **** comp = gl_tex_alpha_format; else { ! ri.Con_Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } --- 1122,1126 ---- comp = gl_tex_alpha_format; else { ! VID.Printf(Defines.PRINT_ALL, "Unknown number of texture components " + samples + '\n'); comp = samples; } *************** *** 1263,1267 **** if (s > trans.length) ! ri.Sys_Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { --- 1265,1269 ---- if (s > trans.length) ! Com.Error(Defines.ERR_DROP, "GL_Upload8: too large"); if (qglColorTableEXT && gl_ext_palettedtexture.value != 0.0f && is_sky) { *************** *** 1330,1334 **** { if (numgltextures == MAX_GLTEXTURES) ! ri.Sys_Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; --- 1332,1336 ---- { if (numgltextures == MAX_GLTEXTURES) ! Com.Error (Defines.ERR_DROP, "MAX_GLTEXTURES"); numgltextures++; *************** *** 1337,1341 **** if (name.length() > Defines.MAX_QPATH) ! ri.Sys_Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; --- 1339,1343 ---- if (name.length() > Defines.MAX_QPATH) ! Com.Error(Defines.ERR_DROP, "Draw_LoadPic: \"" + name + "\" is too long"); image.name = name; *************** *** 1453,1459 **** image_t image = null; ! byte[] raw = ri.FS_LoadFile(name); if (raw == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } --- 1455,1461 ---- image_t image = null; ! byte[] raw = FS.LoadFile(name); if (raw == null) { ! VID.Printf(Defines.PRINT_ALL, "GL_FindImage: can't load " + name + '\n'); return r_notexture; } *************** *** 1487,1492 **** if (name == null || name.length() < 5) ! return null; // ri.Sys_Error (ERR_DROP, "GL_FindImage: NULL name"); ! // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it --- 1489,1494 ---- if (name == null || name.length() < 5) ! return null; // Com.Error (ERR_DROP, "GL_FindImage: NULL name"); ! // Com.Error (ERR_DROP, "GL_FindImage: bad name: %s", name); // look for it *************** *** 1596,1600 **** if (palette[0] == null || palette[0].length != 768) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; --- 1598,1602 ---- if (palette[0] == null || palette[0].length != 768) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/colormap.pcx"); byte[] pal = palette[0]; *************** *** 1626,1633 **** // init intensity conversions ! intensity = ri.Cvar_Get("intensity", "2", 0); if (intensity.value <= 1) ! ri.Cvar_Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; --- 1628,1635 ---- // init intensity conversions ! intensity = Cvar.Get("intensity", "2", 0); if (intensity.value <= 1) ! Cvar.Set("intensity", "1"); gl_state.inverse_intensity = 1 / intensity.value; *************** *** 1636,1642 **** if (qglColorTableEXT) { ! gl_state.d_16to8table = ri.FS_LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! ri.Sys_Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } --- 1638,1644 ---- if (qglColorTableEXT) { ! gl_state.d_16to8table = FS.LoadFile("pics/16to8.dat"); if (gl_state.d_16to8table == null) ! Com.Error(Defines.ERR_FATAL, "Couldn't load pics/16to8.pcx"); } Index: Light.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Light.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Light.java 12 Jul 2004 22:08:04 -0000 1.5 --- Light.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 32,35 **** --- 32,36 ---- import jake2.game.GameBase; import jake2.game.cplane_t; + import jake2.qcommon.Com; import jake2.qcommon.longjmpException; import jake2.render.*; *************** *** 504,508 **** if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! ri.Sys_Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); smax = (surf.extents[0] >> 4) + 1; --- 505,509 ---- if ( (surf.texinfo.flags & (Defines.SURF_SKY | Defines.SURF_TRANS33 | Defines.SURF_TRANS66 | Defines.SURF_WARP)) != 0 ) ! Com.Error(Defines.ERR_DROP, "R_BuildLightMap called for non-lit surface"); smax = (surf.extents[0] >> 4) + 1; *************** *** 510,514 **** size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! ri.Sys_Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { --- 511,515 ---- size = smax * tmax; if (size > ((s_blocklights.length * Defines.SIZE_OF_FLOAT) >> 4) ) ! Com.Error(Defines.ERR_DROP, "Bad s_blocklights size"); try { Index: Warp.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Warp.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Warp.java 12 Jul 2004 22:08:03 -0000 1.5 --- Warp.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 28,31 **** --- 28,32 ---- import jake2.Defines; import jake2.Globals; + import jake2.qcommon.Com; import jake2.render.*; import jake2.util.Math3D; *************** *** 126,130 **** if (numverts > 60) ! ri.Sys_Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); --- 127,131 ---- if (numverts > 60) ! Com.Error(Defines.ERR_DROP, "numverts = " + numverts); BoundPoly(numverts, verts, mins, maxs); *************** *** 455,459 **** if (nump > MAX_CLIP_VERTS-2) ! ri.Sys_Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it --- 456,460 ---- if (nump > MAX_CLIP_VERTS-2) ! Com.Error(Defines.ERR_DROP, "ClipSkyPolygon: MAX_CLIP_VERTS"); if (stage == 6) { // fully clipped, so draw it Index: Mesh.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Mesh.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Mesh.java 12 Jul 2004 22:08:03 -0000 1.5 --- Mesh.java 16 Jul 2004 10:11:35 -0000 1.6 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import jake2.client.entity_t; import jake2.qcommon.qfiles; *************** *** 475,484 **** if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } --- 476,485 ---- if ( ( e.frame >= paliashdr.num_frames ) || ( e.frame < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name +": no such frame " + e.frame + '\n'); e.frame = 0; } if ( ( e.oldframe >= paliashdr.num_frames ) || ( e.oldframe < 0 ) ) { ! VID.Printf (Defines.PRINT_ALL, "R_CullAliasModel " + currentmodel.name + ": no such oldframe " + e.oldframe + '\n'); e.oldframe = 0; } *************** *** 810,814 **** || (currententity.frame < 0) ) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 811,815 ---- || (currententity.frame < 0) ) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such frame " + currententity.frame + '\n'); currententity.frame = 0; currententity.oldframe = 0; *************** *** 818,822 **** || (currententity.oldframe < 0)) { ! ri.Con_Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; --- 819,823 ---- || (currententity.oldframe < 0)) { ! VID.Printf (Defines.PRINT_ALL, "R_DrawAliasModel " + currentmodel.name +": no such oldframe " + currententity.oldframe + '\n'); currententity.frame = 0; currententity.oldframe = 0; Index: Draw.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Draw.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Draw.java 15 Jul 2004 14:37:34 -0000 1.4 --- Draw.java 16 Jul 2004 10:11:35 -0000 1.5 *************** *** 27,30 **** --- 27,32 ---- import jake2.Defines; + import jake2.client.VID; + import jake2.qcommon.Com; import jake2.render.image_t; *************** *** 137,141 **** if (image == null) { ! ri.Con_Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } --- 139,143 ---- if (image == null) { ! VID.Printf (Defines.PRINT_ALL, "Can't find pic: " + pic +'\n'); return; } *************** *** 176,180 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } --- 178,182 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " +pic + '\n'); return; } *************** *** 216,220 **** if (image == null) { ! ri.Con_Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } --- 218,222 ---- if (image == null) { ! VID.Printf(Defines.PRINT_ALL, "Can't find pic: " + pic + '\n'); return; } *************** *** 250,254 **** if ( colorIndex > 255) ! ri.Sys_Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); --- 252,256 ---- if ( colorIndex > 255) ! Com.Error(Defines.ERR_FATAL, "Draw_Fill: bad color"); gl.glDisable(GL.GL_TEXTURE_2D); Index: Misc.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/render/jogl/Misc.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Misc.java 9 Jul 2004 06:50:48 -0000 1.2 --- Misc.java 16 Jul 2004 10:11:35 -0000 1.3 *************** *** 27,30 **** --- 27,31 ---- import jake2.Defines; + import jake2.client.VID; import net.java.games.jogl.GL; import net.java.games.jogl.WGL; *************** *** 146,150 **** // if (i==100) // { ! // ri.... [truncated message content] |