diff --git a/code/nel/include/nel/3d/driver.h b/code/nel/include/nel/3d/driver.h index 2a0d061fd..914a1ea57 100644 --- a/code/nel/include/nel/3d/driver.h +++ b/code/nel/include/nel/3d/driver.h @@ -45,7 +45,7 @@ struct IKeyboardDevice; struct IInputDeviceManager; class CRect; class CLog; -}; +} namespace NL3D { diff --git a/code/nel/include/nel/3d/index_buffer.h b/code/nel/include/nel/3d/index_buffer.h index 365f11b13..2b0244a49 100644 --- a/code/nel/include/nel/3d/index_buffer.h +++ b/code/nel/include/nel/3d/index_buffer.h @@ -24,7 +24,7 @@ namespace NLMISC { class IStream; -}; +} namespace NL3D { diff --git a/code/nel/include/nel/3d/vertex_buffer.h b/code/nel/include/nel/3d/vertex_buffer.h index 2bd69ee8b..923bc27b0 100644 --- a/code/nel/include/nel/3d/vertex_buffer.h +++ b/code/nel/include/nel/3d/vertex_buffer.h @@ -104,7 +104,7 @@ public: StaticPreferred, // The buffer will not be modified. A block of driver AGP or VRAM memory is allocated for this buffer. The buffer is writeonly. RAMVolatile, // A block of temporary driver RAM memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly. AGPVolatile, // A block of temporary driver AGP memory will be returned by lock(). The buffer must be entirely filled after each swapBuffers(). The buffer is writeonly. - PreferredCount, + PreferredCount }; /** @@ -116,7 +116,7 @@ public: AGPResident, VRAMResident, NotResident, - LocationCount, + LocationCount }; /** @@ -149,7 +149,7 @@ public: enum { FirstTexCoordValue = TexCoord0, - LastTexCoordValue = TexCoord7, + LastTexCoordValue = TexCoord7 }; /** @@ -172,7 +172,7 @@ public: WeightFlag = 1<type, e->xmap.window); - CDriverGL *pDriver = (CDriverGL*)arg; - if (pDriver != NULL) - { - // Process the message by the emitter - pDriver->_EventEmitter.processMessage(); - } - // TODO i'don t know what to return exactly - return (e->type == MapNotify) && (e->xmap.window == (Window) arg); -} -*/ #endif // NL_OS_UNIX GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] = @@ -866,12 +852,15 @@ bool CDriverGL::swapBuffers() } #ifdef NL_OS_WINDOWS + SwapBuffers(_hDC); #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) + NL3D::MAC::swapBuffers(_win); #elif defined (NL_OS_UNIX) + glXSwapBuffers(_dpy, _win); #endif // NL_OS_WINDOWS @@ -1026,13 +1015,13 @@ void CDriverGL::setupViewport (const class CViewport& viewport) } // Setup gl viewport - int ix=(int)((float)clientWidth*x+0.5f); + sint ix=(sint)((float)clientWidth*x+0.5f); clamp (ix, 0, clientWidth); int iy=(int)((float)clientHeight*y+0.5f); clamp (iy, 0, clientHeight); - int iwidth=(int)((float)clientWidth*width+0.5f); + sint iwidth=(sint)((float)clientWidth*width+0.5f); clamp (iwidth, 0, clientWidth-ix); - int iheight=(int)((float)clientHeight*height+0.5f); + sint iheight=(sint)((float)clientHeight*height+0.5f); clamp (iheight, 0, clientHeight-iy); glViewport (ix, iy, iwidth, iheight); } @@ -1102,25 +1091,23 @@ void CDriverGL::setupScissor (const class CScissor& scissor) if(x==0 && x==0 && width>=1 && height>=1) { glDisable(GL_SCISSOR_TEST); - } else { // Setup gl scissor - int ix0=(int)floor((float)clientWidth * x + 0.5f); + sint ix0=(sint)floor((float)clientWidth * x + 0.5f); clamp (ix0, 0, clientWidth); int iy0=(int)floor((float)clientHeight* y + 0.5f); clamp (iy0, 0, clientHeight); - int ix1=(int)floor((float)clientWidth * (x+width) + 0.5f ); + sint ix1=(sint)floor((float)clientWidth * (x+width) + 0.5f ); clamp (ix1, 0, clientWidth); - int iy1=(int)floor((float)clientHeight* (y+height) + 0.5f ); + sint iy1=(sint)floor((float)clientHeight* (y+height) + 0.5f ); clamp (iy1, 0, clientHeight); - - int iwidth= ix1 - ix0; + sint iwidth= ix1 - ix0; clamp (iwidth, 0, clientWidth); - int iheight= iy1 - iy0; + sint iheight= iy1 - iy0; clamp (iheight, 0, clientHeight); glScissor (ix0, iy0, iwidth, iheight); @@ -1848,15 +1835,18 @@ uint loadARBFragmentProgramStringNative(const char *prog, bool forceNativeProgra nglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0); glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorPos); nglGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB, &isNative); - if (errorPos == -1) { - if (!isNative && forceNativePrograms) { + if (errorPos == -1) + { + if (!isNative && forceNativePrograms) + { nlwarning("Fragment program isn't supported natively; purging program"); nglDeleteProgramsARB(1, &progID); return 0; } return progID; } - else { + else + { nlwarning("init fragment program failed: errorPos: %d isNative: %d", errorPos, isNative); } return 0; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl.h b/code/nel/src/3d/driver/opengl/driver_opengl.h index 18397d61b..540a73aca 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl.h +++ b/code/nel/src/3d/driver/opengl/driver_opengl.h @@ -680,6 +680,7 @@ private: HPBUFFERARB _PBuffer; #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) + NLMISC::CCocoaEventEmitter _EventEmitter; #elif defined (NL_OS_UNIX) @@ -809,7 +810,7 @@ private: TexEnvSpecialPPLStage0, TexEnvSpecialPPLStage2, TexEnvSpecialCloudStage0, - TexEnvSpecialCloudStage1, + TexEnvSpecialCloudStage1 }; // NB: CRefPtr are not used for mem/spped optimisation. setupMaterial() and setupTexture() reset those states. diff --git a/code/ryzom/common/src/game_share/brick_types.h b/code/ryzom/common/src/game_share/brick_types.h index 4a83aecd3..517372995 100644 --- a/code/ryzom/common/src/game_share/brick_types.h +++ b/code/ryzom/common/src/game_share/brick_types.h @@ -43,7 +43,7 @@ namespace BRICK_TYPE TIMED_ACTION, BRICK_TYPE_COUNT, BONUS, - UNKNOWN, + UNKNOWN }; @@ -61,7 +61,7 @@ namespace BRICK_TYPE */ const std::string &toString(EBrickType type); -}; // BRICK_TYPE +} // BRICK_TYPE #endif // RY_BRICK_TYPES_H /* End of brick_types.h */ diff --git a/code/ryzom/common/src/game_share/msg_client_server.h b/code/ryzom/common/src/game_share/msg_client_server.h index 45eedfd4a..85172ec42 100644 --- a/code/ryzom/common/src/game_share/msg_client_server.h +++ b/code/ryzom/common/src/game_share/msg_client_server.h @@ -799,7 +799,7 @@ namespace NPC_ICON }; const NLMISC::TGameCycle DefaultClientNPCIconRefreshTimerDelayGC = 60*10; // 1 min -}; +} #endif // RY_MSG_CLIENT_SERVER_H diff --git a/code/ryzom/common/src/game_share/outpost.h b/code/ryzom/common/src/game_share/outpost.h index 137d5eec9..12744a309 100644 --- a/code/ryzom/common/src/game_share/outpost.h +++ b/code/ryzom/common/src/game_share/outpost.h @@ -50,14 +50,14 @@ namespace OUTPOSTENUMS PVE, // can only be attacked if the outpost is held by a tribe and if the attacking guild comes from the same continent as the outpost PVP, // can only be attacked if the attacking guild comes from the same continent as the outpost RVR, // can only be attacked if the attacking guild comes from another continent as the outpost - Full, // same as RVR but cant be set by the high council + Full // same as RVR but cant be set by the high council }; enum TPVPSide { OutpostOwner = 0, OutpostAttacker = 1, - UnknownPVPSide, + UnknownPVPSide }; // :NOTE: The outpost state machine is defined by a list of possible @@ -78,7 +78,7 @@ namespace OUTPOSTENUMS AttackAfter, DefenseBefore, // the attack was successful. The attacker must now defend the outpost DefenseRound, // ... - DefenseAfter, + DefenseAfter }; /// events that can affect outpost state @@ -107,7 +107,7 @@ namespace OUTPOSTENUMS UnknownSquadType, Default, // squad recruited automatically when the outpost is taken Recruited, // squad recruited by the guild - Mercenary, // a special mercenary squad + Mercenary // a special mercenary squad }; /// current state of a building used for database @@ -115,7 +115,7 @@ namespace OUTPOSTENUMS { UnknownOutpostBuildingState, BuildingInPlace, // In place (constructed) - BuildingConstructing, // Constructing + BuildingConstructing // Constructing }; /// current state of a state @@ -127,7 +127,7 @@ namespace OUTPOSTENUMS NotSpawned, // squad is ready and waiting to be spawned Spawning, // spawn order has been issued but not yet confirmed Spawned, // squad is spawned - Dead, // squad is dead + Dead // squad is dead }; /// events that can affect outpost state @@ -142,7 +142,7 @@ namespace OUTPOSTENUMS GuildOwnershipEnd, // Owner of the outpost is no more a guild StateChanged, // State of outpost changed OwnerChanged, // Owner of outpost changed - AttackerChanged, // Attacker of outpost changed + AttackerChanged // Attacker of outpost changed }; std::string const& toString(TPVPType val);