Merged from 1.4 branch revisions 1272:1279
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1280 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
7818dcbfc0
commit
e7add51880
|
@ -49,6 +49,11 @@ Changes in version 1.5 (... 2008)
|
|||
-------------------------------------------
|
||||
Changes in version 1.4.1 (??? 2008)
|
||||
|
||||
- Fixed clipping of menu, toolbar and combo box GUI elements, reported by greenya
|
||||
- setNotClipped now applies all the way up to the root of the GUI environment, rather than just to the next parent
|
||||
|
||||
- Made new scene managers use the original manager's GUIEnvironment, reported by MasterGod
|
||||
|
||||
- Fixed IGUICheckBox::setEnabled, reported by Dorth
|
||||
|
||||
- Fixed the FollowSpline animator to avoid crashes when only one waypoint is given.
|
||||
|
|
|
@ -24,226 +24,91 @@ using namespace gui;
|
|||
#pragma comment(lib, "Irrlicht.lib")
|
||||
#endif
|
||||
|
||||
gui::IGUIButton *buttonMain;
|
||||
gui::IGUIWindow *windowMain;
|
||||
bool isWindowMinimized = false;
|
||||
|
||||
IrrlichtDevice *device = 0;
|
||||
s32 cnt = 0;
|
||||
IGUIListBox* listbox = 0;
|
||||
|
||||
|
||||
/*
|
||||
The Event Receiver is not only capable of getting keyboard and
|
||||
mouse input events, but also events of the graphical user interface
|
||||
(gui). There are events for almost everything: Button click,
|
||||
Listbox selection change, events that say that a element was hovered
|
||||
and so on. To be able to react to some of these events, we create
|
||||
an event receiver.
|
||||
We only react to gui events, and if it's such an event, we get the
|
||||
id of the caller (the gui element which caused the event) and get
|
||||
the pointer to the gui environment.
|
||||
*/
|
||||
class MyEventReceiver : public IEventReceiver
|
||||
class : public IEventReceiver
|
||||
{
|
||||
public:
|
||||
virtual bool OnEvent(const SEvent& event)
|
||||
{
|
||||
if (event.EventType == EET_GUI_EVENT)
|
||||
{
|
||||
s32 id = event.GUIEvent.Caller->getID();
|
||||
IGUIEnvironment* env = device->getGUIEnvironment();
|
||||
virtual bool OnEvent(const SEvent& event)
|
||||
{
|
||||
static s32 windowHeight;
|
||||
|
||||
switch(event.GUIEvent.EventType)
|
||||
{
|
||||
if (event.EventType==EET_GUI_EVENT)
|
||||
{
|
||||
if (event.GUIEvent.EventType==gui::EGET_BUTTON_CLICKED)
|
||||
{
|
||||
if (event.GUIEvent.Caller==buttonMain)
|
||||
{
|
||||
isWindowMinimized = !isWindowMinimized;
|
||||
|
||||
/*
|
||||
If a scrollbar changed its scroll position, and it is 'our'
|
||||
scrollbar (the one with id 104), then we change the
|
||||
transparency of all gui elements. This is a very easy task:
|
||||
There is a skin object, in which all color settings are stored.
|
||||
We simply go through all colors stored in the skin and change
|
||||
their alpha value.
|
||||
*/
|
||||
case EGET_SCROLL_BAR_CHANGED:
|
||||
if (id == 104)
|
||||
{
|
||||
s32 pos = ((IGUIScrollBar*)event.GUIEvent.Caller)->getPos();
|
||||
|
||||
for (u32 i=0; i<EGDC_COUNT ; ++i)
|
||||
{
|
||||
SColor col = env->getSkin()->getColor((EGUI_DEFAULT_COLOR)i);
|
||||
col.setAlpha(pos);
|
||||
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
rect<s32> pos = windowMain->getRelativePosition();
|
||||
if (isWindowMinimized)
|
||||
{
|
||||
windowHeight = pos.LowerRightCorner.Y - pos.UpperLeftCorner.Y;
|
||||
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + 22;
|
||||
} else {
|
||||
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + windowHeight;
|
||||
}
|
||||
|
||||
/*
|
||||
If a button was clicked, it could be one of 'our'
|
||||
three buttons. If it is the first, we shut down the engine.
|
||||
If it is the second, we create a little window with some
|
||||
text on it. We also add a string to the list box to log
|
||||
what happened. And if it is the third button, we create
|
||||
a file open dialog, and add also this as string to the list box.
|
||||
That's all for the event receiver.
|
||||
*/
|
||||
case EGET_BUTTON_CLICKED:
|
||||
windowMain->setRelativePosition(pos);
|
||||
|
||||
if (id == 101)
|
||||
{
|
||||
device->closeDevice();
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (id == 102)
|
||||
{
|
||||
listbox->addItem(L"Window created");
|
||||
cnt += 30;
|
||||
if (cnt > 200)
|
||||
cnt = 0;
|
||||
return false;
|
||||
}
|
||||
} eventReceiver;
|
||||
|
||||
IGUIWindow* window = env->addWindow(
|
||||
rect<s32>(100 + cnt, 100 + cnt, 300 + cnt, 200 + cnt),
|
||||
false, // modal?
|
||||
L"Test window");
|
||||
|
||||
env->addStaticText(L"Please close me",
|
||||
rect<s32>(35,35,140,50),
|
||||
true, // border?
|
||||
false, // wordwrap?
|
||||
window);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (id == 103)
|
||||
{
|
||||
listbox->addItem(L"File open");
|
||||
env->addFileOpenDialog(L"Please choose a file.");
|
||||
return true;
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
Ok, now for the more interesting part. First, create the
|
||||
Irrlicht device. As in some examples before, we ask the user which
|
||||
driver he wants to use for this example:
|
||||
*/
|
||||
int main()
|
||||
{
|
||||
// ask user for driver
|
||||
|
||||
video::E_DRIVER_TYPE driverType;
|
||||
// irr device and pointers
|
||||
IrrlichtDevice *irrDevice = createDevice(video::EDT_DIRECT3D9);
|
||||
video::IVideoDriver *irrVideo = irrDevice->getVideoDriver();
|
||||
gui::IGUIEnvironment *irrGUI = irrDevice->getGUIEnvironment();
|
||||
|
||||
printf("Please select the driver you want for this example:\n"\
|
||||
" (a) Direct3D 9.0c\n (b) Direct3D 8.1\n (c) OpenGL 1.5\n"\
|
||||
" (d) Software Renderer\n (e) Burning's Software Renderer\n"\
|
||||
" (f) NullDevice\n (otherKey) exit\n\n");
|
||||
irrDevice->setEventReceiver(&eventReceiver);
|
||||
|
||||
char i;
|
||||
std::cin >> i;
|
||||
// gui mass
|
||||
|
||||
buttonMain = irrGUI->addButton(rect<s32>(4,4,100,40), 0, -1, L"CLICK ME");
|
||||
windowMain = irrGUI->addWindow(rect<s32>(40,40,400,400), false, L"Main Window");
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 'a': driverType = video::EDT_DIRECT3D9;break;
|
||||
case 'b': driverType = video::EDT_DIRECT3D8;break;
|
||||
case 'c': driverType = video::EDT_OPENGL; break;
|
||||
case 'd': driverType = video::EDT_SOFTWARE; break;
|
||||
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
|
||||
case 'f': driverType = video::EDT_NULL; break;
|
||||
default: return 1;
|
||||
}
|
||||
irrGUI->addButton(rect<s32>(4,24,100,40), windowMain, -1, L"button");
|
||||
irrGUI->addCheckBox(true, rect<s32>(4,40,100,60), windowMain);
|
||||
irrGUI->addComboBox(rect<s32>(4,60,100,80), windowMain)->addItem(L"item");
|
||||
irrGUI->addEditBox(L"test", rect<s32>(4,80,100,100), true, windowMain);
|
||||
irrGUI->addImage(rect<s32>(4,100,100,120), windowMain);
|
||||
irrGUI->addListBox(rect<s32>(4,120,100,160), windowMain)->addItem(L"item");
|
||||
gui::IGUIContextMenu *m = irrGUI->addMenu(windowMain);
|
||||
m->setMinSize(dimension2di(100,40));
|
||||
m->addItem(L"menuitem1");
|
||||
m->addItem(L"menuitem2");
|
||||
irrGUI->addMeshViewer(rect<s32>(4,160,100,180), windowMain);
|
||||
irrGUI->addScrollBar(true, rect<s32>(4,180,100,200), windowMain);
|
||||
irrGUI->addSpinBox(L"spinbox", rect<s32>(4,200,100,220), windowMain);
|
||||
irrGUI->addStaticText(L"statictext", rect<s32>(4,220,100,240), false, true, windowMain);
|
||||
irrGUI->addTabControl(rect<s32>(120,24,220,64), windowMain);
|
||||
// irrGUI->addTable(rect<s32>(120,80,220,120), windowMain)->addColumn(L"column1");
|
||||
gui::IGUIToolBar *t = irrGUI->addToolBar(windowMain);
|
||||
t->setMinSize(dimension2di(100,80));
|
||||
t->addButton(-1, L"toolbarButton1");
|
||||
t->addButton(-1, L"toolbarButton2");
|
||||
irrGUI->addWindow(rect<s32>(120,150,250,300), false, L"testWindow", windowMain);
|
||||
|
||||
// create device and exit if creation failed
|
||||
// show time!
|
||||
while(irrDevice->run())
|
||||
if (irrDevice->isWindowActive())
|
||||
{
|
||||
irrVideo->beginScene(true, true, video::SColor(0x204060));
|
||||
irrGUI->drawAll();
|
||||
irrVideo->endScene();
|
||||
}
|
||||
|
||||
device = createDevice(driverType, core::dimension2d<s32>(640, 480));
|
||||
// drop time
|
||||
irrDevice->drop();
|
||||
|
||||
if (device == 0)
|
||||
return 1; // could not create selected driver.
|
||||
|
||||
/* The creation was successful, now we set the event receiver and
|
||||
store pointers to the driver and to the gui environment. */
|
||||
|
||||
MyEventReceiver receiver;
|
||||
device->setEventReceiver(&receiver);
|
||||
device->setWindowCaption(L"Irrlicht Engine - User Interface Demo");
|
||||
|
||||
video::IVideoDriver* driver = device->getVideoDriver();
|
||||
IGUIEnvironment* env = device->getGUIEnvironment();
|
||||
|
||||
/*
|
||||
To make the font a little bit nicer, we load an external font
|
||||
and set it as the new default font in the skin.
|
||||
To keep the standard font for tool tip text, we set it to
|
||||
the built-in font.
|
||||
*/
|
||||
|
||||
IGUISkin* skin = env->getSkin();
|
||||
IGUIFont* font = env->getFont("../../media/fonthaettenschweiler.bmp");
|
||||
if (font)
|
||||
skin->setFont(font);
|
||||
|
||||
skin->setFont(env->getBuiltInFont(), EGDF_TOOLTIP);
|
||||
|
||||
/*
|
||||
We add three buttons. The first one closes the engine. The second
|
||||
creates a window and the third opens a file open dialog. The third
|
||||
parameter is the id of the button, with which we can easily identify
|
||||
the button in the event receiver.
|
||||
*/
|
||||
|
||||
env->addButton(rect<s32>(10,240,110,240 + 32), 0, 101, L"Quit", L"Exits Program");
|
||||
env->addButton(rect<s32>(10,280,110,280 + 32), 0, 102, L"New Window", L"Launches a new Window");
|
||||
env->addButton(rect<s32>(10,320,110,320 + 32), 0, 103, L"File Open", L"Opens a file");
|
||||
|
||||
/*
|
||||
Now, we add a static text and a scrollbar, which modifies the
|
||||
transparency of all gui elements. We set the maximum value of
|
||||
the scrollbar to 255, because that's the maximal value for
|
||||
a color value.
|
||||
Then we create an other static text and a list box.
|
||||
*/
|
||||
|
||||
env->addStaticText(L"Transparent Control:", rect<s32>(150,20,350,40), true);
|
||||
IGUIScrollBar* scrollbar = env->addScrollBar(true, rect<s32>(150, 45, 350, 60), 0, 104);
|
||||
scrollbar->setMax(255);
|
||||
|
||||
// set scrollbar position to alpha value of an arbitrary element
|
||||
scrollbar->setPos(env->getSkin()->getColor(EGDC_WINDOW).getAlpha());
|
||||
|
||||
env->addStaticText(L"Logging ListBox:", rect<s32>(50,110,250,130), true);
|
||||
listbox = env->addListBox(rect<s32>(50, 140, 250, 210));
|
||||
env->addEditBox(L"Editable Text", rect<s32>(350, 80, 550, 100));
|
||||
|
||||
// add the engine logo
|
||||
env->addImage(driver->getTexture("../../media/irrlichtlogo2.png"),
|
||||
position2d<int>(10,10));
|
||||
|
||||
|
||||
/*
|
||||
That's all, we only have to draw everything.
|
||||
*/
|
||||
|
||||
while(device->run() && driver)
|
||||
if (device->isWindowActive())
|
||||
{
|
||||
driver->beginScene(true, true, SColor(0,200,200,200));
|
||||
|
||||
env->drawAll();
|
||||
|
||||
driver->endScene();
|
||||
}
|
||||
|
||||
device->drop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
@ -215,12 +215,9 @@ public:
|
|||
if (NoClip)
|
||||
{
|
||||
IGUIElement* p=this;
|
||||
while (p && p->NoClip && p->Parent)
|
||||
p = p->Parent;
|
||||
if (p->Parent)
|
||||
parentAbsoluteClip = p->Parent->AbsoluteClippingRect;
|
||||
else
|
||||
parentAbsoluteClip = p->AbsoluteClippingRect;
|
||||
while (p && p->Parent)
|
||||
p = p->Parent;
|
||||
parentAbsoluteClip = p->AbsoluteClippingRect;
|
||||
}
|
||||
else
|
||||
parentAbsoluteClip = Parent->AbsoluteClippingRect;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2002-2006 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2002-2006 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#ifdef _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
|
||||
|
||||
#include "CBoneSceneNode.h"
|
||||
|
||||
namespace irr
|
||||
|
@ -8,10 +15,9 @@ namespace scene
|
|||
//! constructor
|
||||
CBoneSceneNode::CBoneSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
|
||||
u32 boneIndex, const c8* boneName)
|
||||
: IBoneSceneNode(parent, mgr, id), AnimationMode(EBAM_AUTOMATIC), SkinningSpace(EBSS_LOCAL),
|
||||
BoneIndex(boneIndex), BoneName(boneName)
|
||||
: IBoneSceneNode(parent, mgr, id), BoneIndex(boneIndex), BoneName(boneName),
|
||||
AnimationMode(EBAM_AUTOMATIC), SkinningSpace(EBSS_LOCAL)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,12 +27,14 @@ const c8* CBoneSceneNode::getBoneName() const
|
|||
return BoneName.c_str();
|
||||
}
|
||||
|
||||
|
||||
//! Returns the index of the bone
|
||||
u32 CBoneSceneNode::getBoneIndex() const
|
||||
{
|
||||
return BoneIndex;
|
||||
}
|
||||
|
||||
|
||||
//! Sets the animation mode of the bone. Returns true if successful.
|
||||
bool CBoneSceneNode::setAnimationMode(E_BONE_ANIMATION_MODE mode)
|
||||
{
|
||||
|
@ -34,17 +42,21 @@ bool CBoneSceneNode::setAnimationMode(E_BONE_ANIMATION_MODE mode)
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
//! Gets the current animation mode of the bone
|
||||
E_BONE_ANIMATION_MODE CBoneSceneNode::getAnimationMode() const
|
||||
{
|
||||
return AnimationMode;
|
||||
}
|
||||
|
||||
|
||||
//! returns the axis aligned bounding box of this node
|
||||
const core::aabbox3d<f32>& CBoneSceneNode::getBoundingBox() const
|
||||
{
|
||||
return Box;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
//! Returns the relative transformation of the scene node.
|
||||
core::matrix4 CBoneSceneNode::getRelativeTransformation() const
|
||||
|
@ -53,6 +65,7 @@ core::matrix4 CBoneSceneNode::getRelativeTransformation() const
|
|||
}
|
||||
*/
|
||||
|
||||
|
||||
void CBoneSceneNode::OnAnimate(u32 timeMs)
|
||||
{
|
||||
if (IsVisible)
|
||||
|
@ -112,3 +125,5 @@ void CBoneSceneNode::deserializeAttributes(io::IAttributes* in, io::SAttributeRe
|
|||
} // namespace scene
|
||||
} // namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef __C_BONE_SCENE_NODE_H_INCLUDED__
|
||||
#define __C_BONE_SCENE_NODE_H_INCLUDED__
|
||||
|
||||
|
@ -6,7 +10,6 @@
|
|||
#include "IBoneSceneNode.h"
|
||||
#include "irrString.h"
|
||||
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
|
@ -64,13 +67,13 @@ namespace scene
|
|||
private:
|
||||
void helper_updateAbsolutePositionOfAllChildren(ISceneNode *Node);
|
||||
|
||||
E_BONE_ANIMATION_MODE AnimationMode;
|
||||
E_BONE_SKINNING_SPACE SkinningSpace;
|
||||
|
||||
u32 BoneIndex;
|
||||
core::stringc BoneName;
|
||||
|
||||
core::aabbox3d<f32> Box;
|
||||
|
||||
E_BONE_ANIMATION_MODE AnimationMode;
|
||||
E_BONE_SKINNING_SPACE SkinningSpace;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_COLLADA_WRITER_
|
||||
|
||||
#include "CColladaMeshWriter.h"
|
||||
#include "os.h"
|
||||
#include "IFileSystem.h"
|
||||
|
@ -814,3 +818,5 @@ bool CColladaMeshWriter::hasSecondTextureCoordinates(video::E_VERTEX_TYPE type)
|
|||
} // end namespace
|
||||
} // end namespace
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "CEmptySceneNode.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "ISceneManager.h"
|
||||
|
||||
namespace irr
|
||||
|
|
|
@ -28,6 +28,8 @@ CGUIMenu::CGUIMenu(IGUIEnvironment* environment, IGUIElement* parent,
|
|||
|
||||
Type = EGUIET_MENU;
|
||||
|
||||
setNotClipped(false);
|
||||
|
||||
recalculateSize();
|
||||
}
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void CGUIToolBar::draw()
|
|||
return;
|
||||
|
||||
core::rect<s32> rect = AbsoluteRect;
|
||||
core::rect<s32>* clip = 0;
|
||||
core::rect<s32>* clip = &AbsoluteClippingRect;
|
||||
|
||||
// draw frame
|
||||
skin->draw3DToolBar(this, rect, clip);
|
||||
|
|
|
@ -1052,7 +1052,7 @@ void CIrrDeviceLinux::setResizeAble(bool resize)
|
|||
//! by the gfx adapter.
|
||||
video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
|
||||
{
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_X11_
|
||||
if (!VideoModeList.getVideoModeCount())
|
||||
{
|
||||
bool temporaryDisplay = false;
|
||||
|
@ -1119,6 +1119,7 @@ video::IVideoModeList* CIrrDeviceLinux::getVideoModeList()
|
|||
XCloseDisplay(display);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return &VideoModeList;
|
||||
}
|
||||
|
|
|
@ -15,8 +15,8 @@ namespace scene
|
|||
{
|
||||
|
||||
//! constructor
|
||||
CLightSceneNode::CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
|
||||
const core::vector3df& position, video::SColorf color,f32 radius)
|
||||
CLightSceneNode::CLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
|
||||
const core::vector3df& position, video::SColorf color, f32 radius)
|
||||
: ILightSceneNode(parent, mgr, id, position)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
|
@ -175,7 +175,7 @@ ISceneNode* CLightSceneNode::clone(ISceneNode* newParent, ISceneManager* newMana
|
|||
if (!newManager)
|
||||
newManager = SceneManager;
|
||||
|
||||
CLightSceneNode* nb = new CLightSceneNode(newParent,
|
||||
CLightSceneNode* nb = new CLightSceneNode(newParent,
|
||||
newManager, ID, RelativeTranslation, LightData.DiffuseColor, LightData.Radius);
|
||||
|
||||
nb->cloneMembers(this, newManager);
|
||||
|
|
|
@ -3,12 +3,8 @@
|
|||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "CMeshManipulator.h"
|
||||
#include "IMesh.h"
|
||||
#include "SMesh.h"
|
||||
#include "SMeshBuffer.h"
|
||||
#include "SMeshBufferLightMap.h"
|
||||
#include "SMeshBufferTangents.h"
|
||||
#include "IAnimatedMesh.h"
|
||||
#include "CMeshBuffer.h"
|
||||
#include "SAnimatedMesh.h"
|
||||
#include "os.h"
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#include "COpenGLDriver.h"
|
||||
// needed here also because of the create methods' parameters
|
||||
#include "CNullDriver.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
|
@ -2631,6 +2632,7 @@ void COpenGLDriver::enableClipPlane(u32 index, bool enable)
|
|||
} // end namespace
|
||||
} // end namespace
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -2712,7 +2714,3 @@ IVideoDriver* createOpenGLDriver(const core::dimension2d<s32>& screenSize,
|
|||
} // end namespace
|
||||
} // end namespace
|
||||
|
||||
#endif // _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,12 +6,13 @@
|
|||
#define __C_VIDEO_OPEN_GL_H_INCLUDED__
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
#include "CNullDriver.h"
|
||||
#include "IMaterialRendererServices.h"
|
||||
#include "COpenGLExtensionHandler.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
#if defined(_IRR_WINDOWS_API_)
|
||||
// include windows headers for HWND
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
#include "COpenGLExtensionHandler.h"
|
||||
#include "irrString.h"
|
||||
#include "SMaterial.h" // for MATERIAL_MAX_TEXTURES
|
||||
#include "fast_atof.h"
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_OPENGL_
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
|
|
|
@ -1497,3 +1497,4 @@ inline void COpenGLExtensionHandler::extGlGetBufferPointerv (GLenum target, GLen
|
|||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -2,6 +2,10 @@
|
|||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
|
||||
#include "CQuake3ShaderSceneNode.h"
|
||||
#include "IVideoDriver.h"
|
||||
#include "ICameraSceneNode.h"
|
||||
|
@ -42,12 +46,6 @@ CQuake3ShaderSceneNode::CQuake3ShaderSceneNode(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
CQuake3ShaderSceneNode::~CQuake3ShaderSceneNode ()
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
create single copies
|
||||
*/
|
||||
|
@ -791,3 +789,5 @@ video::SMaterial& CQuake3ShaderSceneNode::getMaterial(u32 i)
|
|||
} // end namespace scene
|
||||
} // end namespace irr
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ public:
|
|||
const quake3::SShader * shader
|
||||
);
|
||||
|
||||
virtual ~CQuake3ShaderSceneNode ();
|
||||
|
||||
virtual void OnRegisterSceneNode();
|
||||
virtual void render();
|
||||
virtual void OnAnimate(u32 timeMs);
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include "ISceneUserDataSerializer.h"
|
||||
#include "IGUIEnvironment.h"
|
||||
#include "IMaterialRenderer.h"
|
||||
#include "IReadFile.h"
|
||||
|
||||
#include "os.h"
|
||||
|
||||
|
@ -174,7 +175,7 @@ CSceneManager::CSceneManager(video::IVideoDriver* driver, io::IFileSystem* fs,
|
|||
if (CursorControl)
|
||||
CursorControl->grab();
|
||||
|
||||
if ( GUIEnvironment )
|
||||
if (GUIEnvironment)
|
||||
GUIEnvironment->grab();
|
||||
|
||||
// create mesh cache if not there already
|
||||
|
@ -405,6 +406,7 @@ ISceneNode* CSceneManager::addQuake3SceneNode(IMeshBuffer* meshBuffer,
|
|||
const quake3::SShader * shader,
|
||||
ISceneNode* parent, s32 id)
|
||||
{
|
||||
#ifdef _IRR_COMPILE_WITH_BSP_LOADER_
|
||||
if ( 0 == shader )
|
||||
return 0;
|
||||
|
||||
|
@ -415,6 +417,9 @@ ISceneNode* CSceneManager::addQuake3SceneNode(IMeshBuffer* meshBuffer,
|
|||
node->drop();
|
||||
|
||||
return node;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
//! adds Volume Lighting Scene Node.
|
||||
|
@ -1642,7 +1647,7 @@ IMeshCache* CSceneManager::getMeshCache()
|
|||
//! Creates a new scene manager.
|
||||
ISceneManager* CSceneManager::createNewSceneManager(bool cloneContent)
|
||||
{
|
||||
CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache);
|
||||
CSceneManager* manager = new CSceneManager(Driver, FileSystem, CursorControl, MeshCache, GUIEnvironment);
|
||||
|
||||
if (cloneContent)
|
||||
manager->cloneMembers(this, manager);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2002-2006 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
// Copyright (C) 2002-2006 Nikolaus Gebhardt
|
||||
// Copyright (C) 2002-2007 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
|
||||
//New skinned mesh
|
||||
|
||||
#ifndef __C_SKINNED_MESH_H_INCLUDED__
|
||||
#define __C_SKINNED_MESH_H_INCLUDED__
|
||||
|
||||
#include "ISkinnedMesh.h"
|
||||
#include "SMeshBuffer.h"
|
||||
#include "S3DVertex.h"
|
||||
#include "irrString.h"
|
||||
#include "matrix4.h"
|
||||
#include "SMeshBuffer.h"
|
||||
#include <quaternion.h>
|
||||
|
||||
#include "ISkinnedMesh.h"
|
||||
#include "quaternion.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
#include "CTRTextureGouraud.h"
|
||||
#include "os.h"
|
||||
|
||||
#ifdef _IRR_COMPILE_WITH_SOFTWARE_
|
||||
|
||||
|
|
|
@ -5,7 +5,23 @@
|
|||
#ifndef __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__
|
||||
#define __C_TRIANGLE_RENDERER_TEXTURE_GOURAUD_H_INCLUDED__
|
||||
|
||||
#include "IrrCompileConfig.h"
|
||||
|
||||
#ifndef _IRR_COMPILE_WITH_SOFTWARE_
|
||||
// forward declarations for create methods
|
||||
namespace irr
|
||||
{
|
||||
namespace video
|
||||
{
|
||||
class ITriangleRenderer;
|
||||
class IZBuffer;
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
#else
|
||||
|
||||
#include "ITriangleRenderer.h"
|
||||
#include "IImage.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
@ -21,7 +37,7 @@ namespace video
|
|||
|
||||
//! destructor
|
||||
virtual ~CTRTextureGouraud();
|
||||
|
||||
|
||||
//! sets a render target
|
||||
virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort);
|
||||
|
||||
|
@ -65,3 +81,5 @@ namespace video
|
|||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -332,11 +332,10 @@ public:
|
|||
RenderTarget->unlock();
|
||||
ZBuffer->unlock();
|
||||
Texture->unlock();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
|
@ -359,3 +358,4 @@ ITriangleRenderer* createTriangleRendererTextureGouraudWire(IZBuffer* zbuffer)
|
|||
|
||||
} // end namespace video
|
||||
} // end namespace irr
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "IGUIFont.h"
|
||||
#include "IFileSystem.h"
|
||||
#include "IReadFile.h"
|
||||
#include "ITextSceneNode.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
|
|
|
@ -11,17 +11,18 @@
|
|||
|
||||
#include "ITerrainSceneNode.h"
|
||||
#include "SMesh.h"
|
||||
#include "IReadFile.h"
|
||||
#include "ITextSceneNode.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace io
|
||||
{
|
||||
class IFileSystem;
|
||||
class IReadFile;
|
||||
}
|
||||
namespace scene
|
||||
{
|
||||
class ITextSceneNode;
|
||||
|
||||
//! A scene node for displaying terrain using the geo mip map algorithm.
|
||||
class CTerrainSceneNode : public ITerrainSceneNode
|
||||
{
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#define __I_TRIANGLE_RENDERER_H_INCLUDED__
|
||||
|
||||
#include "IReferenceCounted.h"
|
||||
#include "IImage.h"
|
||||
#include "S2DVertex.h"
|
||||
#include "rect.h"
|
||||
#include "IZBuffer.h"
|
||||
|
@ -15,6 +14,7 @@ namespace irr
|
|||
{
|
||||
namespace video
|
||||
{
|
||||
class IImage;
|
||||
|
||||
enum ETriangleRenderer
|
||||
{
|
||||
|
@ -35,9 +35,6 @@ namespace video
|
|||
{
|
||||
public:
|
||||
|
||||
//! destructor
|
||||
virtual ~ITriangleRenderer() {};
|
||||
|
||||
//! sets a render target
|
||||
virtual void setRenderTarget(video::IImage* surface, const core::rect<s32>& viewPort) = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue