|
#include "stdafx.h"
#include "RasterImageTriangleTool.h"
#include <OAGPrimitives.h>
#include <OAGTriangleMapping.h>
CRasterImageTriangleTool::CRasterImageTriangleTool(void)
{
}
CRasterImageTriangleTool::~CRasterImageTriangleTool(void)
{
}
//Operations
//Virtual
void CRasterImageTriangleTool::AddAllVerticesToScene()
{
m_pWinGraphicContext->MakeCurrent();
//oag::OAGTexture* tex = (oag::OAGTexture*)oag::OAGTextureLoader::LoadTextureFromDisk( m_strFileName );
//if ( tex )
//{
// oag::OAGVector3f vec1 = m_arrVector[0];
// tex->SetPosition( oag::OAGVector3f( vec1.m_X, vec1.m_Y, vec1.m_Z ) );
// tex->SetPolygonMode(GL_FILL);
// tex->CreateTextureData();
// tex->SetDefaultFilter();
// tex->BuildTexture();
// m_pScene->AddObject( tex );
//}
//
oag::OAGTriangleMapping* tex = new oag::OAGTriangleMapping();
if( m_pScene->GetTextureMappingTable()->HasTexture() )
tex->SetTexture( m_pScene->GetTextureMappingTable()->GetTexture("Image1") );
if ( tex )
{
oag::OAGVector3f vec1 = m_arrVector[0];
tex->SetPosition( oag::OAGVector3f( vec1.m_X, vec1.m_Y, vec1.m_Z ) );
tex->SetPolygonMode(GL_FILL);
m_pScene->AddObject( tex );
}
//
m_pWinGraphicContext->DeleteCurrent();
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I live in Matão, a small city in Brazil. I studied as Programmer in a College for Software Development in Database.
After finishing the College I have been working with java, c# and Computer Graphics with searches for OpenGL.