Frederic Bouvier:
This patch was inspired by Norman. Otherwise there is a segfault on Linux because the global variable tries to access OGL before a valid context is initialized.
This commit is contained in:
@@ -49,7 +49,7 @@ Point3D origin;
|
|||||||
Camera *pCam = new Camera();
|
Camera *pCam = new Camera();
|
||||||
// Need to add a light here until we figure out how to use the sun position and color
|
// Need to add a light here until we figure out how to use the sun position and color
|
||||||
SkyLight::SkyLightType eType = SkyLight::SKY_LIGHT_DIRECTIONAL;
|
SkyLight::SkyLightType eType = SkyLight::SKY_LIGHT_DIRECTIONAL;
|
||||||
SkyLight *pLight = new SkyLight(eType);
|
SkyLight *pLight = 0;
|
||||||
|
|
||||||
// hack
|
// hack
|
||||||
sgMat4 my_copy_of_ssgOpenGLAxisSwapMatrix =
|
sgMat4 my_copy_of_ssgOpenGLAxisSwapMatrix =
|
||||||
@@ -105,6 +105,7 @@ SkySceneLoader::~SkySceneLoader()
|
|||||||
//bool SkySceneLoader::Load(std::string filepath)
|
//bool SkySceneLoader::Load(std::string filepath)
|
||||||
bool SkySceneLoader::Load( unsigned char *data, unsigned int size, double latitude, double longitude )
|
bool SkySceneLoader::Load( unsigned char *data, unsigned int size, double latitude, double longitude )
|
||||||
{
|
{
|
||||||
|
pLight = new SkyLight(eType);
|
||||||
// Need to create the managers
|
// Need to create the managers
|
||||||
cout << "GraphicsContext::Instantiate();" << endl;
|
cout << "GraphicsContext::Instantiate();" << endl;
|
||||||
GraphicsContext::Instantiate();
|
GraphicsContext::Instantiate();
|
||||||
|
|||||||
Reference in New Issue
Block a user