void TileSprite::onEnter() { Node::onEnter(); drawBackGround(); addLable(); }
/*! */ void FieldPainter::draw( QPainter & painter ) { if ( Options::instance().minimumMode() ) { painter.fillRect( painter.window(), Qt::black ); return; } if ( Options::instance().antiAliasing() ) { painter.setRenderHint( QPainter::Antialiasing, false ); } drawBackGround( painter ); drawLines( painter ); drawPenaltyAreaLines( painter ); drawGoalAreaLines( painter ); drawGoals( painter ); if ( Options::instance().showFlag() ) { drawFlags( painter ); } if ( Options::instance().gridStep() > 0.0 ) { drawGrid( painter ); } if ( Options::instance().antiAliasing() ) { painter.setRenderHint( QPainter::Antialiasing ); } }
void Render::drawDebugPrimitives(float avgFPS) { clearScreen(); drawBackGround(); drawPhysicWorld(); drawDebugText(avgFPS); step(); }
void Render::draw(void) { clearScreen(); drawBackGround(); drawCharacters(); drawFurnitures(); step(); }
void Render::drawDebug(float avgFPS) { clearScreen(); drawBackGround(); drawCharacters(); drawFurnitures(); drawPhysicWorld(); drawDebugText(avgFPS); step(); }
string loadGraphFile(Graph &graph, Map<coordT> &m) { ifstream in; promptUserForFile(in); InitGraphics(); string image = drawBackGround(in); string token; in >> token; if (token == "NODES") readNodes(in, graph, m); else Error("File format error."); readArcs(in, graph); in.close(); return image; }
void GameMain::draw() { drawBackGround();//背景(昼)描画 drawMarioLove();//水道描画 drawGround();//背景(地面)描画 drawPlayer();//プレイヤー描画 drawUI();//UI描画 //DrawFormatString(0, 0, RGB(0, 0, 0), "playtime : %d", m_playtime); //DrawFormatString(0, 0, RGB(0, 0, 0), "P : %d", m_playerPoint); }
ScreenCapture::ScreenCapture(QWidget *parent) : QDialog(parent) { setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint ); setWindowState(Qt::WindowFullScreen); setCursor(Qt::CrossCursor); sizeDesktop = QApplication::desktop()->size(); resize(sizeDesktop); desktopPixmapBkg = QPixmap::grabWindow(QApplication::desktop()->winId()); desktopPixmapClr = desktopPixmapBkg; move(0, 0); drawBackGround(); }
//---------------------------------------------------------------------------- void GameRadar::update(Flt delta) { if ( !mMapLoaded ) return; Bool updateDirty = ( mTimeElapse > mUpdateInterval ) ? true: false; if ( !updateDirty ) mTimeElapse += delta; else mTimeElapse = 0.0f; if ( updateDirty ) { drawBackGround(); drawAllUnit(); } }
//---------------------------------------------------------------------------- Bool GameRadar::loadMap(Str name, Str path, Vec2 visibleWorldSize, Vec2 worldCenter) { if ( mWorldMapName == name && mWorldMapGroup == path ) { return true; } mWorldMapName = name; mWorldMapGroup = path; mVisibleWorldSize = visibleWorldSize; mVisibleWorldCenter = worldCenter; mMapLoaded = false; IEngineUtil* engUtil = ClientMain::getInstance().getEngine()->engineUtil(); if ( engUtil ) { if ( engUtil->load2DTexture( mWorldMapName, mWorldMapGroup, mWorldMapGroup ) ) { if ( engUtil->isTextureExist( mapName, mapGroup ) ) { engUtil->unload2DTexture( mapName, mapGroup ); } mMiniMapSize = engUtil->getTextureSize( mWorldMapName, mWorldMapGroup ); if ( engUtil->create2DTexture( mapName, mapGroup, mMiniMapSize.x, mMiniMapSize.y ) ) { mMapLoaded = true; } } } if ( mMapLoaded ) { if ( mListener ) mListener->onMiniMapLoaded(this); //先画一下背景,将UI填满 drawBackGround(); } return mMapLoaded; }
RegionSelect::RegionSelect(Config *mainconf, QWidget *parent) :QDialog(parent) { conf = mainconf; setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint ); setWindowState(Qt::WindowFullScreen); setCursor(Qt::CrossCursor); sizeDesktop = QApplication::desktop()->size(); resize(sizeDesktop); desktopPixmapBkg = QPixmap::grabWindow(QApplication::desktop()->winId()); desktopPixmapClr = desktopPixmapBkg; move(0, 0); drawBackGround(); mainconf = NULL; delete mainconf; }
void light::paintGL() { glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); stereo cam( 2000.0f,5005.0f,1.3333f, 45.0f,-10*R,200.0f); // Far Clipping Distance cam.ApplyLeftFrustum(); glColorMask(true, false, false, false); glLoadIdentity(); glBindTexture(GL_TEXTURE_2D, textureID[0]); drawBackGround(); glPopMatrix(); GLfloat tempMatrix[16]; glGetFloatv(GL_MODELVIEW_MATRIX,tempMatrix); glLoadIdentity(); GLfloat angle=(sqrt(m_dy*m_dy+m_dx*m_dx)*180.0)/(pi*R); glRotatef(angle,m_dy,-m_dx,0.0f); glMultMatrixf(tempMatrix); glGetFloatv(GL_MODELVIEW_MATRIX,tempMatrix); glPushMatrix(); glLoadIdentity(); m_x+=m_dx; m_y+=m_dy; glTranslatef(m_x,m_y,0.0f); glMultMatrixf(tempMatrix); glBindTexture(GL_TEXTURE_2D, textureID[1]); gluQuadricTexture(m_qObj,1); gluSphere(m_qObj,R,100,100); glClear(GL_DEPTH_BUFFER_BIT) ; cam.ApplyRightFrustum(); glColorMask(false, true, true, false); glLoadIdentity(); glBindTexture(GL_TEXTURE_2D, textureID[0]); drawBackGround(); glPopMatrix(); glGetFloatv(GL_MODELVIEW_MATRIX,tempMatrix); glLoadIdentity(); glRotatef(angle,m_dy,-m_dx,0.0f); glMultMatrixf(tempMatrix); glGetFloatv(GL_MODELVIEW_MATRIX,tempMatrix); glPushMatrix(); glLoadIdentity(); glTranslatef(m_x,m_y,0.0f); glMultMatrixf(tempMatrix); glBindTexture(GL_TEXTURE_2D, textureID[1]); gluQuadricTexture(m_qObj,1); gluSphere(m_qObj,R,100,100); //drawAxis(); glColorMask(true, true, true, true); // drawAxis(); glFlush(); }