Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void __fastcall T3DPlanet::DrawHighPolyModel()
- {
- glEnable( GL_VERTEX_PROGRAM_ARB );
- DrawSkyDome();
- glBindProgramARB( GL_VERTEX_PROGRAM_ARB, ms_vertexProgramID );
- ACTUAL_MODEL.LoadIdentity();
- RestoreProjection();
- SetView();
- threaded_loading->AMODEL = ACTUAL_MODEL;
- threaded_loading->AVIEW = ACTUAL_VIEW;
- threaded_loading->APROJ = ACTUAL_PROJECTION;
- SendMatrixToShader(ACTUAL_MODEL.m, 8);
- SetShaderMatrix(ACTUAL_MODEL, ACTUAL_VIEW, ACTUAL_PROJECTION);
- glEnable(GL_TEXTURE_2D);
- moonpos = D2F(triplesingletot3dpoint<double>(-sunpos.x,-sunpos.y,-sunpos.z));
- sunlight->SET_UP_LIGHT(0, sunpos,sundiff,sunamb );
- if (poll == false)
- threaded_loading->CheckIfCameraMovedToDifferentSector(ex,ey);
- if (threaded_loading->flushing == false) {
- int i;
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
- if (within_shadows == false)
- for (i=0; i < 9; i++)
- if (threaded_loading->hmodel[i] != NULL) {
- glBindTexture(GL_TEXTURE_2D,threaded_loading->sectex[i]);
- threaded_loading->hmodel[i]->DrawSimpleModel();
- }
- }
- glDisable(GL_TEXTURE_2D);
- glBindProgramARB( GL_VERTEX_PROGRAM_ARB, 0);
- glDisable( GL_VERTEX_PROGRAM_ARB );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement