void CoordinateSelect::Draw () { if (CoordinateSelectChange) { UpdateMouse(); } GFXLoadIdentity (MODEL); GFXPushBlendMode(); // VSFileSystem::Fprintf (stderr,"Location: %f %f %f", LocalPosition.i, LocalPosition.j, LocalPosition.k); GFXBlendMode(ONE,ONE); LocSelAni.SetPosition(LocalPosition); LocSelAni.Draw(); GFXPopBlendMode(); }
int TextPlane::Draw(const string & newText, int offset,bool startlower, bool force_highquality, bool automatte) { int retval=1; bool drawbg = (bgcol.a!=0); static unsigned int * display_lists=CreateLists (); // some stuff to draw the text stuff string::const_iterator text_it = newText.begin(); static bool use_bit = force_highquality||XMLSupport::parse_bool(vs_config->getVariable ("graphics","high_quality_font","false")); static float font_point = XMLSupport::parse_float (vs_config->getVariable ("graphics","font_point","16")); static bool font_antialias = XMLSupport::parse_bool (vs_config->getVariable ("graphics","font_antialias","true")); void * fnt = getFont(); static float std_wid=glutStrokeWidth (GLUT_STROKE_ROMAN,'W'); myFontMetrics.i=font_point*std_wid/(119.05+33.33); if (use_bit) myFontMetrics.i=glutBitmapWidth(fnt,'W'); myFontMetrics.j=font_point; myFontMetrics.i/=.5*g_game.x_resolution; myFontMetrics.j/=.5*g_game.y_resolution; float tmp,row, col; float origcol,origrow; GetPos (row,col); GetPos(row,origcol); float rowheight=use_bit?getFontHeight():myFontMetrics.j; myFontMetrics.j=rowheight; if (startlower) { row -= rowheight; } GFXPushBlendMode(); glLineWidth (1); if (!use_bit&&font_antialias) { GFXBlendMode (SRCALPHA,INVSRCALPHA); if(gl_options.smooth_lines) { glEnable(GL_LINE_SMOOTH); } }else { GFXBlendMode (SRCALPHA,INVSRCALPHA); if(gl_options.smooth_lines) { glDisable(GL_LINE_SMOOTH); } } GFXColorf(this->col); GFXDisable (DEPTHTEST); GFXDisable (CULLFACE); GFXDisable (LIGHTING); GFXDisable (TEXTURE0); GFXDisable (TEXTURE1); glPushMatrix(); glLoadIdentity(); if (!automatte&&drawbg) { GFXColorf(this->bgcol); DrawSquare(col,this->myDims.i,row-rowheight*.25,row+rowheight); } GFXColorf(this->col); int entercount=0; for (;entercount<offset&&text_it!=newText.end();text_it++) { if (*text_it=='\n') entercount++; } glTranslatef(col,row,0); // glRasterPos2f (g_game.x_resolution*(1-(col+1)/2),g_game.y_resolution*(row+1)/2); glRasterPos2f (0,0); float scalex=1; float scaley=1; int potentialincrease=0; if (!use_bit) { int numplayers=1; if (_Universe) // _Universe can be NULL during bootstrap. numplayers = (_Universe->numPlayers()>3?_Universe->numPlayers()/2: _Universe->numPlayers()); scalex=numplayers*myFontMetrics.i/std_wid; scaley=myFontMetrics.j/(119.05+33.33); } glScalef (scalex,scaley,1); bool firstThroughLoop=true; GFXColor currentCol (this->col); while(text_it != newText.end() && (firstThroughLoop||row>myDims.j-rowheight*.25)) { unsigned char myc = *text_it; if (myc=='_') { myc = ' '; } float shadowlen = 0; if(myc=='\t') { shadowlen=glutBitmapWidth(fnt,' ')*5./(.5*g_game.x_resolution); } else { if (use_bit) { shadowlen = glutBitmapWidth (fnt,myc)/(float)(.5*g_game.x_resolution); // need to use myc -- could have transformed '_' to ' ' } else { shadowlen = myFontMetrics.i*glutStrokeWidth(GLUT_STROKE_ROMAN,myc)/std_wid; } } if (*text_it=='#') { if (newText.end()-text_it>6) { float r,g,b; r = TwoCharToFloat (*(text_it+1),*(text_it+2)); g = TwoCharToFloat (*(text_it+3),*(text_it+4)); b = TwoCharToFloat (*(text_it+5),*(text_it+6)); if (r==0&&g==0&&b==0) { currentCol = this->col; }else { currentCol = GFXColor(r, g, b, this->col.a); } GFXColorf(currentCol); static bool setRasterPos= XMLSupport::parse_bool(vs_config->getVariable("graphics","set_raster_text_color","true")); if (use_bit&&setRasterPos) glRasterPos2f(col-origcol,0); text_it = text_it+6; } else { break; } text_it++; continue; }else if(*text_it>=32) {//always true if(automatte){ GFXColorf(this->bgcol); DrawSquare(col-origcol,col-origcol+shadowlen/scalex,-rowheight*.25/scaley,rowheight*.75/scaley); GFXColorf(currentCol); } //glutStrokeCharacter (GLUT_STROKE_ROMAN,*text_it); retval+=potentialincrease; potentialincrease=0; int lists = display_lists[myc+(isInside()?128:0)]; if (lists) { GFXCallList(lists); }else{ if (use_bit){ glutBitmapCharacter (fnt,myc); } else{ glutStrokeCharacter (GLUT_STROKE_ROMAN,myc); } } } if(*text_it=='\t') { if(automatte){ GFXColorf(this->bgcol); DrawSquare(col-origcol,col-origcol+shadowlen*5/(.5*g_game.x_resolution),-rowheight*.25/scaley,rowheight*.75/scaley); GFXColorf(currentCol); } col+=shadowlen; glutBitmapCharacter (fnt,' '); glutBitmapCharacter (fnt,' '); glutBitmapCharacter (fnt,' '); glutBitmapCharacter (fnt,' '); glutBitmapCharacter (fnt,' '); } else { col+=shadowlen; } if(doNewLine(text_it,newText.end(),col,myDims.i, myFontMetrics.i,row-rowheight<=myDims.j)){ GetPos (tmp,col); firstThroughLoop=false; row -= rowheight; glPopMatrix(); glPushMatrix (); glLoadIdentity(); if (!automatte&&drawbg) { GFXColorf(this->bgcol); DrawSquare(col,this->myDims.i,row-rowheight*.25,row+rowheight*.75); } if (*text_it=='\n') { currentCol = this->col; } GFXColorf(currentCol); glTranslatef (col,row,0); glScalef(scalex,scaley,1); glRasterPos2f(0,0); potentialincrease++; } text_it++; } if(gl_options.smooth_lines) { glDisable(GL_LINE_SMOOTH); } glPopMatrix(); GFXPopBlendMode(); GFXColorf(this->col); return retval; }
// Draw specified lines of text. void PaintText::drawLines(int start, int count) const { // Make sure we hav a display list. calcLayoutIfNeeded(); // Make sure we have something to do. if(m_lines.empty()) { return; } // Initialize the graphics state. GFXToggleTexture(false,0); if(gl_options.smooth_lines) { glEnable(GL_LINE_SMOOTH); } GFXPushBlendMode(); GFXBlendMode(SRCALPHA,INVSRCALPHA); glPushMatrix(); // Keep track of line position. float lineTop = m_rect.top(); // Figure ending line index. const int end = guiMin(start + count, m_lines.size()); // Loop through the display list lines. for(int i=start; i<end; i++) { const TextLine& line = m_lines[i]; // Make sure we can paint this line in the vertical space we have left. if(lineTop - line.height*LINE_HEIGHT_EPSILON < m_rect.origin.y) { // Not enough space to draw this line. break; } // Position at the start of the line. glLoadIdentity(); glTranslatef(m_rect.origin.x+line.x, lineTop-line.baseLine, 0.0); if (line.fragments.size()) { GFXColorf(line.fragments[0].color); } if (!useStroke()){ glRasterPos2f(0,0); }else glScaled(m_horizontalScaling, m_verticalScaling, 1.0); float rasterpos=0; // Draw each fragment. for(vector<TextFragment>::const_iterator frag=line.fragments.begin(); frag!=line.fragments.end(); frag++) { if(frag->start == ELLIPSIS_FRAGMENT) { // We have a special-case for the ellipsis at the end of a line. drawChars(ELLIPSIS_STRING, 0, 2, frag->font, frag->color,rasterpos); } else { rasterpos=drawChars(m_text, frag->start, frag->end, frag->font, frag->color,rasterpos); } } // Top of next line. lineTop -= line.height; } glRasterPos2f(0,0); // Undo graphics state GFXPopBlendMode(); if(gl_options.smooth_lines) { glDisable(GL_LINE_SMOOTH); } glPopMatrix(); GFXToggleTexture(true,0); }
void GFXVertexList::Draw( enum POLYTYPE *mode, const INDEX index, const int numlists, const int *offsets ) { //Hardware support for this seems... sketchy if (vbo_data == 0 && display_list != 0) { //Big issue: display lists cannot discriminate between lines/points/triangles, //so, for now, we'll limit smoothing to single-mode GFXVertexLists, which, by the way, //are the only ones being used, AFAIK. bool blendchange = false; if ( unique_mode && (numlists > 0) ) { switch (*mode) { case GFXLINE: case GFXLINESTRIP: case GFXPOLY: case GFXPOINT: if ( ( (*mode == GFXPOINT) && gl_options.smooth_points ) || ( (*mode != GFXPOINT) && gl_options.smooth_lines ) ) { BLENDFUNC src, dst; GFXGetBlendMode( src, dst ); if ( (dst != ZERO) && ( (src == ONE) || (src == SRCALPHA) ) ) { GFXPushBlendMode(); GFXBlendMode( SRCALPHA, dst ); GFXEnable( SMOOTH ); blendchange = true; } } break; default: break; } } GFXCallList( display_list ); if (blendchange) { GFXPopBlendMode(); GFXDisable( SMOOTH ); } ++gl_batches_this_frame; } else { int totoffset = 0; if (changed&HAS_INDEX) { long stride = changed&HAS_INDEX; GLenum indextype = (changed&INDEX_BYTE) ? GL_UNSIGNED_BYTE : ( (changed&INDEX_SHORT) ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT ); bool use_vbo = vbo_data != 0; use_vbo = use_vbo && memcmp( &index, &this->index, sizeof (INDEX) ) == 0; if (use_vbo) { #ifndef NO_VBO_SUPPORT GFXBindElementBuffer( display_list ); #else use_vbo = false; #endif } else { #ifndef NO_VBO_SUPPORT if (vbo_data) GFXBindElementBuffer( 0 ); #endif } if (glMultiDrawElements_p != NULL && numlists > 1) { static std::vector< bool > drawn; static std::vector< const GLvoid* >glindices; static std::vector< GLsizei >glcounts; drawn.clear(); drawn.resize( numlists, false ); for (int i = 0; i < numlists; totoffset += offsets[i++]) if (!drawn[i]) { glindices.clear(); glcounts.clear(); int totcount = 0; for (long j = i, offs = totoffset; j < numlists; offs += offsets[j++]) { totcount += offsets[j]; if ( !drawn[j] && (mode[j] == mode[i]) ) { glindices.push_back( use_vbo ? (GLvoid*) (stride*offs) : (GLvoid*) &index.b[stride*offs] ); glcounts.push_back( offsets[j] ); drawn[j] = true; } } if (glindices.size() == 1) glDrawElements( PolyLookup( mode[i] ), glcounts[0], indextype, glindices[0] ); else glMultiDrawElements_p( PolyLookup( mode[i] ), &glcounts[0], indextype, &glindices[0], glindices.size() ); ++gl_batches_this_frame; gl_vertices_this_frame += totcount; } } else { for (int i = 0; i < numlists; i++) { glDrawElements( PolyLookup( mode[i] ), offsets[i], indextype, use_vbo ? (GLvoid*) (stride*totoffset) : (GLvoid*)&index.b[stride*totoffset] ); //changed&INDEX_BYTE == stride! totoffset += offsets[i]; ++gl_batches_this_frame; gl_vertices_this_frame += offsets[i]; } } } else { if (glMultiDrawArrays_p) { static std::vector< bool > drawn; static std::vector< GLint > gloffsets; static std::vector< GLsizei >glcounts; drawn.clear(); drawn.resize( numlists, false ); for (int i = 0; i < numlists; totoffset += offsets[i++]) if (!drawn[i]) { gloffsets.clear(); glcounts.clear(); int totcount = 0; for (int j = i, offs = totoffset; j < numlists; offs += offsets[j++]) { totcount += offsets[j]; if ( !drawn[j] && (mode[j] == mode[i]) ) { gloffsets.push_back( offs ); glcounts.push_back( offsets[j] ); drawn[j] = true; } } bool blendchange = false; switch (mode[i]) { case GFXLINE: case GFXLINESTRIP: case GFXPOLY: case GFXPOINT: if ( ( (mode[i] == GFXPOINT) && gl_options.smooth_points ) || ( (mode[i] != GFXPOINT) && gl_options.smooth_lines ) ) { BLENDFUNC src, dst; GFXGetBlendMode( src, dst ); if ( (dst != ZERO) && ( (src == ONE) || (src == SRCALPHA) ) ) { GFXPushBlendMode(); GFXBlendMode( SRCALPHA, dst ); GFXEnable( SMOOTH ); blendchange = true; } } break; default: break; } if (gloffsets.size() == 1) glDrawArrays( PolyLookup( mode[i] ), gloffsets[0], glcounts[0] ); else glMultiDrawArrays_p( PolyLookup( mode[i] ), &gloffsets[0], &glcounts[0], gloffsets.size() ); if (blendchange) { GFXPopBlendMode(); GFXDisable( SMOOTH ); } ++gl_batches_this_frame; gl_vertices_this_frame += totcount; } } else { for (int i = 0; i < numlists; i++) { bool blendchange = false; switch (mode[i]) { case GFXLINE: case GFXLINESTRIP: case GFXPOLY: case GFXPOINT: if ( ( (mode[i] == GFXPOINT) && gl_options.smooth_points ) || ( (mode[i] != GFXPOINT) && gl_options.smooth_lines ) ) { BLENDFUNC src, dst; GFXGetBlendMode( src, dst ); if ( (dst != ZERO) && ( (src == ONE) || (src == SRCALPHA) ) ) { GFXPushBlendMode(); GFXBlendMode( SRCALPHA, dst ); GFXEnable( SMOOTH ); blendchange = true; } } break; default: break; } glDrawArrays( PolyLookup( mode[i] ), totoffset, offsets[i] ); totoffset += offsets[i]; if (blendchange) { GFXPopBlendMode(); GFXDisable( SMOOTH ); } ++gl_batches_this_frame; gl_vertices_this_frame += offsets[i]; } } } } }
void LocationSelect:: Draw () { Matrix transformation; local_transformation.to_matrix(transformation); GFXLoadIdentity(MODEL); GFXMultMatrixModel (transformation); /* GFXEnable(DEPTHWRITE); GFXEnable(DEPTHTEST); GFXDisable(TEXTURE0); GFXDisable(TEXTURE1); GFXDisable(LIGHTING); GFXPushBlendMode(); // GFXBlendMode(SRCALPHA,INVSRCALPHA); //GFXColor4f (parentScene->HUDColor.r, parentScene->HUDColor.g, parentScene->HUDColor.b, parentScene->HUDColor.a); GFXColor4f (0,.5,0,.3); */ #ifdef DELTA_MOVEMENT if (vert) { LocalPosition.k=0; } vert=false; if (DeltaPosition.k) { LocalPosition.k-=DeltaPosition.k*.3; DeltaPosition.k=0; } #endif if (changed||vert) { Matrix t,m; Matrix v; GFXGetMatrixView (v); GFXGetMatrixModel (m); MultMatrix(t,v,m); //following translates 'z'...not sure it's necessary // Translate (v,0,0,LocalPosition.k); // MultMatrix (m,t,v); //the location in camera coordinates of the beginning of the location select Vector tLocation (t.p.Cast()); Vector tP (t.getP());//the p vector of the plane being selected on Vector tQ (t.getQ());//the q vector of the plane being selected on ///unused Vector tR (t[8],t[9],t[10]);//the q vector of the plane being selected on //VSFileSystem::Fprintf (stderr,"<%f,%f,%f>",t[0],t[1],t[2]); //VSFileSystem::Fprintf (stderr,"<%f,%f,%f>",t[4],t[5],t[6]); //VSFileSystem::Fprintf (stderr,"<%f,%f,%f>",t[8],t[9],t[10]); #ifdef DELTA_MOVEMENT float zvalueXY = tLocation.k+LocalPosition.i*tP.k+LocalPosition.j*tQ.k; // z val of the parallelogram #else float zvalueXY = tLocation.k+LocalPosition.i*tP.k+LocalPosition.j*tQ.k+LocalPosition.k*tR.k; //zvalue of the cursor #endif if (changed&&!vert) { //planar movement if (zvalueXY >1000) /// zfar zvalueXY = 1000; if (zvalueXY<-1000) zvalueXY = -1000; LocalPosition.i= fabs(zvalueXY)*(((2*DeltaPosition.i/g_game.x_resolution - 1)*g_game.MouseSensitivityX*GFXGetXInvPerspective()*tP.i)-(1-(2*DeltaPosition.j/g_game.y_resolution)*g_game.MouseSensitivityY*GFXGetYInvPerspective()*tP.j)); LocalPosition.j= fabs(zvalueXY)*(((2*DeltaPosition.i/g_game.x_resolution - 1)*g_game.MouseSensitivityX*GFXGetXInvPerspective()*tQ.i)-(1-(2*DeltaPosition.j/g_game.y_resolution)*tQ.j*g_game.MouseSensitivityY*GFXGetYInvPerspective())); DeltaPosition= Vector(0,0,0); // Vector TransPQR (t[0]*i+t[4]*LocalPosition.j+t[8]*LocalPosition.k+t[12],t[1]*LocalPosition.i+t[5]*LocalPosition.j+t[9]*LocalPosition.k+t[13],t[2]*LocalPosition.i+t[6]*LocalPosition.j+t[10]*LocalPosition.k+t[14]); changed=false; } #ifndef DELTA_MOVEMENT else { //vertical movement if (zvalueXY >1000) /// zfar zvalueXY = 1000; if (zvalueXY<-1000) zvalueXY = -1000; LocalPosition.k= fabs(zvalueXY)*(((2*DeltaPosition.i/g_game.x_resolution - 1)*g_game.MouseSensitivityX*GFXGetXInvPerspective()*tR.i)-((2*DeltaPosition.j/g_game.y_resolution -1)*g_game.MouseSensitivityY*GFXGetYInvPerspective()*tR.j)); if (DeltaPosition.k) { LocalPosition.k=0; DeltaPosition.k=0; } vert =false; changed=false; } #endif } //draw the animation LocSelUpAni.SetPosition (QVector (LocalPosition.i,LocalPosition.j,0)); LocSelUpAni.Draw(); LocSelAni.SetPosition(LocalPosition); LocSelAni.Draw(); /* GFXBegin(TRIANGLES); if (fabs(LocalPosition.k-CrosshairSize)>CrosshairSize) { int tmp; if (LocalPosition.k>=0) tmp =1; else tmp =-1; GFXVertex3f (LocalPosition.i,LocalPosition.j,LocalPosition.k-tmp*CrosshairSize); GFXVertex3f (LocalPosition.i,LocalPosition.j+CrosshairSize*.125,0); GFXVertex3f (LocalPosition.i,LocalPosition.j-CrosshairSize*.125,0); GFXVertex3f (LocalPosition.i,LocalPosition.j-CrosshairSize*.125,0); GFXVertex3f (LocalPosition.i,LocalPosition.j+CrosshairSize*.125,0); GFXVertex3f (LocalPosition.i,LocalPosition.j,LocalPosition.k-tmp*CrosshairSize); GFXVertex3f (LocalPosition.i,LocalPosition.j,LocalPosition.k-tmp*CrosshairSize); GFXVertex3f (LocalPosition.i+.125*CrosshairSize,LocalPosition.j,0); GFXVertex3f (LocalPosition.i-CrosshairSize*.125,LocalPosition.j,0); GFXVertex3f (LocalPosition.i-CrosshairSize*.125,LocalPosition.j,0); GFXVertex3f (LocalPosition.i+CrosshairSize*.125,LocalPosition.j,0); GFXVertex3f (LocalPosition.i,LocalPosition.j,LocalPosition.k-tmp*CrosshairSize); } if (fabs(LocalPosition.i)+fabs(LocalPosition.j)>CrosshairSize) { GFXVertex3f (0,0,0); GFXVertex3f (LocalPosition.i,LocalPosition.j,CrosshairSize*.125); GFXVertex3f (LocalPosition.i,LocalPosition.j,CrosshairSize*-.125); GFXVertex3f (LocalPosition.i,LocalPosition.j,CrosshairSize*-.125); GFXVertex3f (LocalPosition.i,LocalPosition.j,CrosshairSize*.125); GFXVertex3f (0,0,0); } POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (1,.1,.1); POSITION_GFXVertex (1,.1,-.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (1,-.1,-.1); POSITION_GFXVertex (1,-.1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (1,-.1,.1); POSITION_GFXVertex (1,.1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (1,.1,-.1); POSITION_GFXVertex (1,-.1,-.1);//one of the arrows to point POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-1,.1,-.1); POSITION_GFXVertex (-1,.1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-1,-.1,.1); POSITION_GFXVertex (-1,-.1,-.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-1,.1,.1); POSITION_GFXVertex (-1,-.1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-1,-.1,-.1); POSITION_GFXVertex (-1,.1,-.1);//one of the arrows to point //vertical POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,.1,1); POSITION_GFXVertex (.1,-.1,1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,-.1,1); POSITION_GFXVertex (-.1,.1,1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,.1,1); POSITION_GFXVertex (.1,.1,1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,-.1,1); POSITION_GFXVertex(-.1,-.1,1);//one of the arrows to point POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,-.1,-1); POSITION_GFXVertex (.1,.1,-1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,.1,-1); POSITION_GFXVertex (-.1,-.1,-1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,.1,-1); POSITION_GFXVertex (-.1,.1,-1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,-.1,-1); POSITION_GFXVertex (.1,-.1,-1);//one of the arrows to point POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,-1,.1); POSITION_GFXVertex (.1,-1,-.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,-1,-.1); POSITION_GFXVertex (-.1,-1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,-1,.1); POSITION_GFXVertex (.1,-1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,-1,-.1); POSITION_GFXVertex (-.1,-1,-.1);//one of the arrows to point POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,1,-.1); POSITION_GFXVertex (.1,1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,1,.1); POSITION_GFXVertex (-.1,1,-.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (.1,1,.1); POSITION_GFXVertex (-.1,1,.1); POSITION_GFXVertex (0,0,0); POSITION_GFXVertex (-.1,1,-.1); POSITION_GFXVertex (.1,1,-.1);//one of the arrows to point GFXEnd(); GFXBegin (QUADS); //GFXColor4f (parentScene->HUDColor.r, parentScene->HUDColor.g, parentScene->HUDColor.b, 1.5*parentScene->HUDColor.a); GFXVertex3f(.5*CrosshairSize +LocalPosition.i,LocalPosition.j,0); GFXVertex3f(LocalPosition.i,.5*CrosshairSize+LocalPosition.j,0); GFXVertex3f(-.5*CrosshairSize +LocalPosition.i,LocalPosition.j,0); GFXVertex3f(LocalPosition.i,-.5*CrosshairSize+LocalPosition.j,0); GFXVertex3f(LocalPosition.i,-.5*CrosshairSize+LocalPosition.j,0); GFXVertex3f(-.5*CrosshairSize +LocalPosition.i,LocalPosition.j,0); GFXVertex3f(LocalPosition.i,.5*CrosshairSize+LocalPosition.j,0); GFXVertex3f(.5*CrosshairSize +LocalPosition.i,LocalPosition.j,0); GFXColor4f (0,.5,0,.5); POSITION_GFXVertex (1,.1,.1); //cap POSITION_GFXVertex (1,-.1,.1); POSITION_GFXVertex (1,-.1,-.1); POSITION_GFXVertex (1,.1,-.1); POSITION_GFXVertex (-1,.1,-.1); POSITION_GFXVertex (-1,-.1,-.1); POSITION_GFXVertex (-1,-.1,.1); POSITION_GFXVertex (-1,.1,.1); //cap POSITION_GFXVertex (.1,-1,.1); //cap POSITION_GFXVertex (-.1,-1,.1); POSITION_GFXVertex (-.1,-1,-.1); POSITION_GFXVertex (.1,-1,-.1); POSITION_GFXVertex (.1,1,-.1); POSITION_GFXVertex (-.1,1,-.1); POSITION_GFXVertex (-.1,1,.1); POSITION_GFXVertex (.1,1,.1); //cap POSITION_GFXVertex (.1,.1,1); //cap POSITION_GFXVertex (-.1,.1,1); POSITION_GFXVertex (-.1,-.1,1); POSITION_GFXVertex (.1,-.1,1); POSITION_GFXVertex (.1,-.1,-1); POSITION_GFXVertex (-.1,-.1,-1); POSITION_GFXVertex (-.1,.1,-1); POSITION_GFXVertex (.1,.1,-1); //cap GFXEnd(); */ GFXPopBlendMode(); }