My card is a Radeon 9600, the scene _was_ rendered in OpenGL. All the models are .x format, created in Belnder, and resaved by mview.exe.
I also do something like this for my scenes on rendering:
Code: Select all
cscene::preRender()
{
scenemgr->beginScene(stuff);
}
cscene::postRender()
{
scenemgr->endScene();
}
// then in a derivec class..
(cscene derived class)::Render()
{
preRender();
.. other code (like moving the light)
postRender()
{
I just noticed I was using OpenGL. I switched it to Direct3D 9 and, it's lit better, no extreme-dark anywhere on the models, but it is still comparably darker, ie looks like screenshot 2 but from all angles, the light is working, it's just not as bright as it should be. [edit]
![Cool 8)](./images/smilies/icon_cool.gif)
[/edit]
One more tidbit, for some reason Irrlicht no longer prints any log info to the console (or the editors output window) after the constructor for my scene class has completed execution. Code for that is insignificant, but here she be anyway! (This is for the base class)
Code: Select all
#include "StdAfx.h"
#include ".\cscene.h"
#include ".\cnewton.h"
#include ".\caudio.h"
#include ".\cmaterials.h"
#include ".\cnodes.h"
#include ".\canimatedtextures.h"
#include ".\ccolormaterials.h"
// Constructor - attributes can be null. folder is the relative path to this
// scenes static code folder. ex. "scenes/test/"
CScene::CScene( irr::core::stringc name, irr::core::stringc folder, IrrlichtDevice *device, _scene_attributes *attributes )
{
m_Name = name;
m_Device = device;
m_Video = m_Device->getVideoDriver();
m_SceneManager = m_Device->getSceneManager();
m_GUI = m_Device->getGUIEnvironment();
m_Skin = m_GUI->getSkin();
// Validate m_Device
if( !m_Device )
{
printf("IRRLICHT_DEVICE_INVALID\n");
return;
}
// Set default values for all appropriate members.
setDefaults();
// Set the 3d environment attributes
if(attributes)
SetAttributes( attributes );
else
printf("Using default _scene_attributes\n");
// ..
m_Attributes.EventCallback = new CEventCallback();
// Setup the event receiver, if possible.
if(m_Attributes.EventCallback)
m_Device->setEventReceiver( m_Attributes.EventCallback );
else
printf("using no event callback. (no input will be checked)\n");
// Set fog parameters for the scene
m_Video->setFog( m_Attributes.FogColor,
m_Attributes.USE_LINEAR_FOG,
m_Attributes.FOG_START,
m_Attributes.FOG_END,
m_Attributes.FOG_DENSITY,
m_Attributes.USE_PIXEL_FOG,
m_Attributes.USE_RANGE_FOG
);
// Set the ambient light color for the scene
m_Video->setAmbientLight( m_Attributes.AmbientLightColor );
// Create Font object
m_Font = new CGFont( m_GUI );
Where m_Font = new CGFont( m_GUI ); is where the last log is displayed, telling me the font (Irrlicht font, not my own) was created. After that no more info is ever given from Irrlicht.
Here's the rest of the constructor..
Code: Select all
m_Camera = m_SceneManager->addCameraSceneNode(0);
// The newton object does not need to load anything, depends on no other
// object and is used by m_Materials & m_Nodes we should init it first.
m_Newton = new CNewton( m_Device );
// Color materials also has no dependancies other than Irrlicht.
m_ColorMaterials = new CColorMaterials( m_Video, folder + "colormaterials.sc" );
// Everything else loads a static code file to create themselves.
// m_Nodes must be created lastly becuase it uses the other objects
// to construct itself, therefore they must be valid or the game
// will crash.
m_Audio = new CAudio();
m_Audio->Load( folder + "audio.sc" );
m_Materials = new CMaterials( m_Newton, m_Audio, folder + "materials.sc" );
m_AnimatedTextures = new CAnimatedTextures( m_Device, folder + "textures.sc" );
m_Nodes = new CNodes( this, folder + m_Name + ".sc" );
}
There is another problem that may be related to some of this, but I doubt it, the fps camera input does not work either, yes input receiver was enabled for it, (fpscam->enableinput something or other(true) ).
That initially stopped working when I implemented my cscene class, and at the same time as Irrlicht began to stop logging info.