void OPENGL_3D_ENGNIE::DrawFrontBuffer()
{
    int roadIdx,signIdx,charIdx,lineIdx;
    int frontBufIdx = backBufIdx^1;
	int charFrontBufIdx = charBackBufIdx^1;
    //draw all the road
    glPushMatrix();
    for(roadIdx = 0; roadIdx < RoadBuffer[frontBufIdx].number; roadIdx++)
    {
        DrawRoad(RoadBuffer[frontBufIdx].buffer[roadIdx]);
    }
    glPopMatrix();
   
    //draw all the sign
    for(signIdx = 0; signIdx < signBuffer[frontBufIdx].number; signIdx++)
    {
        DrawSign(signBuffer[frontBufIdx].buffer[signIdx]);
    }

	for(lineIdx = 0; lineIdx < lineBuffer[frontBufIdx].number; lineIdx++)
	{
		DrawLine(&lineBuffer[frontBufIdx].line[lineIdx]);
	}

	//draw all the charater 
	for(charIdx = 0; charIdx < charBuffer[charFrontBufIdx].number; charIdx++)
	{
		DrawChar(charBuffer[charFrontBufIdx].buffer[charIdx]);
	}
    
}
示例#2
0
FX_BOOL CFWL_CheckBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
  if (!pParams)
    return FALSE;
  switch (pParams->m_iPart) {
    case FWL_PART_CKB_Border: {
      DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
      break;
    }
    case FWL_PART_CKB_Edge: {
      DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(),
               &pParams->m_rtPart, &pParams->m_matrix);
      break;
    }
    case FWL_PART_CKB_Background: {
      FillBackground(pParams->m_pGraphics, &pParams->m_rtPart,
                     &pParams->m_matrix);
      if (pParams->m_dwStates & FWL_PARTSTATE_CKB_Focused) {
        pParams->m_rtPart = *(CFX_RectF*)pParams->m_pData;
        DrawFocus(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
      }
      break;
    }
    case FWL_PART_CKB_CheckBox: {
      DrawBoxBk(pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
                pParams->m_dwStates, &pParams->m_matrix);
      if (((pParams->m_dwStates & FWL_PARTSTATE_CKB_Mask2) ==
           FWL_PARTSTATE_CKB_Checked) |
          ((pParams->m_dwStates & FWL_PARTSTATE_CKB_Mask2) ==
           FWL_PARTSTATE_CKB_Neutral)) {
        DrawSign(pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
                 pParams->m_dwStates, &pParams->m_matrix);
      }
      FX_BOOL bDisable = (pParams->m_dwStates & FWL_PARTSTATE_CKB_Mask1) ==
                         FWL_PARTSTATE_CKB_Disabled;
      DrawSignBorder(pParams->m_pWidget, pParams->m_pGraphics,
                     &pParams->m_rtPart, bDisable, &pParams->m_matrix);
      break;
    }
    default: { return FALSE; }
  }
  return TRUE;
}
示例#3
0
FX_BOOL CFWL_CheckBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
  if (!pParams)
    return FALSE;
  switch (pParams->m_iPart) {
    case CFWL_Part::Border: {
      DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
      break;
    }
    case CFWL_Part::Edge: {
      DrawEdge(pParams->m_pGraphics, pParams->m_pWidget->GetStyles(),
               &pParams->m_rtPart, &pParams->m_matrix);
      break;
    }
    case CFWL_Part::Background: {
      FillBackground(pParams->m_pGraphics, &pParams->m_rtPart,
                     &pParams->m_matrix);
      if (pParams->m_dwStates & CFWL_PartState_Focused) {
        pParams->m_rtPart = *(CFX_RectF*)pParams->m_pData;
        DrawFocus(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
      }
      break;
    }
    case CFWL_Part::CheckBox: {
      DrawBoxBk(pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
                pParams->m_dwStates, &pParams->m_matrix);
      if ((pParams->m_dwStates & CFWL_PartState_Checked) |
          (pParams->m_dwStates & CFWL_PartState_Neutral)) {
        DrawSign(pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
                 pParams->m_dwStates, &pParams->m_matrix);
      }
      DrawSignBorder(
          pParams->m_pWidget, pParams->m_pGraphics, &pParams->m_rtPart,
          pParams->m_dwStates & CFWL_PartState_Disabled, &pParams->m_matrix);
      break;
    }
    default: { return FALSE; }
  }
  return TRUE;
}