mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 01:19:18 +02:00
stars object, interrior lighting level as accessible parameter for dynamic object
This commit is contained in:
28
stars.cpp
Normal file
28
stars.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "stars.h"
|
||||
#include "globals.h"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
// cStars -- simple starfield model, simulating appearance of starry sky
|
||||
|
||||
void
|
||||
cStars::init() {
|
||||
|
||||
m_stars.LoadFromFile( "models\\skydome_stars.t3d", false );
|
||||
}
|
||||
|
||||
void
|
||||
cStars::render() {
|
||||
|
||||
::glPushMatrix();
|
||||
|
||||
::glRotatef( m_latitude, 1.0f, 0.0f, 0.0f ); // ustawienie osi OY na północ
|
||||
::glRotatef( -std::fmod( Global::fTimeAngleDeg, 360.0f ), 0.0f, 1.0f, 0.0f ); // obrót dobowy osi OX
|
||||
|
||||
::glPointSize( 2.0f );
|
||||
m_stars.Render( 1.0 );
|
||||
::glPointSize( 3.0f );
|
||||
|
||||
::glPopMatrix();
|
||||
}
|
||||
Reference in New Issue
Block a user