-
- conbacktexnum = loadtextureimage("gfx/conback", 0, 0, false, false);
-
-// memset(scraptexnum, 0, sizeof(scraptexnum));
-
- // get the other pics we need
- draw_disc = Draw_PicFromWad ("disc");
-}
-
-void gl_draw_shutdown()
-{
-}
-
-char engineversion[40];
-int engineversionx, engineversiony;
-
-extern void GL_Textures_Init();
-void GL_Draw_Init (void)
-{
- int i;
- Cvar_RegisterVariable (&qsg_version);
- Cvar_RegisterVariable (&scr_conalpha);
-
- Cmd_AddCommand ("loadsky", &LoadSky_f);
-
-#if defined(__linux__)
- sprintf (engineversion, "DarkPlaces Linux GL %.2f build %3i", (float) VERSION, buildnumber);
-#elif defined(WIN32)
- sprintf (engineversion, "DarkPlaces Windows GL %.2f build %3i", (float) VERSION, buildnumber);
-#else
- sprintf (engineversion, "DarkPlaces Unknown GL %.2f build %3i", (float) VERSION, buildnumber);
-#endif
- for (i = 0;i < 40 && engineversion[i];i++)
- engineversion[i] += 0x80; // shift to orange
- engineversionx = vid.width - strlen(engineversion) * 8 - 8;
- engineversiony = vid.height - 8;
-
- GL_Textures_Init();
- R_RegisterModule("GL_Draw", gl_draw_start, gl_draw_shutdown);
-}
-
-/*
-================
-Draw_Character
-
-Draws one 8*8 graphics character with 0 being transparent.
-It can be clipped to the top of the screen to allow the console to be
-smoothly scrolled off.
-================
-*/
-void Draw_Character (int x, int y, int num)
-{
- int row, col;
- float frow, fcol, size;
-
- if (num == 32)
- return; // space
-
- num &= 255;
-
- if (y <= -8)
- return; // totally off screen
-
- row = num>>4;
- col = num&15;
-
- frow = row*0.0625;
- fcol = col*0.0625;
- size = 0.0625;
-
- if (!r_render.value)
- return;
- glBindTexture(GL_TEXTURE_2D, char_texture);
- // LordHavoc: NEAREST mode on text if not scaling up
- if (glwidth < (int) vid.width)
+ if (pic->tex == NULL && !strcmp(path, "ui/mousepointer.tga"))
+ pic->tex = draw_generatemousepointer();
+ if (pic->tex == NULL && !strcmp(path, "gfx/crosshair1.tga"))
+ pic->tex = draw_generatecrosshair(0);
+ if (pic->tex == NULL && !strcmp(path, "gfx/crosshair2.tga"))
+ pic->tex = draw_generatecrosshair(1);
+ if (pic->tex == NULL && !strcmp(path, "gfx/crosshair3.tga"))
+ pic->tex = draw_generatecrosshair(2);
+ if (pic->tex == NULL && !strcmp(path, "gfx/crosshair4.tga"))
+ pic->tex = draw_generatecrosshair(3);
+ if (pic->tex == NULL && !strcmp(path, "gfx/crosshair5.tga"))
+ pic->tex = draw_generatecrosshair(4);
+ if (pic->tex == NULL)