Commit f9f665e6 authored by nadro's avatar nadro

- Fixed compilation issues on Linux.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5197 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 6027c802
......@@ -1652,7 +1652,7 @@ IImage* CNullDriver::createImage(ITexture* texture, const core::position2d<s32>&
if (!src)
return 0;
IImage* image = new CImage(texture->getColorFormat(), clamped.getSize());
u8* dst = static_cast<u8*>(image->lock());
u8* dst = static_cast<u8*>(image->getData());
src += clamped.UpperLeftCorner.Y * texture->getPitch() + image->getBytesPerPixel() * clamped.UpperLeftCorner.X;
for (u32 i=0; i<clamped.getHeight(); ++i)
{
......@@ -1660,7 +1660,6 @@ IImage* CNullDriver::createImage(ITexture* texture, const core::position2d<s32>&
src += texture->getPitch();
dst += image->getPitch();
}
image->unlock();
texture->unlock();
return image;
}
......
......@@ -10,6 +10,7 @@
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLCommon.h"
#include "COGLCoreFeature.h"
#include "COGLCoreTexture.h"
#include "COGLCoreCacheHandler.h"
......
......@@ -169,8 +169,6 @@ typedef char GLchar;
#endif
#endif
// Irrlicht's OpenGL version.
#define IRR_OPENGL_VERSION 14
......
......@@ -3,13 +3,11 @@
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "COpenGLDriver.h"
// needed here also because of the create methods' parameters
#include "CNullDriver.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COGLCoreTexture.h"
#include "COGLCoreRenderTarget.h"
#include "os.h"
#include "COpenGLCacheHandler.h"
#include "COpenGLMaterialRenderer.h"
......@@ -17,7 +15,9 @@
#include "COpenGLSLMaterialRenderer.h"
#include "COpenGLNormalMapRenderer.h"
#include "COpenGLParallaxMapRenderer.h"
#include "os.h"
#include "COGLCoreTexture.h"
#include "COGLCoreRenderTarget.h"
#ifdef _IRR_COMPILE_WITH_OSX_DEVICE_
#include "MacOSX/CIrrDeviceMacOSX.h"
......@@ -4397,7 +4397,7 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
u8* pixels = 0;
if (newImage)
pixels = static_cast<u8*>(newImage->lock());
pixels = static_cast<u8*>(newImage->getData());
if (pixels)
{
GLenum tgt=GL_FRONT;
......@@ -4453,7 +4453,6 @@ IImage* COpenGLDriver::createScreenShot(video::ECOLOR_FORMAT format, video::E_RE
if (newImage)
{
newImage->unlock();
if (testGLError() || !pixels)
{
newImage->drop();
......
......@@ -19,9 +19,9 @@ namespace irr
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "CNullDriver.h"
#include "IMaterialRendererServices.h"
#include "COpenGLCommon.h"
#include "CNullDriver.h"
#include "COpenGLExtensionHandler.h"
namespace irr
......
......@@ -2,13 +2,12 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "COpenGLExtensionHandler.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLExtensionHandler.h"
#include "irrString.h"
#include "SMaterial.h" // for MATERIAL_MAX_TEXTURES
#include "SMaterial.h"
#include "fast_atof.h"
namespace irr
......
......@@ -12,7 +12,9 @@
#include "EDriverFeatures.h"
#include "irrTypes.h"
#include "os.h"
#include "COpenGLCommon.h"
#include "COGLCoreFeature.h"
namespace irr
......
......@@ -8,9 +8,10 @@
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "IMaterialRenderer.h"
#include "COpenGLDriver.h"
#include "COpenGLCacheHandler.h"
#include "IMaterialRenderer.h"
namespace irr
{
......
......@@ -2,14 +2,15 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "COpenGLNormalMapRenderer.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLNormalMapRenderer.h"
#include "IGPUProgrammingServices.h"
#include "IShaderConstantSetCallBack.h"
#include "IVideoDriver.h"
#include "os.h"
#include "COpenGLDriver.h"
namespace irr
......
......@@ -6,11 +6,13 @@
#define __C_OPENGL_NORMAL_MAP_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLShaderMaterialRenderer.h"
#include "IShaderConstantSetCallBack.h"
#include "COpenGLShaderMaterialRenderer.h"
namespace irr
{
namespace video
......
......@@ -2,16 +2,17 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "COpenGLParallaxMapRenderer.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLParallaxMapRenderer.h"
#include "COpenGLDriver.h"
#include "IGPUProgrammingServices.h"
#include "IShaderConstantSetCallBack.h"
#include "IVideoDriver.h"
#include "os.h"
#include "COpenGLDriver.h"
namespace irr
{
namespace video
......
......@@ -6,11 +6,13 @@
#define __C_OPENGL_PARALLAX_MAP_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLShaderMaterialRenderer.h"
#include "IShaderConstantSetCallBack.h"
#include "COpenGLShaderMaterialRenderer.h"
namespace irr
{
namespace video
......
......@@ -10,19 +10,22 @@
// After Irrlicht 0.12, Michael Zoech did some improvements to this renderer, I
// merged this into Irrlicht 0.14, thanks to him for his work.
#include "IrrCompileConfig.h"
#include "COpenGLSLMaterialRenderer.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLSLMaterialRenderer.h"
#include "IGPUProgrammingServices.h"
#include "IShaderConstantSetCallBack.h"
#include "IMaterialRendererServices.h"
#include "IVideoDriver.h"
#include "os.h"
#include "COpenGLDriver.h"
#include "COpenGLCacheHandler.h"
#include "COpenGLMaterialRenderer.h"
#include "COGLCoreFeature.h"
namespace irr
{
namespace video
......
......@@ -6,29 +6,8 @@
#define __C_OPENGL_SHADER_LANGUAGE_MATERIAL_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#ifdef _IRR_WINDOWS_API_
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL/gl.h>
#include "glext.h"
#else
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1
#else
#define GL_GLEXT_PROTOTYPES 1
#endif
#if defined(_IRR_OSX_PLATFORM_)
#include <OpenGL/gl.h>
#else
#include <GL/gl.h>
#endif
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#include "glext.h"
#endif
#endif
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "EMaterialTypes.h"
#include "IMaterialRenderer.h"
......@@ -37,6 +16,8 @@
#include "irrArray.h"
#include "irrString.h"
#include "COpenGLCommon.h"
namespace irr
{
namespace video
......
......@@ -2,14 +2,15 @@
// This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h
#include "IrrCompileConfig.h"
#include "COpenGLShaderMaterialRenderer.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "COpenGLShaderMaterialRenderer.h"
#include "IGPUProgrammingServices.h"
#include "IShaderConstantSetCallBack.h"
#include "IVideoDriver.h"
#include "os.h"
#include "COpenGLDriver.h"
#include "COpenGLCacheHandler.h"
#include "COpenGLMaterialRenderer.h"
......
......@@ -6,29 +6,13 @@
#define __C_OPENGL_SHADER_MATERIAL_RENDERER_H_INCLUDED__
#include "IrrCompileConfig.h"
#ifdef _IRR_COMPILE_WITH_OPENGL_
#if defined(_IRR_OPENGL_USE_EXTPOINTER_)
#define GL_GLEXT_LEGACY 1
#else
#define GL_GLEXT_PROTOTYPES 1
#endif
#ifdef _IRR_WINDOWS_API_
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <GL/gl.h>
#elif defined(_IRR_OSX_PLATFORM_)
#include <OpenGL/gl.h>
#elif defined(_IRR_COMPILE_WITH_SDL_DEVICE_)
#define NO_SDL_GLEXT
#include <SDL/SDL_video.h>
#include <SDL/SDL_opengl.h>
#else
#include <GL/gl.h>
#endif
#ifdef _IRR_COMPILE_WITH_OPENGL_
#include "IMaterialRenderer.h"
#include "COpenGLCommon.h"
namespace irr
{
namespace video
......
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