void RobotAgent::registerAgent() { if (gAgentRegistration && !this->_registered) { if (gUseOrganisms && _connectToOthers == POSITIVE) { register_surface(_x, _y, gAgentPositiveMaskImage, gEnvironmentImage, _wm->_agentId + 1000); // [!n] CONVENTION: _agentId+100 to avoid confusion with empty space (0: empty ; 1: static object; 2-99: reserved for other static objects) } else if (gUseOrganisms && _connectToOthers == NEGATIVE) { register_surface(_x, _y, gAgentNegativeMaskImage, gEnvironmentImage, _wm->_agentId + 1000); // [!n] CONVENTION: _agentId+100 to avoid confusion with empty space (0: empty ; 1: static object; 2-99: reserved for other static objects) } else { register_surface(_x, _y, gAgentMaskImage, gEnvironmentImage, _wm->_agentId + 1000); // [!n] CONVENTION: _agentId+100 to avoid confusion with empty space (0: empty ; 1: static object; 2-99: reserved for other static objects) } this->_registered = true; } }
GLintptr GLAPIENTRY _mesa_VDPAURegisterOutputSurfaceNV(const GLvoid *vdpSurface, GLenum target, GLsizei numTextureNames, const GLuint *textureNames) { GET_CURRENT_CONTEXT(ctx); if (numTextureNames != 1) { _mesa_error(ctx, GL_INVALID_VALUE, "VDPAURegisterVideoSurfaceNV"); return (GLintptr)NULL; } return register_surface(ctx, true, vdpSurface, target, numTextureNames, textureNames); }