A lot of changes
This commit is contained in:
parent
5720f8322b
commit
ef92c70ae8
@ -23,17 +23,20 @@
|
|||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_nosound|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_nosound|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
|
4
Halibut Engine/Halibut Engine.vcxproj.user
Normal file
4
Halibut Engine/Halibut Engine.vcxproj.user
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup />
|
||||||
|
</Project>
|
@ -94,17 +94,20 @@
|
|||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_nosound|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_nosound|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>NotSet</CharacterSet>
|
<CharacterSet>NotSet</CharacterSet>
|
||||||
|
<PlatformToolset>v143</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
@ -135,8 +138,8 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>TARGET_SALMON;TARGET_WIN32;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;DEBUG</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NOSOUND;TARGET_SALMON;TARGET_WIN32;WIN32_LEAN_AND_MEAN;_WIN32_WINNT=0x0501;DEBUG</PreprocessorDefinitions>
|
||||||
<AdditionalIncludeDirectories>$(SalmonEnginePath);$(LibsPath)\boost_1_52_0;$(LibsPath)\openal\OpenAL11_windows_sdk;$(LibsPath)\libogg-1.3.0\include;$(LibsPath)\libvorbis-1.3.2\include;$(LibsPath)\sqplus\sqplus;$(LibsPath)\sqplus\include;$(LibsPath)\DirectXsdk\Include;$(LibsPath)\lpng1510</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;C:\Boost\include\boost-1_84;..\..\lpng1510</AdditionalIncludeDirectories>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
12146
gl/glext.h
Normal file
12146
gl/glext.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,9 @@ protected:
|
|||||||
|
|
||||||
float GlobalShadowAreaHalfSize;
|
float GlobalShadowAreaHalfSize;
|
||||||
|
|
||||||
|
cardinal BkgTexID;
|
||||||
|
std::string BkgShaderName;
|
||||||
|
|
||||||
void CalcCamPosVec();
|
void CalcCamPosVec();
|
||||||
|
|
||||||
virtual void DrawQuad(const T2DQuad& quad) = 0;
|
virtual void DrawQuad(const T2DQuad& quad) = 0;
|
||||||
@ -78,6 +81,11 @@ public:
|
|||||||
void BeginDrawToDepthBufferGlobal(std::string& globalBufferName);
|
void BeginDrawToDepthBufferGlobal(std::string& globalBufferName);
|
||||||
void BeginDrawToDepthBufferLocal(std::string& localBufferName);
|
void BeginDrawToDepthBufferLocal(std::string& localBufferName);
|
||||||
void EndDrawToDepthBuffer();
|
void EndDrawToDepthBuffer();
|
||||||
|
|
||||||
|
void SetBackgroundCubemap(cardinal bkgTex) { BkgTexID = bkgTex; }
|
||||||
|
void SetBackgroundShader(const std::string& shaderName) { BkgShaderName = shaderName; }
|
||||||
|
|
||||||
|
void DrawBackground();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef SCRIPT_MANAGER_H_INCLUDED
|
#ifndef SCRIPT_MANAGER_H_INCLUDED
|
||||||
#define SCRIPT_MANAGER_H_INCLUDED
|
#define SCRIPT_MANAGER_H_INCLUDED
|
||||||
|
|
||||||
#include "sqplus.h"
|
//#include "sqplus.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@ -44,22 +44,23 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class TScriptManager : public TSerializeInterface
|
class TScriptManager : public TSerializeInterface
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
HSQUIRRELVM virtualMachine;
|
//HSQUIRRELVM virtualMachine;
|
||||||
std::map<std::string, TScriptInfo> FuncInfoMap;
|
std::map<std::string, TScriptInfo> FuncInfoMap;
|
||||||
|
|
||||||
template<typename T1,typename T2>
|
template<typename T1,typename T2>
|
||||||
void RegisterFunc(T1& object, T2 method, const std::string& funcName)
|
void RegisterFunc(T1& object, T2 method, const std::string& funcName)
|
||||||
{
|
{
|
||||||
SqPlus::RegisterGlobal(virtualMachine, object, method, _SC(funcName.c_str()));
|
//SqPlus::RegisterGlobal(virtualMachine, object, method, _SC(funcName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void RegisterFunc(T globalFunc, const std::string& funcName)
|
void RegisterFunc(T globalFunc, const std::string& funcName)
|
||||||
{
|
{
|
||||||
SqPlus::RegisterGlobal(virtualMachine, globalFunc, _SC(funcName.c_str()));
|
//SqPlus::RegisterGlobal(virtualMachine, globalFunc, _SC(funcName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -103,9 +104,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SQ_Print(const SQChar *inString);
|
//void SQ_Print(const SQChar *inString);
|
||||||
void SQ_PrintWidgetList();
|
//void SQ_PrintWidgetList();
|
||||||
void SQ_MoveWidget(const SQChar *widgetName, float x, float y);
|
//void SQ_MoveWidget(const SQChar *widgetName, float x, float y);
|
||||||
//void SQ_PrintTextureList();
|
//void SQ_PrintTextureList();
|
||||||
//void SQ_PrintAnimationList();
|
//void SQ_PrintAnimationList();
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename TYPENAME>
|
template<typename TYPENAME>
|
||||||
boost::signal<void(const TYPENAME&)>& GetSignal(const std::string& dictName, const std::string& valueName)
|
boost::signals2::signal<void(const TYPENAME&)>& GetSignal(const std::string& dictName, const std::string& valueName)
|
||||||
{
|
{
|
||||||
return boost::get<std::shared_ptr<TBindableVar<TYPENAME>>>(GetSmartValue(dictName, valueName))->OnVarChanged;
|
return boost::get<std::shared_ptr<TBindableVar<TYPENAME>>>(GetSmartValue(dictName, valueName))->OnVarChanged;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef BINDABLE_VAR_H_INCLUDED
|
#ifndef BINDABLE_VAR_H_INCLUDED
|
||||||
#define BINDABLE_VAR_H_INCLUDED
|
#define BINDABLE_VAR_H_INCLUDED
|
||||||
|
|
||||||
#include "boost/signal.hpp"
|
#include "boost/signals2.hpp"
|
||||||
#include "boost/variant.hpp"
|
#include "boost/variant.hpp"
|
||||||
|
|
||||||
namespace SE
|
namespace SE
|
||||||
@ -17,7 +17,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
boost::signal<void(const TYPENAME&)> OnVarChanged;
|
boost::signals2::signal<void(const TYPENAME&)> OnVarChanged;
|
||||||
|
|
||||||
TBindableVar()
|
TBindableVar()
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ This code combines additional routines (such as console/log, exceptions, math ut
|
|||||||
|
|
||||||
#include "boost/asio.hpp"
|
#include "boost/asio.hpp"
|
||||||
#include "boost/date_time/posix_time/posix_time.hpp"
|
#include "boost/date_time/posix_time/posix_time.hpp"
|
||||||
#include "boost/signal.hpp"
|
#include "boost/signals2.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include "include/Utils/Console/Console.h"
|
#include "include/Utils/Console/Console.h"
|
||||||
|
@ -32,8 +32,10 @@ bool TLiteModelResource::LoadModel(boost::shared_array<byte> filePointer, cardin
|
|||||||
int normtexnamelen = *reinterpret_cast<word*>(&filePointer[78]+texnamelen);
|
int normtexnamelen = *reinterpret_cast<word*>(&filePointer[78]+texnamelen);
|
||||||
|
|
||||||
Normtexname = std::string(reinterpret_cast<char*>(&filePointer[80]+texnamelen), reinterpret_cast<char*>(&filePointer[80]+texnamelen) + normtexnamelen);
|
Normtexname = std::string(reinterpret_cast<char*>(&filePointer[80]+texnamelen), reinterpret_cast<char*>(&filePointer[80]+texnamelen) + normtexnamelen);
|
||||||
|
if (Texname != "")
|
||||||
ResourceManager->TexList.AddTextureDirectly((PathToResource + std::string(Texname)));
|
{
|
||||||
|
ResourceManager->TexList.AddTextureDirectly((PathToResource + std::string(Texname)));
|
||||||
|
}
|
||||||
if (Normtexname != "")
|
if (Normtexname != "")
|
||||||
{
|
{
|
||||||
ResourceManager->TexList.AddTextureDirectly((PathToResource + std::string(Normtexname)));
|
ResourceManager->TexList.AddTextureDirectly((PathToResource + std::string(Normtexname)));
|
||||||
|
@ -805,6 +805,76 @@ void TSalmonRendererInterface::EndDrawToDepthBuffer()
|
|||||||
SetPerspectiveFullScreenViewport();
|
SetPerspectiveFullScreenViewport();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TSalmonRendererInterface::DrawBackground()
|
||||||
|
{
|
||||||
|
if (BkgTexID != 0)
|
||||||
|
{
|
||||||
|
//ResourceManager->ShaderManager.PushShader(BkgShaderName);
|
||||||
|
this->PushShader(BkgShaderName);
|
||||||
|
|
||||||
|
//if (BkgShaderName != "")
|
||||||
|
// ResourceManager->ShaderManager.SetCurrentShader(BkgShaderName);
|
||||||
|
|
||||||
|
glPushMatrix();
|
||||||
|
glLoadIdentity();
|
||||||
|
glRotatef(CamPhi * 180.0f / pi, 1.0f, 0.0f, 0.0f);
|
||||||
|
glRotatef(CamAlpha * 180.0f / pi, 0.0f, 1.0f, 0.0f);
|
||||||
|
|
||||||
|
glBindTexture(GL_TEXTURE_CUBE_MAP, BkgTexID);
|
||||||
|
|
||||||
|
//x
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(-10.0f, -10.0f, -10.0f);
|
||||||
|
glVertex3f(-10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(-10.0f, 10.0f, 10.0f);
|
||||||
|
glVertex3f(-10.0f, -10.0f, 10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(10.0f, -10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, 10.0f);
|
||||||
|
glVertex3f(10.0f, -10.0f, 10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
//y
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(-10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, 10.0f);
|
||||||
|
glVertex3f(-10.0f, 10.0f, 10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(-10.0f, -10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, -10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, -10.0f, 10.0f);
|
||||||
|
glVertex3f(-10.0f, -10.0f, 10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
//z
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(10.0f, -10.0f, 10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, 10.0f);
|
||||||
|
glVertex3f(-10.0f, 10.0f, 10.0f);
|
||||||
|
glVertex3f(-10.0f, -10.0f, 10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glBegin(GL_QUADS);
|
||||||
|
glVertex3f(10.0f, -10.0f, -10.0f);
|
||||||
|
glVertex3f(10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(-10.0f, 10.0f, -10.0f);
|
||||||
|
glVertex3f(-10.0f, -10.0f, -10.0f);
|
||||||
|
glEnd();
|
||||||
|
|
||||||
|
glClear(GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
|
glPopMatrix();
|
||||||
|
|
||||||
|
PopShader();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} //namespace SE
|
} //namespace SE
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ void TApplicationAncestor::OuterDeinit()
|
|||||||
|
|
||||||
void TApplicationAncestor::OuterDraw()
|
void TApplicationAncestor::OuterDraw()
|
||||||
{
|
{
|
||||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
//glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||||
glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
//glClear( GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
RenderUniform1i("Texture", 0);
|
RenderUniform1i("Texture", 0);
|
||||||
@ -43,16 +43,16 @@ void TApplicationAncestor::OuterDraw()
|
|||||||
|
|
||||||
InnerDraw();
|
InnerDraw();
|
||||||
|
|
||||||
glDisable(GL_DEPTH_TEST);
|
//glDisable(GL_DEPTH_TEST);
|
||||||
Renderer->PushShader("DefaultShader");
|
/*Renderer->PushShader("DefaultShader");
|
||||||
|
|
||||||
if (IsConsoleOut)
|
if (IsConsoleOut)
|
||||||
{
|
{
|
||||||
Console->Draw();
|
Console->Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
Renderer->PopShader();
|
Renderer->PopShader();*/
|
||||||
glEnable(GL_DEPTH_TEST);
|
//glEnable(GL_DEPTH_TEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TApplicationAncestor::OuterUpdate(cardinal timer)
|
void TApplicationAncestor::OuterUpdate(cardinal timer)
|
||||||
|
@ -10,9 +10,9 @@ std::vector<TFunctionBinderInterface*> TFunctionBinderInterface::BinderList;
|
|||||||
|
|
||||||
TScriptManager::TScriptManager()
|
TScriptManager::TScriptManager()
|
||||||
{
|
{
|
||||||
SquirrelVM::Init();
|
//SquirrelVM::Init();
|
||||||
|
|
||||||
virtualMachine = SquirrelVM::GetVMPtr();
|
//virtualMachine = SquirrelVM::GetVMPtr();
|
||||||
|
|
||||||
//SqPlus::RegisterGlobal(virtualMachine, SQ_Print, _SC("Print"));
|
//SqPlus::RegisterGlobal(virtualMachine, SQ_Print, _SC("Print"));
|
||||||
//SqPlus::RegisterGlobal(virtualMachine, SQ_Print, _SC("p"));
|
//SqPlus::RegisterGlobal(virtualMachine, SQ_Print, _SC("p"));
|
||||||
@ -58,12 +58,12 @@ TScriptManager::TScriptManager()
|
|||||||
TScriptManager::~TScriptManager()
|
TScriptManager::~TScriptManager()
|
||||||
{
|
{
|
||||||
*Console<<"Script manager shutdown";
|
*Console<<"Script manager shutdown";
|
||||||
SquirrelVM::Shutdown();
|
//SquirrelVM::Shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TScriptManager::RunScript(const std::string& scriptCode)
|
void TScriptManager::RunScript(const std::string& scriptCode)
|
||||||
{
|
{
|
||||||
try
|
/*try
|
||||||
{
|
{
|
||||||
SquirrelObject m = SquirrelVM::CompileBuffer(_T(scriptCode.c_str()));
|
SquirrelObject m = SquirrelVM::CompileBuffer(_T(scriptCode.c_str()));
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ void TScriptManager::RunScript(const std::string& scriptCode)
|
|||||||
catch (SquirrelError)
|
catch (SquirrelError)
|
||||||
{
|
{
|
||||||
*Console<<"Script failed to run";
|
*Console<<"Script failed to run";
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ void TScriptManager::RunScript(const std::string& scriptCode)
|
|||||||
void TScriptManager::BindBasicFunctions()
|
void TScriptManager::BindBasicFunctions()
|
||||||
{
|
{
|
||||||
//Hack =D
|
//Hack =D
|
||||||
static bool alreadyBind = false;
|
/*static bool alreadyBind = false;
|
||||||
|
|
||||||
if (!alreadyBind)
|
if (!alreadyBind)
|
||||||
{
|
{
|
||||||
@ -102,7 +102,7 @@ void TScriptManager::BindBasicFunctions()
|
|||||||
|
|
||||||
alreadyBind = true;
|
alreadyBind = true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -171,10 +171,11 @@ void TScriptManager::Serialize(boost::property_tree::ptree& propertyTree)
|
|||||||
//============= Typical commands ==============
|
//============= Typical commands ==============
|
||||||
//=============================================
|
//=============================================
|
||||||
|
|
||||||
|
/*
|
||||||
void SQ_Print(const SQChar *inString)
|
void SQ_Print(const SQChar *inString)
|
||||||
{
|
{
|
||||||
Console->PrintImmediate(std::string(inString));
|
Console->PrintImmediate(std::string(inString));
|
||||||
}
|
}*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
void SQ_PrintWidgetList()
|
void SQ_PrintWidgetList()
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "include/Engine.h"
|
#include "include/Engine.h"
|
||||||
|
#define TARGET_WIN32
|
||||||
|
|
||||||
namespace SE
|
namespace SE
|
||||||
{
|
{
|
||||||
@ -132,6 +133,7 @@ void TSimpleLandClass::CreateVBO()
|
|||||||
void TSimpleLandClass::FreeVBO()
|
void TSimpleLandClass::FreeVBO()
|
||||||
{
|
{
|
||||||
#ifdef TARGET_WIN32
|
#ifdef TARGET_WIN32
|
||||||
|
|
||||||
glDeleteBuffers(1, &VertexBuffer);
|
glDeleteBuffers(1, &VertexBuffer);
|
||||||
glDeleteBuffers(1, &NormBuffer);
|
glDeleteBuffers(1, &NormBuffer);
|
||||||
glDeleteBuffers(1, &TangentBuffer);
|
glDeleteBuffers(1, &TangentBuffer);
|
||||||
@ -381,23 +383,27 @@ void TSimpleLandClass::DrawImmediate()
|
|||||||
float tx1 = float(j+1)/(Width-1);
|
float tx1 = float(j+1)/(Width-1);
|
||||||
float ty1 = float(i+1)/(Height-1);
|
float ty1 = float(i+1)/(Height-1);
|
||||||
|
|
||||||
|
|
||||||
glBegin(GL_TRIANGLES);
|
glBegin(GL_TRIANGLES);
|
||||||
glNormal3fv(VertexMatrix[k].norm.v);
|
glNormal3fv(VertexMatrix[k].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k].binorm.v);
|
||||||
glTexCoord2f(tx0,ty0);
|
//glTexCoord2f(tx0,ty0);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx0, ty0 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k].pos.v);
|
glVertex3fv(VertexMatrix[k].pos.v);
|
||||||
|
|
||||||
glNormal3fv(VertexMatrix[k_right].norm.v);
|
glNormal3fv(VertexMatrix[k_right].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right].binorm.v);
|
||||||
glTexCoord2f(tx1,ty0);
|
//glTexCoord2f(tx1,ty0);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx1, ty0 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k_right].pos.v);
|
glVertex3fv(VertexMatrix[k_right].pos.v);
|
||||||
|
|
||||||
glNormal3fv(VertexMatrix[k_up].norm.v);
|
glNormal3fv(VertexMatrix[k_up].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_up].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_up].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_up].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_up].binorm.v);
|
||||||
glTexCoord2f(tx0,ty1);
|
//glTexCoord2f(tx0,ty1);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx0, ty1 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k_up].pos.v);
|
glVertex3fv(VertexMatrix[k_up].pos.v);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
@ -405,19 +411,22 @@ void TSimpleLandClass::DrawImmediate()
|
|||||||
glNormal3fv(VertexMatrix[k_right_up].norm.v);
|
glNormal3fv(VertexMatrix[k_right_up].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right_up].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right_up].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right_up].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right_up].binorm.v);
|
||||||
glTexCoord2f(tx1,ty1);
|
//glTexCoord2f(tx1,ty1);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx1, ty1 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k_right_up].pos.v);
|
glVertex3fv(VertexMatrix[k_right_up].pos.v);
|
||||||
|
|
||||||
glNormal3fv(VertexMatrix[k_up].norm.v);
|
glNormal3fv(VertexMatrix[k_up].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_up].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_up].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_up].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_up].binorm.v);
|
||||||
glTexCoord2f(tx0,ty1);
|
//glTexCoord2f(tx0,ty1);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx0, ty1 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k_up].pos.v);
|
glVertex3fv(VertexMatrix[k_up].pos.v);
|
||||||
|
|
||||||
glNormal3fv(VertexMatrix[k_right].norm.v);
|
glNormal3fv(VertexMatrix[k_right].norm.v);
|
||||||
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right].tangent.v);
|
VertexAttrib3fv(CONST_STRING_TANGENT_ATTRIB, VertexMatrix[k_right].tangent.v);
|
||||||
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right].binorm.v);
|
VertexAttrib3fv(CONST_STRING_BINORMAL_ATTRIB, VertexMatrix[k_right].binorm.v);
|
||||||
glTexCoord2f(tx1,ty0);
|
//glTexCoord2f(tx1,ty0);
|
||||||
|
VertexAttrib3fv(CONST_STRING_TEXCOORD_ATTRIB, &std::array<float, 2>{ tx1, ty0 }[0]);
|
||||||
glVertex3fv(VertexMatrix[k_right].pos.v);
|
glVertex3fv(VertexMatrix[k_right].pos.v);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
|
@ -86,7 +86,6 @@ ov_callbacks OggCallbacks = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} //namespace SE
|
||||||
#endif //NOSOUND
|
#endif //NOSOUND
|
||||||
|
|
||||||
|
|
||||||
} //namespace SE
|
|
@ -1016,7 +1016,7 @@ cardinal TOggMusicStream::GetSamplesPerSec()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} //namespace SE
|
||||||
|
|
||||||
#endif //NOSOUND
|
#endif //NOSOUND
|
||||||
|
|
||||||
|
|
||||||
} //namespace SE
|
|
@ -3,7 +3,7 @@
|
|||||||
#include "include/Utils/Utils.h"
|
#include "include/Utils/Utils.h"
|
||||||
#include "include/Engine.h"
|
#include "include/Engine.h"
|
||||||
|
|
||||||
#include "boost/gil/gil_all.hpp"
|
#include "boost/bind.hpp"
|
||||||
#include "boost/gil/extension/numeric/sampler.hpp"
|
#include "boost/gil/extension/numeric/sampler.hpp"
|
||||||
#include "boost/gil/extension/numeric/resample.hpp"
|
#include "boost/gil/extension/numeric/resample.hpp"
|
||||||
|
|
||||||
@ -17,6 +17,7 @@ TTextureListClass::TTextureListClass()
|
|||||||
using namespace boost::assign;
|
using namespace boost::assign;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
CreateFunctionMap[".bmp"] = boost::bind(&TTextureListClass::CreateTexDataFromBmp24, this, _1, _2);
|
CreateFunctionMap[".bmp"] = boost::bind(&TTextureListClass::CreateTexDataFromBmp24, this, _1, _2);
|
||||||
CreateFunctionMap[".bmp32"] = boost::bind(&TTextureListClass::CreateTexDataFromBmp32, this, _1, _2);
|
CreateFunctionMap[".bmp32"] = boost::bind(&TTextureListClass::CreateTexDataFromBmp32, this, _1, _2);
|
||||||
|
Loading…
Reference in New Issue
Block a user