本文整理汇总了C++中Ren_Print函数的典型用法代码示例。如果您正苦于以下问题:C++ Ren_Print函数的具体用法?C++ Ren_Print怎么用?C++ Ren_Print使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Ren_Print函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: R_InitGamma
void R_InitGamma(void)
{
byte *data;
if (!GLEW_ARB_fragment_program)
{
Ren_Print("WARNING: R_InitGamma() skipped - no ARB_fragment_program\n");
return;
}
if (ri.Cvar_VariableIntegerValue("r_ignorehwgamma"))
{
Ren_Print("INFO: R_InitGamma() skipped - r_ignorehwgamma is set\n");
return;
}
data = (byte *)ri.Hunk_AllocateTempMemory(glConfig.vidWidth * glConfig.vidHeight * 4);
if (!data)
{
Ren_Print("WARNING: R_InitGamma() can't allocate temp memory\n"); // fatal?
return;
}
screenImage = R_CreateImage("screenBufferImage_skies", data, glConfig.vidWidth, glConfig.vidHeight, qfalse, qfalse, GL_CLAMP_TO_EDGE);
if (!screenImage)
{
Ren_Print("WARNING: R_InitGamma() screen image is NULL\n");
}
ri.Hunk_FreeTempMemory(data);
Com_Memset(&gammaProgram, 0, sizeof(shaderProgram_t));
R_BuildGammaProgram();
}
示例2: PrintChunkHeader
static void PrintChunkHeader(axChunkHeader_t *chunkHeader)
{
#if 0
Ren_Print("----------------------\n");
Ren_Print("R_LoadPSK: chunk header ident: '%s'\n", chunkHeader->ident);
Ren_Print("R_LoadPSK: chunk header flags: %i\n", chunkHeader->flags);
Ren_Print("R_LoadPSK: chunk header data size: %i\n", chunkHeader->dataSize);
Ren_Print("R_LoadPSK: chunk header num items: %i\n", chunkHeader->numData);
#endif
}
示例3: LogLight
/*
===============
LogLight
===============
*/
static void LogLight(trRefEntity_t *ent)
{
int max1, max2;
if (!(ent->e.renderfx & RF_FIRST_PERSON))
{
return;
}
max1 = ent->ambientLight[0];
if (ent->ambientLight[1] > max1)
{
max1 = ent->ambientLight[1];
}
else if (ent->ambientLight[2] > max1)
{
max1 = ent->ambientLight[2];
}
max2 = ent->directedLight[0];
if (ent->directedLight[1] > max2)
{
max2 = ent->directedLight[1];
}
else if (ent->directedLight[2] > max2)
{
max2 = ent->directedLight[2];
}
Ren_Print("amb:%i dir:%i\n", max1, max2);
}
示例4: RE_Shutdown
/*
===============
RE_Shutdown
===============
*/
void RE_Shutdown(qboolean destroyWindow)
{
Ren_Print("RE_Shutdown( %i )\n", destroyWindow);
ri.Cmd_RemoveSystemCommand("imagelist");
ri.Cmd_RemoveSystemCommand("shaderlist");
ri.Cmd_RemoveSystemCommand("skinlist");
ri.Cmd_RemoveSystemCommand("modellist");
ri.Cmd_RemoveSystemCommand("modelist");
ri.Cmd_RemoveSystemCommand("screenshot");
ri.Cmd_RemoveSystemCommand("screenshotJPEG");
ri.Cmd_RemoveSystemCommand("gfxinfo");
ri.Cmd_RemoveSystemCommand("minimize");
ri.Cmd_RemoveSystemCommand("taginfo");
// keep a backup of the current images if possible
// clean out any remaining unused media from the last backup
R_PurgeCache();
if (r_cache->integer)
{
if (tr.registered)
{
if (destroyWindow)
{
R_IssuePendingRenderCommands();
R_DeleteTextures();
}
else
{
// backup the current media
R_BackupModels();
R_BackupShaders();
R_BackupImages();
}
}
}
else if (tr.registered)
{
R_IssuePendingRenderCommands();
R_DeleteTextures();
}
R_DoneFreeType();
R_ShutdownGamma();
// shut down platform specific OpenGL stuff
if (destroyWindow)
{
R_DoGLimpShutdown();
// release the virtual memory
R_Hunk_End();
R_FreeImageBuffer();
ri.Tag_Free(); // wipe all render alloc'd zone memory
}
tr.registered = qfalse;
}
示例5: R_SkinList_f
void R_SkinList_f(void)
{
int i, j;
skin_t *skin;
Ren_Print("------------------\n");
for (i = 0; i < tr.numSkins; i++)
{
skin = tr.skins[i];
Ren_Print("%3i:%s\n", i, skin->name);
for (j = 0; j < skin->numSurfaces; j++)
{
Ren_Print(" %s = %s\n", skin->surfaces[j]->name, skin->surfaces[j]->shader->name);
}
}
Ren_Print("------------------\n");
}
示例6: R_JPGOutputMessage
static void R_JPGOutputMessage(j_common_ptr cinfo)
{
char buffer[JMSG_LENGTH_MAX];
/* Create the message */
(*cinfo->err->format_message)(cinfo, buffer);
/* Send it to stderr, adding a newline */
Ren_Print("%s\n", buffer);
}
示例7: GLimp_StartDriverAndSetMode
static qboolean GLimp_StartDriverAndSetMode(int mode, qboolean fullscreen, qboolean noborder)
{
rserr_t err;
if (!SDL_WasInit(SDL_INIT_VIDEO))
{
if (SDL_Init(SDL_INIT_VIDEO) < 0)
{
Ren_Print("SDL_Init( SDL_INIT_VIDEO ) FAILED (%s)\n", SDL_GetError());
return qfalse;
}
Ren_Print("SDL initialized driver \"%s\"\n", SDL_GetCurrentVideoDriver());
}
if (fullscreen && ri.Cvar_VariableIntegerValue("in_nograb"))
{
Ren_Print("Fullscreen not allowed with in_nograb 1\n");
ri.Cvar_Set("r_fullscreen", "0");
r_fullscreen->modified = qfalse;
fullscreen = qfalse;
}
err = GLimp_SetMode(mode, fullscreen, noborder);
switch (err)
{
case RSERR_INVALID_FULLSCREEN:
Ren_Print("...WARNING: fullscreen unavailable in this mode\n");
return qfalse;
case RSERR_INVALID_MODE:
Ren_Print("...WARNING: could not set the given mode (%d)\n", mode);
return qfalse;
case RSERR_OLD_GL:
ri.Error(ERR_VID_FATAL, "Could not create opengl 3 context");
return qfalse;
default:
break;
}
return qtrue;
}
示例8: R_AnimationList_f
/*
================
R_AnimationList_f
================
*/
void R_AnimationList_f(void)
{
int i;
skelAnimation_t *anim;
for (i = 0; i < tr.numAnimations; i++)
{
anim = tr.animations[i];
if (anim->type == AT_PSA && anim->psa)
{
Ren_Print("'%s' : '%s'\n", anim->name, anim->psa->info.name);
}
else
{
Ren_Print("'%s'\n", anim->name);
}
}
Ren_Print("%8i : Total animations\n", tr.numAnimations);
}
示例9: Com_Printf
void QDECL Com_Printf(const char *msg, ...)
{
va_list argptr;
char text[1024];
va_start(argptr, msg);
Q_vsnprintf(text, sizeof(text), msg, argptr);
va_end(argptr);
Ren_Print("%s", text);
}
示例10: RE_AddRefEntityToScene
/*
=====================
RE_AddRefEntityToScene
=====================
*/
void RE_AddRefEntityToScene(const refEntity_t *ent)
{
if (!tr.registered)
{
return;
}
// fixed was ENTITYNUM_WORLD
if (r_numentities >= MAX_REFENTITIES)
{
// we may change this to developer print
Ren_Print("WARNING RE_AddRefEntityToScene: Dropping refEntity, reached MAX_REFENTITIES\n");
return;
}
if (Q_isnan(ent->origin[0]) || Q_isnan(ent->origin[1]) || Q_isnan(ent->origin[2]))
{
static qboolean firstTime = qtrue;
if (firstTime)
{
firstTime = qfalse;
Ren_Print("WARNING RE_AddRefEntityToScene passed a refEntity which has an origin with a NaN component\n");
}
return;
}
if ((int)ent->reType < 0 || ent->reType >= RT_MAX_REF_ENTITY_TYPE)
{
Ren_Drop("RE_AddRefEntityToScene: bad reType %i", ent->reType);
}
backEndData->entities[r_numentities].e = *ent;
backEndData->entities[r_numentities].lightingCalculated = qfalse;
r_numentities++;
// add projected shadows for this model
// - casting const away
R_AddModelShadow((refEntity_t *) ent);
}
示例11: RB_ShowImages
/**
* @brief Draw all the images to the screen, on top of whatever
* was there. This is used to test for texture thrashing.
*
* Also called by RE_EndRegistration
*/
void RB_ShowImages(void)
{
int i;
image_t *image;
float x, y, w, h;
int start, end;
if (!backEnd.projection2D)
{
RB_SetGL2D();
}
qglClear(GL_COLOR_BUFFER_BIT);
qglFinish();
start = ri.Milliseconds();
for (i = 0 ; i < tr.numImages ; i++)
{
image = tr.images[i];
w = glConfig.vidWidth / 40;
h = glConfig.vidHeight / 30;
x = i % 40 * w;
y = i / 30 * h;
// show in proportional size in mode 2
if (r_showImages->integer == 2)
{
w *= image->uploadWidth / 512.0f;
h *= image->uploadHeight / 512.0f;
}
GL_Bind(image);
qglBegin(GL_QUADS);
qglTexCoord2f(0, 0);
qglVertex2f(x, y);
qglTexCoord2f(1, 0);
qglVertex2f(x + w, y);
qglTexCoord2f(1, 1);
qglVertex2f(x + w, y + h);
qglTexCoord2f(0, 1);
qglVertex2f(x, y + h);
qglEnd();
}
qglFinish();
end = ri.Milliseconds();
Ren_Print("%i msec to draw all images\n", end - start);
}
示例12: GLimp_InitOpenGLContext
static qboolean GLimp_InitOpenGLContext()
{
#ifdef FEATURE_RENDERER2
int GLmajor, GLminor;
#endif
// get vendor
Q_strncpyz(glConfig.vendor_string, (char *) qglGetString(GL_VENDOR), sizeof(glConfig.vendor_string));
// get renderer
Q_strncpyz(glConfig.renderer_string, (char *) qglGetString(GL_RENDERER), sizeof(glConfig.renderer_string));
if (*glConfig.renderer_string && glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] == '\n')
{
glConfig.renderer_string[strlen(glConfig.renderer_string) - 1] = 0;
}
// get GL version
Q_strncpyz(glConfig.version_string, (char *) qglGetString(GL_VERSION), sizeof(glConfig.version_string));
Ren_Print("GL_VENDOR: %s\n", glConfig.vendor_string);
Ren_Print("GL_RENDERER: %s\n", glConfig.renderer_string);
Ren_Print("GL_VERSION: %s\n", glConfig.version_string);
#ifndef FEATURE_RENDERER2
Ren_Print("Using vanilla renderer\n");
#else
// get shading language version
Q_strncpyz(glConfig2.shadingLanguageVersion, (char *)glGetString(GL_SHADING_LANGUAGE_VERSION), sizeof(glConfig2.shadingLanguageVersion));
sscanf(glConfig2.shadingLanguageVersion, "%d.%d", &glConfig2.glslMajorVersion, &glConfig2.glslMinorVersion);
Ren_Print("GL_SHADING_LANGUAGE_VERSION: %s\n", glConfig2.shadingLanguageVersion);
// get GL context version
sscanf(( const char * ) glGetString(GL_VERSION), "%d.%d", &GLmajor, &GLminor);
glConfig2.contextCombined = (GLmajor * 100) + (GLminor * 10);
if (GLmajor < 2)
{
// missing shader support
return qfalse;
}
if (GLmajor < 3 || (GLmajor == 3 && GLminor < 2))
{
// shaders are supported, but not all GL3.x features
Ren_Print("Using enhanced renderer in GL 2.x mode\n");
return qtrue;
}
Ren_Print("Using enhanced renderer in GL 3.x mode\n");
glConfig.driverType = GLDRV_OPENGL3;
#endif
return qtrue;
}
示例13: GLimp_CheckForVersionExtension
static qboolean GLimp_CheckForVersionExtension(const char *ext, int coresince, qboolean required, cvar_t *var)
{
qboolean result = qfalse;
if ((coresince >= 0 && coresince <= glConfig2.contextCombined) || GL_CheckForExtension(ext))
{
if (var && var->integer)
{
result = qtrue;
}
else if (!var)
{
result = qtrue;
}
}
if (required && !result)
{
Ren_Fatal(MSG_ERR_OLD_VIDEO_DRIVER "\nYour GL driver is missing support for: %s\n", ext);
}
if (result)
{
Ren_Print("...found OpenGL extension - %s\n", ext);
}
else
{
if (var)
{
Ren_Print("...ignoring %s\n", ext);
}
else
{
Ren_Print("...%s not found\n", ext);
}
}
return result;
}
示例14: RE_Finish
/**
* @brief RE_Finish
*/
void RE_Finish(void)
{
renderFinishCommand_t *cmd;
Ren_Print("RE_Finish\n");
cmd = (renderFinishCommand_t *)R_GetCommandBuffer(sizeof(*cmd));
if (!cmd)
{
return;
}
cmd->commandId = RC_FINISH;
}
示例15: R_JPGErrorExit
static void R_JPGErrorExit(j_common_ptr cinfo)
{
char buffer[JMSG_LENGTH_MAX];
my_jpeg_error_mgr *mgr = (my_jpeg_error_mgr *)cinfo->err;
(*cinfo->err->format_message)(cinfo, buffer);
Ren_Print(S_COLOR_YELLOW "WARNING: (libjpeg) %s\n", buffer);
/* Let the memory manager delete any temp files before we die */
jpeg_destroy(cinfo);
/* Return from libjpeg */
longjmp(mgr->jmpbuf, 23);
}