Changed: #878 Fix typos in comments/code

This commit is contained in:
kervala 2010-06-03 14:45:51 +02:00
parent cb86d0ff0e
commit f0236fc165
11 changed files with 57 additions and 129 deletions

View file

@ -57,7 +57,7 @@ void CAsyncTextureManager::CTextureEntry::createCoarseBitmap()
CoarseBitmap= *Texture;
// remove all mipmaps, and convert to DXTC1 (if possible, ie if was DXTC5 or DXTC3 as example)
CoarseBitmap.releaseMipMaps();
// TODODO: consersion to DXTC1
// TODODO: conversion to DXTC1
CoarseBitmap.convertToType(CBitmap::DXTC1);
}

View file

@ -17,12 +17,11 @@
#include "std3d.h"
#include "nel/3d/bezier_patch.h"
using namespace NLMISC;
namespace NL3D {
// ***************************************************************************
void CBezierPatch::make(CVector vertices[4], CVector normals[4])
{
@ -48,6 +47,7 @@ void CBezierPatch::make(CVector vertices[4], CVector normals[4])
makeInteriors();
}
// ***************************************************************************
void CBezierPatch::makeInteriors()
{
@ -60,6 +60,7 @@ void CBezierPatch::makeInteriors()
Interiors[2] = Tangents[3] + Tangents[4] - c;
Interiors[3] = Tangents[5] + Tangents[6] - d;
}
// ***************************************************************************
void CBezierPatch::applyMatrix(const CMatrix &m)
{
@ -73,7 +74,6 @@ void CBezierPatch::applyMatrix(const CMatrix &m)
Interiors[i]= m*Interiors[i];
}
// ***************************************************************************
static inline void mulAdd(CVector &tgt, const CVector &src, float f)
{
@ -82,7 +82,6 @@ static inline void mulAdd(CVector &tgt, const CVector &src, float f)
tgt.z+= src.z*f;
}
// ***************************************************************************
static inline void mulAddD(CVectorD &tgt, const CVector &src, double f)
{
@ -91,7 +90,6 @@ static inline void mulAddD(CVectorD &tgt, const CVector &src, double f)
tgt.z+= src.z*f;
}
// ***************************************************************************
CVector CBezierPatch::eval(float ps, float pt) const
{
@ -132,6 +130,7 @@ CVector CBezierPatch::eval(float ps, float pt) const
return p;
}
// ***************************************************************************
CVectorD CBezierPatch::evalDouble(double ps, double pt) const
{
@ -173,7 +172,6 @@ CVectorD CBezierPatch::evalDouble(double ps, double pt) const
return p;
}
// ***************************************************************************
CVector CBezierPatch::evalNormal(float ps, float pt) const
{
@ -250,14 +248,12 @@ CVector CBezierPatch::evalNormal(float ps, float pt) const
mulAdd(tgtT, Tangents[3] , s2 * t3);
mulAdd(tgtT, Vertices[2] , s3 * t3);
// Return the normal.
CVector norm= tgtT^tgtS;
norm.normalize();
return norm;
}
// ***************************************************************************
CVector CBezierPatch::evalTangentS(float ps, float pt) const
{
@ -307,7 +303,6 @@ CVector CBezierPatch::evalTangentS(float ps, float pt) const
return tgtS.normed();
}
// ***************************************************************************
CVector CBezierPatch::evalTangentT(float ps, float pt) const
{
@ -357,7 +352,6 @@ CVector CBezierPatch::evalTangentT(float ps, float pt) const
return tgtT.normed();
}
// ***************************************************************************
void CBezierPatch::CBezierCurve::subdivide(CBezierCurve &left, CBezierCurve &right, float t)
{
@ -377,7 +371,6 @@ void CBezierPatch::CBezierCurve::subdivide(CBezierCurve &left, CBezierCurve &ri
left.P3= right.P0= t1*left.P2 + t*right.P1;
}
// ***************************************************************************
void CBezierPatch::subdivideS(CBezierPatch &left, CBezierPatch &right, float s) const
{
@ -408,7 +401,6 @@ void CBezierPatch::subdivideS(CBezierPatch &left, CBezierPatch &right, float s)
curveTRight[3].get(right.Vertices[1], right.Tangents[2] , right.Tangents[3] , right.Vertices[2]);
}
// ***************************************************************************
void CBezierPatch::subdivideT(CBezierPatch &top, CBezierPatch &bottom, float t) const
{
@ -439,6 +431,4 @@ void CBezierPatch::subdivideT(CBezierPatch &top, CBezierPatch &bottom, float t)
curveSBottom[3].get(bottom.Vertices[3], bottom.Tangents[5] , bottom.Tangents[4] , bottom.Vertices[2]);
}
} // NL3D

View file

@ -21,8 +21,6 @@
#include "nel/3d/texture_bump.h"
#include "nel/3d/material.h"
namespace NL3D {
static void convBlend(CMaterial::TBlend blend, GLenum& glenum)
@ -86,7 +84,6 @@ static inline void convTexAddr(ITexture *tex, CMaterial::TTexAddressingMode mode
GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, GL_DOT_PRODUCT_DEPTH_REPLACE_NV
};
static const GLenum glTexCubeAddrModesNV[] =
{
GL_NONE, GL_TEXTURE_CUBE_MAP_ARB, GL_PASS_THROUGH_NV, GL_CULL_FRAGMENT_NV,
@ -107,8 +104,6 @@ static inline void convTexAddr(ITexture *tex, CMaterial::TTexAddressingMode mode
}
}
// --------------------------------------------------
void CDriverGL::setTextureEnvFunction(uint stage, CMaterial& mat)
{
@ -152,7 +147,6 @@ void CDriverGL::setTextureEnvFunction(uint stage, CMaterial& mat)
}
}
//--------------------------------
void CDriverGL::setupUserTextureMatrix(uint numStages, CMaterial& mat)
{
@ -219,7 +213,6 @@ void CDriverGL::disableUserTextureMatrix()
}
}
// --------------------------------------------------
CMaterial::TShader CDriverGL::getSupportedShader(CMaterial::TShader shader)
{
@ -235,9 +228,6 @@ CMaterial::TShader CDriverGL::getSupportedShader(CMaterial::TShader shader)
}
}
// --------------------------------------------------
void CDriverGL::setTextureShaders(const uint8 *addressingModes, const CSmartPtr<ITexture> *textures)
{
@ -256,10 +246,7 @@ void CDriverGL::setTextureShaders(const uint8 *addressingModes, const CSmartPtr<
}
}
// --------------------------------------------------
bool CDriverGL::setupMaterial(CMaterial& mat)
{
H_AUTO_OGL(CDriverGL_setupMaterial)
@ -268,7 +255,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
uint32 touched=mat.getTouched();
uint stage;
// profile.
_NbSetupMaterialCall++;
@ -287,7 +273,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
}
pShader=static_cast<CShaderGL*>((IMaterialDrvInfos*)(mat._MatDrvInfo));
// 1. Setup modified fields of material.
//=====================================
if( touched )
@ -329,7 +314,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
pShader->SupportedShader= getSupportedShader(mat.getShader());
}
// Since modified, must rebind all openGL states. And do this also for the delete/new problem.
/* If an old material is deleted, _CurrentMaterial is invalid. But this is grave only if a new
material is created, with the same pointer (bad luck). Since an newly allocated material always
@ -342,7 +326,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
mat.clearTouched(0xFFFFFFFF);
}
// Now we can get the supported shader from the cache.
CMaterial::TShader matShader = pShader->SupportedShader;
@ -417,7 +400,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
}
}
// 3. Bind OpenGL States.
//=======================
if (_CurrentMaterial!=&mat)
@ -446,7 +428,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
_DriverGLStates.alphaFunc(mat.getAlphaTestThreshold());
}
// Bind ZBuffer Part.
//===================
_DriverGLStates.enableZWrite(mat.getFlags()&IDRV_MAT_ZWRITE);
@ -526,7 +507,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
_CurrentMaterial=&mat;
}
// 4. Misc
//=====================================
@ -547,7 +527,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
return true;
}
// ***************************************************************************
sint CDriverGL::beginMultiPass()
{
@ -574,6 +553,7 @@ sint CDriverGL::beginMultiPass()
default: return 1;
}
}
// ***************************************************************************
void CDriverGL::setupPass(uint pass)
{
@ -607,7 +587,6 @@ void CDriverGL::setupPass(uint pass)
}
}
// ***************************************************************************
void CDriverGL::endMultiPass()
{
@ -640,7 +619,6 @@ void CDriverGL::endMultiPass()
}
}
// ***************************************************************************
void CDriverGL::computeLightMapInfos (const CMaterial &mat)
{
@ -682,7 +660,6 @@ void CDriverGL::computeLightMapInfos (const CMaterial &mat)
// NB: _NLightMaps==0 means there is no lightmaps at all.
}
// ***************************************************************************
sint CDriverGL::beginLightMapMultiPass ()
{
@ -714,13 +691,13 @@ sint CDriverGL::beginLightMapMultiPass ()
// Manage too if no lightmaps.
return std::max (_NLightMapPass, (uint)1);
}
// ***************************************************************************
void CDriverGL::setupLightMapPass(uint pass)
{
H_AUTO_OGL(CDriverGL_setupLightMapPass)
const CMaterial &mat= *_CurrentMaterial;
// common colors
static uint32 packedColorBlack= CRGBA(0,0,0,255).getPacked();
static GLfloat glcolBlack[4]= {0.f,0.f,0.f,1.f};
@ -759,7 +736,6 @@ void CDriverGL::setupLightMapPass(uint pass)
nlassert(pass<_NLightMapPass);
// setup Texture Pass.
//=========================
uint lmapId;
@ -953,7 +929,6 @@ void CDriverGL::setupLightMapPass(uint pass)
}
}
// setup blend / lighting.
//=========================
@ -1012,7 +987,6 @@ void CDriverGL::setupLightMapPass(uint pass)
}
}
// Dynamic lighting: The influence of the dynamic light must be added only in the first pass (only one time)
if(pass==0)
{
@ -1026,6 +1000,7 @@ void CDriverGL::setupLightMapPass(uint pass)
else if(pass==1)
_DriverGLStates.setDiffuse(packedColorBlack, glcolBlack);
}
// ***************************************************************************
void CDriverGL::endLightMapMultiPass()
{
@ -1057,7 +1032,6 @@ void CDriverGL::endLightMapMultiPass()
}
}
// ***************************************************************************
void CDriverGL::resetLightMapVertexSetup()
{
@ -1079,7 +1053,6 @@ void CDriverGL::resetLightMapVertexSetup()
_LastVertexSetupIsLightMap= false;
}
// ***************************************************************************
void CDriverGL::startSpecularBatch()
{
@ -1185,6 +1158,7 @@ sint CDriverGL::beginSpecularMultiPass()
else
return 2;
}
// ***************************************************************************
void CDriverGL::setupSpecularPass(uint pass)
{
@ -1308,10 +1282,9 @@ void CDriverGL::setupSpecularPass(uint pass)
}
}
else
{ // We have to do it in 2 passes
{
// We have to do it in 2 passes
// For Both Pass, setup correct Env.
if( pass == 0 )
{ // Just display the texture
_DriverGLStates.enableBlend(false);
@ -1333,7 +1306,6 @@ void CDriverGL::setupSpecularPass(uint pass)
activateTexEnvMode(0, env);
// Set stage 1
if( mat.getTexture(0) == NULL )
{
@ -1355,6 +1327,7 @@ void CDriverGL::setupSpecularPass(uint pass)
}
}
}
// ***************************************************************************
void CDriverGL::endSpecularMultiPass()
{
@ -1364,7 +1337,6 @@ void CDriverGL::endSpecularMultiPass()
setupSpecularEnd();
}
// a functor that can is used to generate a cube map used for specular / diffuse lighting
struct CSpecCubeMapFunctor : ICubeMapFunctor
{
@ -1380,13 +1352,11 @@ struct CSpecCubeMapFunctor : ICubeMapFunctor
float Exp;
};
/* /// parameters for specular cube map generation
const uint MaxSpecularExp = 64;
const uint SpecularExpStep = 8;
const uint SpecularMapSize = 32; */
// ***************************************************************************
CTextureCube *CDriverGL::getSpecularCubeMap(uint exp)
{
@ -1434,7 +1404,6 @@ CTextureCube *CDriverGL::getSpecularCubeMap(uint exp)
NLMISC::clamp(exp, 1u, (MaxExponent - 1));
uint cubeMapIndex = expToCubeMap[exp];
nlassert(cubeMapIndex < numCubeMap);
@ -1542,7 +1511,6 @@ void CDriverGL::setupPPLPass(uint pass)
// setup the tex envs
// Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1
if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0)
{
@ -1591,8 +1559,6 @@ void CDriverGL::setupPPLPass(uint pass)
env.Env.SrcArg1Alpha = CMaterial::Diffuse;
activateTexEnvMode(1, env);
// Stage 2 is rgb = SpecularCubeMap * SpecularLightColor + Prec * 1
// alpha = prec alpha
@ -1674,7 +1640,6 @@ void CDriverGL::endPPLMultiPass()
// nothing to do there ...
}
// ******PER PIXEL LIGHTING, NO SPECULAR**************************************
sint CDriverGL::beginPPLNoSpecMultiPass()
{
@ -1704,7 +1669,6 @@ void CDriverGL::setupPPLNoSpecPass(uint pass)
activateTexture(0, tex0);
activateTexture(1, mat.getTexture(0));
for (uint k = 2; k < inlGetNumTextStages(); ++k)
{
activateTexture(k, NULL);
@ -1712,7 +1676,6 @@ void CDriverGL::setupPPLNoSpecPass(uint pass)
// setup the tex envs
// Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1 (TODO : EnvCombine3)
if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0)
{
@ -1784,7 +1747,6 @@ void CDriverGL::endPPLNoSpecMultiPass()
}
}*/
// ***************************************************************************
/*inline void CDriverGL::setupCausticsFirstTex(const CMaterial &mat)
{
@ -1999,7 +1961,6 @@ void CDriverGL::endCloudMultiPass()
}
}
// ***************************************************************************
sint CDriverGL::beginWaterMultiPass()
{
@ -2088,7 +2049,6 @@ void CDriverGL::setupWaterPassR200(const CMaterial &mat)
}
}
// ***************************************************************************
/** water setup for ARB_fragment_program
*/
@ -2175,7 +2135,6 @@ void CDriverGL::setupWaterPassARB(const CMaterial &mat)
}
}
// ***************************************************************************
/** Presetupped texture shader for water shader on NV20
*/
@ -2187,7 +2146,6 @@ static const uint8 WaterNoDiffuseTexAddrMode[IDRV_MAT_MAXTEXTURES] =
CMaterial::TextureOff
};
static const uint8 WaterTexAddrMode[IDRV_MAT_MAXTEXTURES] =
{
CMaterial::FetchTexture,
@ -2198,7 +2156,6 @@ static const uint8 WaterTexAddrMode[IDRV_MAT_MAXTEXTURES] =
static const float IdentityTexMat[4] = { 1.f, 0.f, 0.f, 1.f };
// ***************************************************************************
void CDriverGL::setupWaterPassNV20(const CMaterial &mat)
{

View file

@ -32,7 +32,7 @@ namespace NLMISC {
/**
* TODO Class description
* CEventEmitter UNIX implementation
* \author Vianney Lecroart
* \author Nevrax France
* \date 2000

View file

@ -257,7 +257,7 @@ void CShadowMapManager::renderGenerate(CScene *scene)
if(driverForShadowGeneration)
driverForShadowGeneration->getWindowSize(wndW, wndH);
uint baseTextureSize= scene->getShadowMapTextureSize();
// Minimize the Dest Texture size, so the blurTexture don't get to heavy in VRAM.
// Minimize the Dest Texture size, so the blurTexture don't get too heavy in VRAM.
uint32 textDestW= min(wndW, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE);
uint32 textDestH= min(wndH, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE);

View file

@ -18,10 +18,6 @@
#include "stdpch.h"
#ifdef NL_OS_WINDOWS
#include <windows.h>
#endif
#include "actions.h"
#include "events_listener.h"
#include "interface_v3/interface_manager.h"

View file

@ -26,9 +26,8 @@
// OS.
#ifdef NL_OS_WINDOWS
# define NOMINMAX
# include <windows.h>
# undef min
# undef max
#endif
// Misc

View file

@ -247,7 +247,6 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
if (prop)
_TextShadowColorOver = convertColor(prop);
// *** Read Text Global Color
// Default: take "global_color" param interface_element option.
_TextModulateGlobalColorNormal= _TextModulateGlobalColorPushed= _TextModulateGlobalColorOver= getModulateGlobalColor();
@ -262,12 +261,10 @@ bool CCtrlTextButton::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup)
prop = (char*) xmlGetProp( cur, (xmlChar*)"force_text_over" );
if (prop) _ForceTextOver= convertBool(prop);
// read Text header color
prop = (char*) xmlGetProp( cur, (xmlChar*)"text_header_color" );
if (prop) _TextHeaderColor= convertBool(prop);
return true;
}

View file

@ -31,10 +31,6 @@
#include "../time_client.h"
#include "lua_ihm.h"
#ifdef NL_OS_WINDOWS
#include <windows.h>
#endif
using namespace std;
using namespace NLMISC;
using namespace NL3D;

View file

@ -19,13 +19,6 @@
//-----------------------------------------------------------------------------
#include "stdpch.h"
#ifdef NL_OS_WINDOWS
//#include <sys/utime.h>
#else
//#include <utime.h>
//#define _utimbuf utimbuf
//#define _utime utime
#endif
#include "nel/misc/path.h"
#include "nel/misc/sha1.h"
#include "bnp_patch.h"