Commit 6a0d4ea7 authored by hybrid's avatar hybrid

Changed ExposedVideoData to use void* under Windows, fixes problems on 64bit...

Changed ExposedVideoData to use void* under Windows, fixes problems on 64bit systems. Some other 64bit warnings silenced. All changes provided by Kosuha.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1313 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 7b8dbd22
......@@ -100,7 +100,7 @@ namespace video
\param sourceRect: Pointer to a rectangle defining the source rectangle of the area
to be presented. Set to null to present everything. Note: not implemented in all devices.
\return Returns false if failed and true if succeeded. */
virtual bool endScene( s32 windowId = 0, core::rect<s32>* sourceRect=0 ) = 0;
virtual bool endScene( void* windowId=0, core::rect<s32>* sourceRect=0 ) = 0;
//! Queries the features of the driver.
/** Returns true if a feature is available
......
......@@ -36,7 +36,7 @@ struct SExposedVideoData
//! Window handle. Get with for example
//! HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd)
s32 HWnd;
void* HWnd;
} D3D9;
......@@ -50,7 +50,7 @@ struct SExposedVideoData
//! Window handle. Get with for example with:
//! HWND h = reinterpret_cast<HWND>(exposedData.D3D8.HWnd)
s32 HWnd;
void* HWnd;
} D3D8;
......@@ -58,15 +58,15 @@ struct SExposedVideoData
{
//! Private GDI Device Context. Get if for example with:
//! HDC h = reinterpret_cast<HDC>(exposedData.OpenGLWin32.HDc)
s32 HDc;
void* HDc;
//! Permanent Rendering Context. Get if for example with:
//! HGLRC h = reinterpret_cast<HGLRC>(exposedData.OpenGLWin32.HRc)
s32 HRc;
void* HRc;
//! Window handle. Get with for example with:
//! HWND h = reinterpret_cast<HWND>(exposedData.OpenGLWin32.HWnd)
s32 HWnd;
void* HWnd;
} OpenGLWin32;
......
......@@ -469,7 +469,7 @@ bool CD3D8Driver::reset()
//! applications must call this method after performing any rendering. returns false if failed.
bool CD3D8Driver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool CD3D8Driver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
CNullDriver::endScene();
......
......@@ -43,7 +43,7 @@ namespace video
virtual bool beginScene(bool backBuffer, bool zBuffer, SColor color);
//! applications must call this method after performing any rendering. returns false if failed.
virtual bool endScene(s32 windowId=0, core::rect<s32>* sourceRect=0);
virtual bool endScene(void* windowId=0, core::rect<s32>* sourceRect=0);
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const;
......
......@@ -415,7 +415,7 @@ bool CD3D9Driver::initDriver(const core::dimension2d<s32>& screenSize, HWND hwnd
// set exposed data
ExposedData.D3D9.D3D9 = pID3D;
ExposedData.D3D9.D3DDev9 = pID3DDevice;
ExposedData.D3D9.HWnd = reinterpret_cast<s32>(hwnd);
ExposedData.D3D9.HWnd = hwnd;
ResetRenderStates = true;
......@@ -490,7 +490,7 @@ bool CD3D9Driver::beginScene(bool backBuffer, bool zBuffer, SColor color)
//! applications must call this method after performing any rendering. returns false if failed.
bool CD3D9Driver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool CD3D9Driver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
if (DeviceLost)
return false;
......
......@@ -37,7 +37,7 @@ namespace video
virtual bool beginScene(bool backBuffer, bool zBuffer, SColor color);
//! applications must call this method after performing any rendering. returns false if failed.
virtual bool endScene( s32 windowId = 0, core::rect<s32>* sourceRect=0 );
virtual bool endScene( void* windowId=0, core::rect<s32>* sourceRect=0 );
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const;
......
......@@ -894,7 +894,7 @@ void CIrrDeviceLinux::setWindowCaption(const wchar_t* text)
//! presents a surface in the client area
void CIrrDeviceLinux::present(video::IImage* image, s32 windowId, core::rect<s32>* src )
void CIrrDeviceLinux::present(video::IImage* image, void* windowId, core::rect<s32>* src )
{
#ifdef _IRR_COMPILE_WITH_X11_
// this is only necessary for software drivers.
......
......@@ -72,7 +72,7 @@ namespace irr
virtual bool isWindowActive() const;
//! presents a surface in the client area
virtual void present(video::IImage* surface, s32 windowId = 0, core::rect<s32>* src=0 );
virtual void present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 );
//! notifies the device that it should close itself
virtual void closeDevice();
......
......@@ -321,7 +321,7 @@ void CIrrDeviceSDL::setWindowCaption(const wchar_t* text)
//! presents a surface in the client area
void CIrrDeviceSDL::present(video::IImage* surface, s32 windowId, core::rect<s32>* src)
void CIrrDeviceSDL::present(video::IImage* surface, void* windowId, core::rect<s32>* src)
{
SDL_Rect srcClip;
SDL_Surface *sdlSurface = SDL_CreateRGBSurfaceFrom (surface->lock(), surface->getDimension().Width, surface->getDimension().Height, surface->getBitsPerPixel(), surface->getPitch(), surface->getRedMask(), surface->getGreenMask(), surface->getBlueMask(), 0);
......
......@@ -51,7 +51,7 @@ namespace irr
virtual bool isWindowActive() const;
//! presents a surface in the client area
virtual void present(video::IImage* surface, s32 windowId = 0, core::rect<s32>* src=0);
virtual void present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0);
//! notifies the device that it should close itself
virtual void closeDevice();
......
......@@ -606,7 +606,7 @@ void CIrrDeviceWin32::setWindowCaption(const wchar_t* text)
//! presents a surface in the client area
void CIrrDeviceWin32::present(video::IImage* image, s32 windowId, core::rect<s32>* src )
void CIrrDeviceWin32::present(video::IImage* image, void* windowId, core::rect<s32>* src)
{
HWND hwnd = HWnd;
if ( windowId )
......
......@@ -50,7 +50,7 @@ namespace irr
virtual bool isWindowActive() const;
//! presents a surface in the client area
virtual void present(video::IImage* surface, s32 windowId = 0, core::rect<s32>* src=0 );
virtual void present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0);
//! notifies the device that it should close itself
virtual void closeDevice();
......
......@@ -211,7 +211,7 @@ bool CNullDriver::beginScene(bool backBuffer, bool zBuffer, SColor color)
//! applications must call this method after performing any rendering. returns false if failed.
bool CNullDriver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool CNullDriver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
FPSCounter.registerFrame(os::Timer::getRealTime(), PrimitivesDrawn);
updateAllHardwareBuffers();
......
......@@ -45,7 +45,7 @@ namespace video
virtual bool beginScene(bool backBuffer, bool zBuffer, SColor color);
virtual bool endScene( s32 windowId = 0, core::rect<s32>* sourceRect=0 );
virtual bool endScene( void* windowId=0, core::rect<s32>* sourceRect=0 );
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const;
......
......@@ -729,7 +729,7 @@ core::stringc COBJMeshFileLoader::copyLine(const c8* inBuf, const c8* bufEnd)
break;
++ptr;
}
return core::stringc(inBuf, ptr-inBuf+1);
return core::stringc(inBuf, (u32)(ptr-inBuf+1));
}
......
......@@ -147,9 +147,9 @@ bool COpenGLDriver::initDriver(const core::dimension2d<s32>& screenSize,
wglSwapIntervalEXT(vsync ? 1 : 0);
// set exposed data
ExposedData.OpenGLWin32.HDc = reinterpret_cast<s32>(HDc);
ExposedData.OpenGLWin32.HRc = reinterpret_cast<s32>(HRc);
ExposedData.OpenGLWin32.HWnd = reinterpret_cast<s32>(Window);
ExposedData.OpenGLWin32.HDc = HDc;
ExposedData.OpenGLWin32.HRc = HRc;
ExposedData.OpenGLWin32.HWnd = Window;
return true;
}
......@@ -394,7 +394,7 @@ void COpenGLDriver::createMaterialRenderers()
//! presents the rendered scene on the screen, returns false if failed
bool COpenGLDriver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool COpenGLDriver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
CNullDriver::endScene();
......
......@@ -102,7 +102,7 @@ namespace video
virtual bool beginScene(bool backBuffer, bool zBuffer, SColor color);
//! presents the rendered scene on the screen, returns false if failed
virtual bool endScene( s32 windowId, core::rect<s32>* sourceRect=0 );
virtual bool endScene( void* windowId, core::rect<s32>* sourceRect=0 );
//! sets transformation
virtual void setTransform(E_TRANSFORMATION_STATE state, const core::matrix4& mat);
......
......@@ -157,7 +157,7 @@ void CSoftwareDriver::selectRightTriangleRenderer()
//! presents the rendered scene on the screen, returns false if failed
bool CSoftwareDriver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool CSoftwareDriver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
CNullDriver::endScene();
......
......@@ -25,7 +25,7 @@ namespace video
virtual ~CSoftwareDriver();
//! presents the rendered scene on the screen, returns false if failed
virtual bool endScene( s32 windowId = 0, core::rect<s32>* sourceRect=0 );
virtual bool endScene( void* windowId=0, core::rect<s32>* sourceRect=0 );
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const;
......
......@@ -399,7 +399,7 @@ bool CBurningVideoDriver::beginScene(bool backBuffer, bool zBuffer, SColor color
}
//! presents the rendered scene on the screen, returns false if failed
bool CBurningVideoDriver::endScene( s32 windowId, core::rect<s32>* sourceRect )
bool CBurningVideoDriver::endScene( void* windowId, core::rect<s32>* sourceRect )
{
CNullDriver::endScene();
......
......@@ -27,7 +27,7 @@ namespace video
virtual ~CBurningVideoDriver();
//! presents the rendered scene on the screen, returns false if failed
virtual bool endScene( s32 windowId = 0, core::rect<s32>* sourceRect=0 );
virtual bool endScene( void* windowId=0, core::rect<s32>* sourceRect=0 );
//! queries the features of the driver, returns true if feature is available
virtual bool queryFeature(E_VIDEO_DRIVER_FEATURE feature) const;
......
......@@ -26,7 +26,7 @@ namespace video
virtual ~IImagePresenter() {};
//! presents a surface in the client area
virtual void present(video::IImage* surface, s32 windowId=0, core::rect<s32>* src=0 ) = 0;
virtual void present(video::IImage* surface, void* windowId=0, core::rect<s32>* src=0 ) = 0;
};
} // end namespace video
......
......@@ -168,7 +168,7 @@ public:
{
if (*p == '\n')
{
core::stringc str(start, p - start - 1);
core::stringc str(start, (u32)(p - start - 1));
str.trim();
Add(str);
start = p+1;
......@@ -179,7 +179,7 @@ public:
if (p - start > 1)
{
core::stringc str(start, p - start - 1);
core::stringc str(start, (u32)(p - start - 1));
str.trim();
Add(str);
}
......
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