Commit f42fdc4a authored by hybrid's avatar hybrid

Added Win32 fullscreen enhancement, now trying to get a better refresh rate....

Added Win32 fullscreen enhancement, now trying to get a better refresh rate. Some minor changes, mainly to comments and indentation.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@819 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ebb6f460
...@@ -961,7 +961,7 @@ namespace scene ...@@ -961,7 +961,7 @@ namespace scene
how big the radius should be, you could use the following code to determine how big the radius should be, you could use the following code to determine
it: it:
\code \code
core::aabbox<f32> box = yourSceneNode->getBoundingBox(); const core::aabbox<f32>& box = yourSceneNode->getBoundingBox();
core::vector3df radius = box.MaxEdge - box.getCenter(); core::vector3df radius = box.MaxEdge - box.getCenter();
\endcode \endcode
\param gravityPerSecond: Sets the gravity of the environment. A good example value would be \param gravityPerSecond: Sets the gravity of the environment. A good example value would be
......
...@@ -116,43 +116,28 @@ namespace video ...@@ -116,43 +116,28 @@ namespace video
virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) = 0; virtual const core::matrix4& getTransform(E_TRANSFORMATION_STATE state) = 0;
//! Sets a material. //! Sets a material.
/** All 3d drawing functions draw geometry now /** All 3d drawing functions will draw geometry using this material.
using this material.
\param material: Material to be used from now on. */ \param material: Material to be used from now on. */
virtual void setMaterial(const SMaterial& material) = 0; virtual void setMaterial(const SMaterial& material) = 0;
//! Returns a pointer to a texture. //! Returns a pointer to a texture.
/** Loads the texture if it is not /** Loads the texture from disk if it is not
already loaded, and generates mipmap levels if desired. already loaded and generates mipmap levels if desired.
You can influence how the texture is loaded using the setTextureCreationFlag() Texture loading can be influenced using the setTextureCreationFlag() method.
method.
The texture can be in BMP, JPG, TGA, PCX, PNG, and PSD format. The texture can be in BMP, JPG, TGA, PCX, PNG, and PSD format.
For loading BMP, TGA, PCX, and PSD files the engine uses its own methods.
PCX loading is based on some code by Dean P. Macri, PNG loading
is done using a loader by rt.
For loading JPG-Files the JPEG LIB 6b, written by
The Independent JPEG Group is used. For PNG loading,
libPNG is used. Thanx for such great libraries!
\param filename: Filename of the texture to be loaded. \param filename: Filename of the texture to be loaded.
\return Returns a pointer to the texture and 0 if the texture \return Returns a pointer to the texture or 0 if the texture
could not be loaded. could not be loaded.
This pointer should not be dropped. See IUnknown::drop() for more information.*/ This pointer should not be dropped. See IUnknown::drop() for more information.*/
virtual ITexture* getTexture(const c8* filename) = 0; virtual ITexture* getTexture(const c8* filename) = 0;
//! Returns a pointer to a texture. //! Returns a pointer to a texture.
/** Loads the texture if it is not /** Loads the texture from disk if it is not
already loaded, and generates mipmap levels if desired. already loaded and generates mipmap levels if desired.
You can influence how the texture is loaded using the setTextureCreationFlag() Texture loading can be influenced using the setTextureCreationFlag() method.
method.
The texture can be in BMP, JPG, TGA, PCX, PNG, and PSD format. The texture can be in BMP, JPG, TGA, PCX, PNG, and PSD format.
For loading BMP, TGA, PCX, and PSD files the engine uses its own methods.
PCX loading is based on some code by Dean P. Macri, PNG loading
is done using a loader by rt.
For loading JPG-Files the JPEG LIB 6b, written by
The Independent JPEG Group is used. For PNG loading,
libPNG is used. Thanx for such great libraries!
\param file: Pointer to an already opened file. \param file: Pointer to an already opened file.
\return Returns a pointer to the texture and 0 if the texture \return Returns a pointer to the texture or 0 if the texture
could not be loaded. could not be loaded.
This pointer should not be dropped. See IUnknown::drop() for more information.*/ This pointer should not be dropped. See IUnknown::drop() for more information.*/
virtual ITexture* getTexture(io::IReadFile* file) = 0; virtual ITexture* getTexture(io::IReadFile* file) = 0;
...@@ -175,7 +160,7 @@ namespace video ...@@ -175,7 +160,7 @@ namespace video
will return this texture will return this texture
\param format: Desired color format of the texture. Please note that \param format: Desired color format of the texture. Please note that
the driver may choose to create the texture in another color format. the driver may choose to create the texture in another color format.
\return Returns a pointer to the new created Texture. \return Returns a pointer to the newly created texture.
This pointer should not be dropped. See IUnknown::drop() for more information. */ This pointer should not be dropped. See IUnknown::drop() for more information. */
virtual ITexture* addTexture(const core::dimension2d<s32>& size, virtual ITexture* addTexture(const core::dimension2d<s32>& size,
const c8* name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0; const c8* name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
...@@ -202,47 +187,45 @@ namespace video ...@@ -202,47 +187,45 @@ namespace video
/** Please note that after calling this, the pointer to the ITexture /** Please note that after calling this, the pointer to the ITexture
may not be longer valid, if it was not grabbed before by other parts of may not be longer valid, if it was not grabbed before by other parts of
the engine for storing it longer. So it would be a good idea to set all the engine for storing it longer. So it would be a good idea to set all
materials which are using this texture to null or another texture first. materials which are using this texture to 0 or another texture first.
\param texture: Texture to delete from the engines cache. */ \param texture: Texture to delete from the engine cache. */
virtual void removeTexture(ITexture* texture) = 0; virtual void removeTexture(ITexture* texture) = 0;
//! Removes all texture from the texture cache and deletes them, freeing lot of memory. //! Removes all textures from the texture cache and deletes them, freeing lot of memory.
/** Please note that after calling this, the pointer to all ITextures /** Please note that after calling this, the pointer to all ITextures
may not be longer valid, if they were not grabbed before by other parts of may not be longer valid, if they were not grabbed before by other parts of
the engine for storing them longer. So it would be a good idea to set all the engine for storing them longer. So it would be a good idea to set all
materials which are using textures to null first. */ materials which are using textures to 0 first. */
virtual void removeAllTextures() = 0; virtual void removeAllTextures() = 0;
//! Creates an 1bit alpha channel of the texture based of an color key. //! Creates a 1bit alpha channel of the texture based of an color key.
/** This makes the texture transparent at the regions where this color /** This makes the texture transparent at the regions where this color
key can be found when using for example draw2DImage with useAlphachannel key can be found when using for example draw2DImage with useAlphachannel
= true. = true.
\param texture: Texture of which its alpha channel is modified. \param texture: Texture whose alpha channel is modified.
\param color: Color key color. Every pixel with this color will get transparent \param color: Color key color. Every pixel with this color will become transparent
like described above. Please note that the colors of a texture may get as described above. Please note that the colors of a texture may be
converted when loading it, so the color values may not be exactly the same converted when loading it, so the color values may not be exactly the same
in the engine and for example in picture edit programs. To avoid this in the engine and for example in picture edit programs. To avoid this
problem, you could use the makeColorKeyTexture method, which takes the position problem, you could use the makeColorKeyTexture method, which takes the position
of a pixel instead a color value. */ of a pixel instead a color value. */
virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color) = 0; virtual void makeColorKeyTexture(video::ITexture* texture, video::SColor color) = 0;
//! Creates an 1bit alpha channel of the texture based of an color key position. //! Creates a 1bit alpha channel of the texture based of an color key position.
/** This makes the texture transparent at the regions where this color /** This makes the texture transparent at the regions where this color
key can be found when using for example draw2DImage with useAlphachannel key can be found when using for example draw2DImage with useAlphachannel=true.
= true. \param texture: Texture whose alpha channel is modified.
\param texture: Texture of which its alpha channel is modified.
\param colorKeyPixelPos: Position of a pixel with the color key color. \param colorKeyPixelPos: Position of a pixel with the color key color.
Every pixel with this color will get transparent Every pixel with this color will become transparent as described above. */
like described above. */
virtual void makeColorKeyTexture(video::ITexture* texture, virtual void makeColorKeyTexture(video::ITexture* texture,
core::position2d<s32> colorKeyPixelPos) = 0; core::position2d<s32> colorKeyPixelPos) = 0;
//! Creates a normal map from a height map texture. //! Creates a normal map from a height map texture.
/** If the target texture /** If the target texture
has 32 bit, the height value is stored in the alpha component of the texture as has 32 bit, the height value is stored in the alpha component of the texture as
addition. This value will be used by the video::EMT_PARALLAX_MAP_SOLID addition. This value is used by the video::EMT_PARALLAX_MAP_SOLID
material and similar materials. material and similar materials.
\param texture: Texture of which its alpha channel is modified. \param texture: Texture whose alpha channel is modified.
\param amplitude: Constant value by which the height information is multiplied.*/ \param amplitude: Constant value by which the height information is multiplied.*/
virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) = 0; virtual void makeNormalMapTexture(video::ITexture* texture, f32 amplitude=1.0f) = 0;
...@@ -286,7 +269,7 @@ namespace video ...@@ -286,7 +269,7 @@ namespace video
virtual void setViewPort(const core::rect<s32>& area) = 0; virtual void setViewPort(const core::rect<s32>& area) = 0;
//! Gets the area of the current viewport. //! Gets the area of the current viewport.
/** \return Returns rectangle of the current vieport. */ /** \return Returns rectangle of the current viewport. */
virtual const core::rect<s32>& getViewPort() const = 0; virtual const core::rect<s32>& getViewPort() const = 0;
//! draws a vertex primitive list //! draws a vertex primitive list
...@@ -367,7 +350,7 @@ namespace video ...@@ -367,7 +350,7 @@ namespace video
u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; u32 vertexCount, const u16* indexList, u32 triangleCount) = 0;
//! Draws a 3d line. //! Draws a 3d line.
/** For some implementations, this method simply calls drawIndexedTriangles with some /** For some implementations, this method simply calls drawIndexedTriangles for some
triangles. Note that the line is drawn using the current transformation triangles. Note that the line is drawn using the current transformation
matrix and material. So if you need to draw the 3D line independently of the matrix and material. So if you need to draw the 3D line independently of the
current transformation, use current transformation, use
...@@ -375,7 +358,6 @@ namespace video ...@@ -375,7 +358,6 @@ namespace video
driver->setTransform(video::ETS_WORLD, core::matrix4()); driver->setTransform(video::ETS_WORLD, core::matrix4());
\endcode \endcode
before drawing the line. before drawing the line.
This method was created for making culling debugging easier.
\param start: Start of the 3d line. \param start: Start of the 3d line.
\param end: End of the 3d line. \param end: End of the 3d line.
\param color: Color of the line. */ \param color: Color of the line. */
...@@ -383,30 +365,26 @@ namespace video ...@@ -383,30 +365,26 @@ namespace video
const core::vector3df& end, SColor color = SColor(255,255,255,255)) = 0; const core::vector3df& end, SColor color = SColor(255,255,255,255)) = 0;
//! Draws a 3d triangle. //! Draws a 3d triangle.
/** This method usually simply calls drawIndexedTriangles with some /** This method calls drawIndexedTriangles for some triangles.
triangles. Note that the line is drawn using the current transformation Note that the line is drawn using the current transformation matrix and material.
matrix and material. This method works with all drivers because it simply calls drawIndexedTriangleList but
This method was created for making collision debugging easier. It works with is hence not very fast.
all drivers because it does simply a call to drawIndexedTriangleList and
hence is not very fast but it might be useful for further development.
\param triangle: The triangle to draw. \param triangle: The triangle to draw.
\param color: Color of the line. */ \param color: Color of the line. */
virtual void draw3DTriangle(const core::triangle3df& triangle, virtual void draw3DTriangle(const core::triangle3df& triangle,
SColor color = SColor(255,255,255,255)) = 0; SColor color = SColor(255,255,255,255)) = 0;
//! Draws a 3d axis aligned box. //! Draws a 3d axis aligned box.
/** This method usually simply calls drawIndexedTriangles with some /** This method simply calls drawIndexedTriangles for some triangles.
triangles. Note that the line is drawn using the current transformation Note that the line is drawn using the current transformation matrix and material.
matrix and material. This method works with all drivers because it simply calls drawIndexedTriangleList but
This method was created for making culling debugging easier. It works with is hence not very fast.
all drivers because it does simply a call to drawIndexedTriangleList and
hence is not very fast but it might be useful for further development.
\param box: The axis aligned box to draw \param box: The axis aligned box to draw
\param color: Color to use while drawing the box. */ \param color: Color to use while drawing the box. */
virtual void draw3DBox(const core::aabbox3d<f32>& box, virtual void draw3DBox(const core::aabbox3d<f32>& box,
SColor color = SColor(255,255,255,255)) = 0; SColor color = SColor(255,255,255,255)) = 0;
//! Simply draws a 2d image without any special effects //! Draws a 2d image without any special effects
/** \param texture: Pointer to texture to use. /** \param texture: Pointer to texture to use.
\param destPos: upper left 2d destination position where the image will be drawn. */ \param destPos: upper left 2d destination position where the image will be drawn. */
virtual void draw2DImage(video::ITexture* texture, virtual void draw2DImage(video::ITexture* texture,
...@@ -587,7 +565,7 @@ namespace video ...@@ -587,7 +565,7 @@ namespace video
virtual void deleteAllDynamicLights() = 0; virtual void deleteAllDynamicLights() = 0;
//! Adds a dynamic light. //! Adds a dynamic light.
/** \param light: Data specifing the dynamic light. */ /** \param light: Data specifying the dynamic light. */
virtual void addDynamicLight(const SLight& light) = 0; virtual void addDynamicLight(const SLight& light) = 0;
//! Sets the dynamic ambient light color. //! Sets the dynamic ambient light color.
...@@ -604,7 +582,7 @@ namespace video ...@@ -604,7 +582,7 @@ namespace video
/** \return Current amount of dynamic lights set */ /** \return Current amount of dynamic lights set */
virtual u32 getDynamicLightCount() = 0; virtual u32 getDynamicLightCount() = 0;
//! Returns light data which was previously set with IVideDriver::addDynamicLight(). //! Returns light data which was previously set by IVideoDriver::addDynamicLight().
/** \param idx: Zero based index of the light. Must be greater than 0 and smaller /** \param idx: Zero based index of the light. Must be greater than 0 and smaller
than IVideoDriver()::getDynamicLightCount. than IVideoDriver()::getDynamicLightCount.
\return Light data. */ \return Light data. */
......
...@@ -1737,7 +1737,7 @@ void CD3D9Driver::setAmbientLight(const SColorf& color) ...@@ -1737,7 +1737,7 @@ void CD3D9Driver::setAmbientLight(const SColorf& color)
//! \return Returns the name of the video driver. Example: In case of the DIRECT3D9 //! \return Returns the name of the video driver. Example: In case of the DIRECT3D9
//! driver, it would return "Direct3D9.1". //! driver, it would return "Direct3D9.0".
const wchar_t* CD3D9Driver::getName() const wchar_t* CD3D9Driver::getName()
{ {
return L"Direct3D 9.0"; return L"Direct3D 9.0";
......
...@@ -696,18 +696,25 @@ bool CIrrDeviceWin32::isWindowActive() ...@@ -696,18 +696,25 @@ bool CIrrDeviceWin32::isWindowActive()
//! switchs to fullscreen //! switches to fullscreen
bool CIrrDeviceWin32::switchToFullScreen(s32 width, s32 height, s32 bits) bool CIrrDeviceWin32::switchToFullScreen(s32 width, s32 height, s32 bits)
{ {
DEVMODE dm; DEVMODE dm;
memset(&dm, 0, sizeof(dm)); memset(&dm, 0, sizeof(dm));
dm.dmSize = sizeof(dm); dm.dmSize = sizeof(dm);
// use default values from current setting
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
dm.dmPelsWidth = width; dm.dmPelsWidth = width;
dm.dmPelsHeight = height; dm.dmPelsHeight = height;
dm.dmBitsPerPel = bits; dm.dmBitsPerPel = bits;
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
LONG ret = ChangeDisplaySettings(&dm, CDS_FULLSCREEN); LONG ret = ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
if (ret != DISP_CHANGE_SUCCESSFUL)
{ // try again without forcing display frequency
dm.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
ret = ChangeDisplaySettings(&dm, CDS_FULLSCREEN);
}
switch(ret) switch(ret)
{ {
......
...@@ -38,9 +38,9 @@ CLightSceneNode::~CLightSceneNode() ...@@ -38,9 +38,9 @@ CLightSceneNode::~CLightSceneNode()
//! pre render event //! pre render event
void CLightSceneNode::OnRegisterSceneNode() void CLightSceneNode::OnRegisterSceneNode()
{ {
doLightRecalc (); doLightRecalc();
if (IsVisible ) if (IsVisible)
{ {
SceneManager->registerNodeForRendering(this, ESNRP_LIGHT); SceneManager->registerNodeForRendering(this, ESNRP_LIGHT);
ISceneNode::OnRegisterSceneNode(); ISceneNode::OnRegisterSceneNode();
...@@ -69,8 +69,8 @@ void CLightSceneNode::render() ...@@ -69,8 +69,8 @@ void CLightSceneNode::render()
break; break;
case video::ELT_DIRECTIONAL: case video::ELT_DIRECTIONAL:
driver->draw3DLine(core::vector3df ( 0.f, 0.f, 0.f ), driver->draw3DLine(core::vector3df( 0.f, 0.f, 0.f ),
core::vector3df ( 0.f, 0.f, 0.f ) + (LightData.Position * 10.f ), core::vector3df( 0.f, 0.f, 0.f ) + (LightData.Position * 10.f ),
LightData.DiffuseColor.toSColor() LightData.DiffuseColor.toSColor()
); );
break; break;
...@@ -81,12 +81,12 @@ void CLightSceneNode::render() ...@@ -81,12 +81,12 @@ void CLightSceneNode::render()
} }
//! returns the light data //! sets the light data
void CLightSceneNode::setLightData(const video::SLight& light) void CLightSceneNode::setLightData(const video::SLight& light)
{ {
LightData = light; LightData = light;
ISceneNode::setPosition(light.Position); ISceneNode::setPosition(light.Position);
ISceneNode::updateAbsolutePosition (); ISceneNode::updateAbsolutePosition();
} }
...@@ -111,24 +111,24 @@ void CLightSceneNode::doLightRecalc() ...@@ -111,24 +111,24 @@ void CLightSceneNode::doLightRecalc()
case video::ELT_POINT: case video::ELT_POINT:
{ {
f32 r = LightData.Radius * LightData.Radius * 0.5f; f32 r = LightData.Radius * LightData.Radius * 0.5f;
BBox.MaxEdge.set ( r, r, r ); BBox.MaxEdge.set( r, r, r );
BBox.MinEdge.set ( -r, -r, -r ); BBox.MinEdge.set( -r, -r, -r );
setAutomaticCulling ( scene::EAC_BOX ); setAutomaticCulling( scene::EAC_BOX );
LightData.Position = getAbsolutePosition(); LightData.Position = getAbsolutePosition();
} break; } break;
case video::ELT_DIRECTIONAL: case video::ELT_DIRECTIONAL:
BBox.reset ( 0, 0, 0 ); BBox.reset( 0, 0, 0 );
setAutomaticCulling ( scene::EAC_OFF ); setAutomaticCulling( scene::EAC_OFF );
// misuse Position as direction.. // misuse Position as direction..
LightData.Position = getAbsolutePosition(); LightData.Position = getAbsolutePosition();
LightData.Position.invert(); LightData.Position.invert();
if ( LightData.Position.getLengthSQ() == 0.0 ) if ( LightData.Position.getLengthSQ() == 0.0 )
{ {
LightData.Position.set ( 0.f, -1.f, 0.f ); LightData.Position.set( 0.f, -1.f, 0.f );
os::Printer::log ( "Invalid Directional Light Direction" ); os::Printer::log( "Invalid Directional Light Direction" );
} }
else else
{ {
...@@ -171,8 +171,10 @@ void CLightSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeR ...@@ -171,8 +171,10 @@ void CLightSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeR
//! Creates a clone of this scene node and its children. //! Creates a clone of this scene node and its children.
ISceneNode* CLightSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager) ISceneNode* CLightSceneNode::clone(ISceneNode* newParent, ISceneManager* newManager)
{ {
if (!newParent) newParent = Parent; if (!newParent)
if (!newManager) newManager = SceneManager; newParent = Parent;
if (!newManager)
newManager = SceneManager;
CLightSceneNode* nb = new CLightSceneNode(newParent, CLightSceneNode* nb = new CLightSceneNode(newParent,
newManager, ID, RelativeTranslation, LightData.DiffuseColor, LightData.Radius); newManager, ID, RelativeTranslation, LightData.DiffuseColor, LightData.Radius);
......
...@@ -732,8 +732,9 @@ void CNullDriver::drawStencilShadowVolume(const core::vector3df* triangles, s32 ...@@ -732,8 +732,9 @@ void CNullDriver::drawStencilShadowVolume(const core::vector3df* triangles, s32
//! Fills the stencil shadow with color. After the shadow volume has been drawn //! Fills the stencil shadow with color. After the shadow volume has been drawn
//! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this //! into the stencil buffer using IVideoDriver::drawStencilShadowVolume(), use this
//! to draw the color of the shadow. //! to draw the color of the shadow.
void CNullDriver::drawStencilShadow(bool clearStencilBuffer, video::SColor leftUpEdge, void CNullDriver::drawStencilShadow(bool clearStencilBuffer,
video::SColor rightUpEdge, video::SColor leftDownEdge, video::SColor rightDownEdge) video::SColor leftUpEdge, video::SColor rightUpEdge,
video::SColor leftDownEdge, video::SColor rightDownEdge)
{ {
} }
...@@ -745,7 +746,6 @@ void CNullDriver::deleteAllDynamicLights() ...@@ -745,7 +746,6 @@ void CNullDriver::deleteAllDynamicLights()
} }
//! adds a dynamic light //! adds a dynamic light
void CNullDriver::addDynamicLight(const SLight& light) void CNullDriver::addDynamicLight(const SLight& light)
{ {
...@@ -760,6 +760,7 @@ u32 CNullDriver::getMaximalDynamicLightAmount() ...@@ -760,6 +760,7 @@ u32 CNullDriver::getMaximalDynamicLightAmount()
return 0; return 0;
} }
//! Returns current amount of dynamic lights set //! Returns current amount of dynamic lights set
//! \return Current amount of dynamic lights set //! \return Current amount of dynamic lights set
u32 CNullDriver::getDynamicLightCount() u32 CNullDriver::getDynamicLightCount()
...@@ -767,7 +768,8 @@ u32 CNullDriver::getDynamicLightCount() ...@@ -767,7 +768,8 @@ u32 CNullDriver::getDynamicLightCount()
return Lights.size(); return Lights.size();
} }
//! Returns light data which was previously set with IVideDriver::addDynamicLight().
//! Returns light data which was previously set by IVideoDriver::addDynamicLight().
//! \param idx: Zero based index of the light. Must be greater than 0 and smaller //! \param idx: Zero based index of the light. Must be greater than 0 and smaller
//! than IVideoDriver()::getDynamicLightCount. //! than IVideoDriver()::getDynamicLightCount.
//! \return Light data. //! \return Light data.
...@@ -775,7 +777,7 @@ const SLight& CNullDriver::getDynamicLight(u32 idx) ...@@ -775,7 +777,7 @@ const SLight& CNullDriver::getDynamicLight(u32 idx)
{ {
if ( idx < Lights.size() ) if ( idx < Lights.size() )
return Lights[idx]; return Lights[idx];
else
return *((SLight*)0); return *((SLight*)0);
} }
......
...@@ -1632,7 +1632,6 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh ...@@ -1632,7 +1632,6 @@ void COpenGLDriver::setRenderStates2DMode(bool alpha, bool texture, bool alphaCh
glDisable(GL_BLEND); glDisable(GL_BLEND);
} }
} }
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment