
#include "stdafx.h"
#include "CSphereOB.h"

#include <gl\glut.h>			
//#include <gl\glaux.h>	


C_SPHERE_0::C_SPHERE_0(uint texture_id,CVector3 pos,float vel) 
:  _vel(vel)
{
	this->SetTextureId(texture_id);
	SetPos(pos);
}

void C_SPHERE_0::Render()
{
	glPushMatrix();
//	glLoadIdentity();
	//CVector3 pos = GetPosV();
	//glTranslatef(pos.x, pos.y, pos.z);
	
	glEnable( GL_TEXTURE_2D );
	glDisable(GL_LIGHTING);
	glColor3f(1.0, 0.0, 1.0);
	glBindTexture( GL_TEXTURE_2D, this->GetTextureId() );
	glDisable( GL_TEXTURE_2D );
//	glEnable( GL_TEXTURE_2D );
	glutSolidSphere(_vel, 50, 50);
//	glutSolidTeapot(1);
	glDisable( GL_TEXTURE_2D );
	glPopMatrix();
}