16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

Format source code using clang-format

This commit is contained in:
Zbigniew Mandziejewicz
2015-04-03 22:00:22 +08:00
parent 91470458b4
commit cb19354db4
99 changed files with 40728 additions and 36059 deletions

79
sky.cpp
View File

@@ -1,65 +1,58 @@
//---------------------------------------------------------------------------
#include "system.hpp"
#include "classes.hpp"
#include "system.hpp"
#include "classes.hpp"
#pragma hdrstop
#include "sky.h"
#include "Globals.h"
//---------------------------------------------------------------------------
GLfloat lightPos[4] = { 0.0f, 0.0f, 0.0f, 1.0f };
GLfloat lightPos[4] = {0.0f, 0.0f, 0.0f, 1.0f};
__fastcall TSky::~TSky()
{
};
__fastcall TSky::TSky()
{
};
__fastcall TSky::~TSky(){};
__fastcall TSky::TSky(){};
void __fastcall TSky::Init()
{
WriteLog(Global::asSky.c_str());
WriteLog("init");
AnsiString asModel;
asModel=Global::asSky;
if ((asModel!="1") && (asModel!="0"))
// {
mdCloud=TModelsManager::GetModel(asModel.c_str());
// }
WriteLog(Global::asSky.c_str());
WriteLog("init");
AnsiString asModel;
asModel = Global::asSky;
if ((asModel != "1") && (asModel != "0"))
// {
mdCloud = TModelsManager::GetModel(asModel.c_str());
// }
};
void __fastcall TSky::Render()
{
if (mdCloud)
{//jeœli jest model nieba
glPushMatrix();
//glDisable(GL_DEPTH_TEST);
glTranslatef(Global::pCameraPosition.x, Global::pCameraPosition.y, Global::pCameraPosition.z);
glLightfv(GL_LIGHT0,GL_POSITION,lightPos);
if (Global::bUseVBO)
{//renderowanie z VBO
mdCloud->RaRender(100,0);
mdCloud->RaRenderAlpha(100,0);
}
else
{//renderowanie z Display List
mdCloud->Render(100,0);
mdCloud->RenderAlpha(100,0);
}
//glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
//glEnable(GL_LIGHTING);
glPopMatrix();
glLightfv(GL_LIGHT0,GL_POSITION,Global::lightPos);
}
if (mdCloud)
{ // jeœli jest model nieba
glPushMatrix();
// glDisable(GL_DEPTH_TEST);
glTranslatef(Global::pCameraPosition.x, Global::pCameraPosition.y,
Global::pCameraPosition.z);
glLightfv(GL_LIGHT0, GL_POSITION, lightPos);
if (Global::bUseVBO)
{ // renderowanie z VBO
mdCloud->RaRender(100, 0);
mdCloud->RaRenderAlpha(100, 0);
}
else
{ // renderowanie z Display List
mdCloud->Render(100, 0);
mdCloud->RenderAlpha(100, 0);
}
// glEnable(GL_DEPTH_TEST);
glClear(GL_DEPTH_BUFFER_BIT);
// glEnable(GL_LIGHTING);
glPopMatrix();
glLightfv(GL_LIGHT0, GL_POSITION, Global::lightPos);
}
};
//---------------------------------------------------------------------------
#pragma package(smart_init)