示例#1
0
bool TextClass::Render(ID3D11DeviceContext* context, D3DXMATRIX world, D3DXMATRIX ortho)
{
	bool result;

	result = RenderSentence(context, _sentence1, world, ortho);
	if (!result)
	{
		return false;
	}

	result = RenderSentence(context, _sentence2, world, ortho);
	if (!result)
	{
		return false;
	}

	result = RenderSentence(context, _fpsentence, world, ortho);
	if (!result)
	{
		return false;
	}

	result = RenderSentence(context, _cpusentence, world, ortho);
	if (!result)
	{
		return false;
	}

	return true;
}
示例#2
0
void TextClass::Render(ID3D10Device* device, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix)
{
	// Draw the first sentence.
	RenderSentence(device, m_sentence1, worldMatrix, orthoMatrix);

	// Draw the second sentence.
	RenderSentence(device, m_sentence2, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence3, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence4, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence5, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence6, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence7, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence8, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence9, worldMatrix, orthoMatrix);

	RenderSentence(device, m_sentence10, worldMatrix, orthoMatrix);

	return;
}
示例#3
0
	bool TextClass::Render(ID3D11DeviceContext * devCon)
	{
		//FPS Coun
		std::string wyjscie = "FPS: ";
		long long int freq;
		QueryPerformanceFrequency((LARGE_INTEGER*)&freq);
		float ticksPerMs = (float)(freq / 1000);
		long long int currTime;
		
		QueryPerformanceCounter((LARGE_INTEGER*)&currTime);
		float diffTime = (currTime - mLastTime)/ticksPerMs ;
		mLastTime = currTime;


		int fps = (diffTime!=0) ?  (int)(1000/diffTime) : -1;
		wyjscie+=toString(fps);
		UpdateText2(wyjscie.c_str(),devCon);
		////////////////////////////////

		bool result;

		result = RenderSentence(devCon, mSentence1);
		if(!result)
			return false;
		result = RenderSentence(devCon, mSentence2);
		return result;
	}
示例#4
0
bool Text::Render(ID3D11DeviceContext* deviceContext, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix)
{
	bool result;

	result = RenderSentence(deviceContext, sen01, worldMatrix, orthoMatrix);
	if (!result) return false;
	result = RenderSentence(deviceContext, sen02, worldMatrix, orthoMatrix);
	if (!result) return true;
}
示例#5
0
bool CTextClass::Render(ID3D11DeviceContext* deviceContext, XMMATRIX& worldMatrix, XMMATRIX& OrthoMatrix)
{
	bool result;

	result = RenderSentence(deviceContext, m_Sentence1, worldMatrix, OrthoMatrix);
	if (!result)
	{
		return false;
	}
	result = RenderSentence(deviceContext, m_Sentence2, worldMatrix, OrthoMatrix);
	if (!result)
	{
		return false;
	}
	return true;
}
示例#6
0
void TextClass::Render(ID3D11DeviceContext* deviceContext, ShaderManagerClass* ShaderManager, D3DXMATRIX worldMatrix, D3DXMATRIX viewMatrix, D3DXMATRIX orthoMatrix, ID3D11ShaderResourceView* fontTexture)
{
    // Draw the sentence.
    RenderSentence(deviceContext, ShaderManager, worldMatrix, viewMatrix, orthoMatrix, fontTexture);

    return;
}
示例#7
0
bool OldText::Render(ID3D11DeviceContext* deviceContext, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix)
{
	bool result;

	// Draw the first sentence.
	result = RenderSentence(deviceContext, _sentence, worldMatrix, orthoMatrix);
	if(!result)
		return false;

	return true;
}
示例#8
0
bool TextClass::Render(ID3D11DeviceContext* deviceContext, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix)
{
    bool result;


    // Draw the first sentence.
    result = RenderSentence(deviceContext, m_sentence1, worldMatrix, orthoMatrix);
    if(!result)
    {
        return false;
    }

    // Draw the second sentence.
    result = RenderSentence(deviceContext, m_sentence2, worldMatrix, orthoMatrix);
    if(!result)
    {
        return false;
    }

    return true;
}
示例#9
0
文件: text.cpp 项目: steve7987/Stick
bool Text::Render(ID3D11DeviceContext* deviceContext, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix){
	//render sentence array
	for (int i = 0; i < highestSentence; i++){
		if (m_sentenceArray[i] != 0 && m_sentenceArray[i]->visible){
			if (!RenderSentence(deviceContext, m_sentenceArray[i], worldMatrix, orthoMatrix)){
				return false;
			}
		}
	}
	
	//renders two test sentences
	/*
	if (!RenderSentence(deviceContext, m_sentence1, worldMatrix, orthoMatrix)){
		return false;
	}

	if (!RenderSentence(deviceContext, m_sentence2, worldMatrix, orthoMatrix)){
		return false;
	}
	*/
	return true;
}
示例#10
0
bool TextClass::Render(ID3D11DeviceContext* deviceContext, FontShaderClass* FontShader, D3DXMATRIX worldMatrix, D3DXMATRIX orthoMatrix)
{
	bool result;


	// Draw the sentences.
	result = RenderSentence(m_sentence1, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence2, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence3, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence4, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence5, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence6, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence7, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence8, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence9, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	result = RenderSentence(m_sentence10, deviceContext, FontShader, worldMatrix, orthoMatrix);
	if(!result)
	{
		return false;
	}

	return true;
}