forked from Mirrorlandia_minetest/irrlicht
Merging r6128 through r6139 from trunk to ogl-es branch.
Note: I could not merge 2 OSX project files as I'm not sure how to correctly resolve their conflicts. Maybe old version for those files are still OK, as ogl-es branch got updated once before (leaving trunk behind). In case it causes problems I hope someone can send another patch for those 2 files: source/Irrlicht/Irrlicht.xcodeproj/xcshareddata/xcschemes source/Irrlicht/Irrlicht.xcodeproj/project.pbxproj git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6140 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
048aa500b9
commit
8b9947f9f6
@ -9,6 +9,10 @@ Changes in ogl-es (not yet released - will be merged with trunk at some point)
|
|||||||
|
|
||||||
--------------------------
|
--------------------------
|
||||||
Changes in 1.9 (not yet released)
|
Changes in 1.9 (not yet released)
|
||||||
|
- No longer try to set WM_QUIT when using an external Window on Win32.
|
||||||
|
Thx @Marko Mahnic for the patch (https://sourceforge.net/p/irrlicht/bugs/449)
|
||||||
|
- ply meshloader now also supports textures with uv-labels named texture_u/texture_v.
|
||||||
|
Thx @acy for bugreport and test-model (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=4&t=52646)
|
||||||
- Fix potential reading/writing 1 byte behind it's own buffer in PLY loader.
|
- Fix potential reading/writing 1 byte behind it's own buffer in PLY loader.
|
||||||
Thanks @wolfgang for report and patch (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52627&p=305573#p305573)
|
Thanks @wolfgang for report and patch (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52627&p=305573#p305573)
|
||||||
- ICursorControl::isVisible is now always returning the flag set in setVisible.
|
- ICursorControl::isVisible is now always returning the flag set in setVisible.
|
||||||
|
@ -424,12 +424,13 @@ void CDemo::loadSceneData()
|
|||||||
model1->setPosition(core::vector3df(100,40,-80));
|
model1->setPosition(core::vector3df(100,40,-80));
|
||||||
model1->setScale(core::vector3df(2,2,2));
|
model1->setScale(core::vector3df(2,2,2));
|
||||||
model1->setMD2Animation(scene::EMAT_STAND);
|
model1->setMD2Animation(scene::EMAT_STAND);
|
||||||
model1->setMaterialFlag(video::EMF_LIGHTING, false);
|
model1->setMaterialFlag(video::EMF_LIGHTING, true);
|
||||||
|
model1->getMaterial(0).Shininess = 40.f;
|
||||||
model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
|
model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
|
||||||
model1->setMaterialType(video::EMT_SPHERE_MAP);
|
model1->setMaterialType(video::EMT_SPHERE_MAP);
|
||||||
model1->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
|
model1->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
|
||||||
scene::IShadowVolumeSceneNode * shadVol = model1->addShadowVolumeSceneNode();
|
scene::IShadowVolumeSceneNode * shadVol = model1->addShadowVolumeSceneNode();
|
||||||
shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
|
if(shadVol) shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
|
||||||
}
|
}
|
||||||
|
|
||||||
model2 = sm->addAnimatedMeshSceneNode(mesh);
|
model2 = sm->addAnimatedMeshSceneNode(mesh);
|
||||||
@ -443,7 +444,7 @@ void CDemo::loadSceneData()
|
|||||||
model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
|
model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
|
||||||
model2->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
|
model2->setAutomaticCulling(scene::EAC_OFF); // avoid shadows not updating
|
||||||
scene::IShadowVolumeSceneNode * shadVol = model2->addShadowVolumeSceneNode();
|
scene::IShadowVolumeSceneNode * shadVol = model2->addShadowVolumeSceneNode();
|
||||||
shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
|
if (shadVol) shadVol->setOptimization(scene::ESV_NONE); // Sydney has broken shadows otherwise
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ namespace gui
|
|||||||
//! Sets text justification mode
|
//! Sets text justification mode
|
||||||
/** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
|
/** \param horizontal: EGUIA_UPPERLEFT for left justified (default),
|
||||||
EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
|
EGUIA_LOWEERRIGHT for right justified, or EGUIA_CENTER for centered text.
|
||||||
\param vertical: EGUIA_UPPERLEFT to align with top edge,
|
\param vertical: EGUIA_UPPERLEFT to align with top edge (default),
|
||||||
EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text (default). */
|
EGUIA_LOWEERRIGHT for bottom edge, or EGUIA_CENTER for centered text. */
|
||||||
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
|
virtual void setTextAlignment(EGUI_ALIGNMENT horizontal, EGUI_ALIGNMENT vertical) = 0;
|
||||||
|
|
||||||
//! Enables or disables word wrap for using the static text as multiline text control.
|
//! Enables or disables word wrap for using the static text as multiline text control.
|
||||||
|
@ -382,7 +382,9 @@ namespace video
|
|||||||
\param format The color format of the render target. Floating point formats are supported.
|
\param format The color format of the render target. Floating point formats are supported.
|
||||||
\return Pointer to the created texture or 0 if the texture
|
\return Pointer to the created texture or 0 if the texture
|
||||||
could not be created. This pointer should not be dropped. See
|
could not be created. This pointer should not be dropped. See
|
||||||
IReferenceCounted::drop() for more information. */
|
IReferenceCounted::drop() for more information.
|
||||||
|
You may want to remove it from driver texture cache with removeTexture if you no longer need it.
|
||||||
|
*/
|
||||||
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
|
||||||
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
|
||||||
|
|
||||||
@ -1476,7 +1478,7 @@ namespace video
|
|||||||
other flags can be changed, though some might have to effect
|
other flags can be changed, though some might have to effect
|
||||||
in most cases.
|
in most cases.
|
||||||
Please note that you have to enable/disable this effect with
|
Please note that you have to enable/disable this effect with
|
||||||
enableInitMaterial2D(). This effect is costly, as it increases
|
enableMaterial2D(). This effect is costly, as it increases
|
||||||
the number of state changes considerably. Always reset the
|
the number of state changes considerably. Always reset the
|
||||||
values when done.
|
values when done.
|
||||||
\return Material reference which should be altered to reflect
|
\return Material reference which should be altered to reflect
|
||||||
|
@ -633,7 +633,7 @@ namespace core
|
|||||||
return rec;
|
return rec;
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
register u32 x = 0x7F000000 - IR ( p );
|
u32 x = 0x7F000000 - IR ( p );
|
||||||
const f32 r = FR ( x );
|
const f32 r = FR ( x );
|
||||||
return r * (2.0f - p * r);
|
return r * (2.0f - p * r);
|
||||||
*/
|
*/
|
||||||
|
@ -878,7 +878,7 @@ static void executeBlit_TextureBlendColor_16_to_16( const SBlitJob * job )
|
|||||||
f18 src_x = f18_zero;
|
f18 src_x = f18_zero;
|
||||||
for (u32 dx = 0; dx < job->width; ++dx, src_x += wscale)
|
for (u32 dx = 0; dx < job->width; ++dx, src_x += wscale)
|
||||||
{
|
{
|
||||||
register u16 c0 = src[f18_floor(src_x)];
|
u16 c0 = src[f18_floor(src_x)];
|
||||||
if (0 == (c0 & 0x8000))
|
if (0 == (c0 & 0x8000))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -863,9 +863,15 @@ void CIrrDeviceMacOSX::createDriver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Window)
|
if (Window)
|
||||||
|
{
|
||||||
|
[[Window contentView] setWantsBestResolutionOpenGLSurface:NO];
|
||||||
[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:[Window contentView]];
|
[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:[Window contentView]];
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
[(NSView*)CreationParams.WindowId setWantsBestResolutionOpenGLSurface:NO];
|
||||||
[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:(NSView*)CreationParams.WindowId];
|
[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:(NSView*)CreationParams.WindowId];
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef __MAC_10_6
|
#ifndef __MAC_10_6
|
||||||
CGLContextObj CGLContext = (CGLContextObj)[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context CGLContextObj];
|
CGLContextObj CGLContext = (CGLContextObj)[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context CGLContextObj];
|
||||||
|
@ -1399,13 +1399,13 @@ bool CIrrDeviceWin32::present(video::IImage* image, void* windowId, core::rect<s
|
|||||||
|
|
||||||
//! notifies the device that it should close itself
|
//! notifies the device that it should close itself
|
||||||
void CIrrDeviceWin32::closeDevice()
|
void CIrrDeviceWin32::closeDevice()
|
||||||
|
{
|
||||||
|
if (!ExternalWindow)
|
||||||
{
|
{
|
||||||
MSG msg;
|
MSG msg;
|
||||||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
PeekMessage(&msg, NULL, WM_QUIT, WM_QUIT, PM_REMOVE);
|
||||||
if (!ExternalWindow)
|
|
||||||
{
|
|
||||||
DestroyWindow(HWnd);
|
DestroyWindow(HWnd);
|
||||||
const fschar_t* ClassName = __TEXT("CIrrDeviceWin32");
|
const fschar_t* ClassName = __TEXT("CIrrDeviceWin32");
|
||||||
HINSTANCE hInstance = GetModuleHandle(0);
|
HINSTANCE hInstance = GetModuleHandle(0);
|
||||||
|
@ -2910,9 +2910,15 @@ inline void COpenGLExtensionHandler::extGlTextureSubImage2D(GLuint texture, GLen
|
|||||||
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
|
case GL_TEXTURE_CUBE_MAP_POSITIVE_Z:
|
||||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &bound);
|
||||||
break;
|
break;
|
||||||
|
#ifdef GL_VERSION_3_1
|
||||||
case GL_TEXTURE_RECTANGLE:
|
case GL_TEXTURE_RECTANGLE:
|
||||||
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
||||||
break;
|
break;
|
||||||
|
#elif defined(GL_ARB_texture_rectangle)
|
||||||
|
case GL_TEXTURE_RECTANGLE_ARB:
|
||||||
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &bound);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2967,9 +2973,15 @@ inline void COpenGLExtensionHandler::extGlTextureStorage2D(GLuint texture, GLenu
|
|||||||
case GL_TEXTURE_CUBE_MAP:
|
case GL_TEXTURE_CUBE_MAP:
|
||||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP, &bound);
|
||||||
break;
|
break;
|
||||||
|
#ifdef GL_VERSION_3_1
|
||||||
case GL_TEXTURE_RECTANGLE:
|
case GL_TEXTURE_RECTANGLE:
|
||||||
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
||||||
break;
|
break;
|
||||||
|
#elif defined(GL_ARB_texture_rectangle)
|
||||||
|
case GL_TEXTURE_RECTANGLE_ARB:
|
||||||
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &bound);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3206,8 +3218,6 @@ inline void COpenGLExtensionHandler::extGlBindTextures(GLuint first, GLsizei cou
|
|||||||
,GL_TEXTURE_RECTANGLE
|
,GL_TEXTURE_RECTANGLE
|
||||||
#elif defined(GL_ARB_texture_rectangle)
|
#elif defined(GL_ARB_texture_rectangle)
|
||||||
,GL_TEXTURE_RECTANGLE_ARB
|
,GL_TEXTURE_RECTANGLE_ARB
|
||||||
#elif defined(GL_NV_texture_rectangle)
|
|
||||||
,GL_TEXTURE_RECTANGLE_NV
|
|
||||||
#endif
|
#endif
|
||||||
,GL_TEXTURE_CUBE_MAP
|
,GL_TEXTURE_CUBE_MAP
|
||||||
#ifdef GL_VERSION_3_0
|
#ifdef GL_VERSION_3_0
|
||||||
@ -3355,9 +3365,15 @@ inline void COpenGLExtensionHandler::extGlGenerateTextureMipmap(GLuint texture,
|
|||||||
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB, &bound);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef GL_VERSION_3_1
|
||||||
case GL_TEXTURE_RECTANGLE:
|
case GL_TEXTURE_RECTANGLE:
|
||||||
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE, &bound);
|
||||||
break;
|
break;
|
||||||
|
#elif defined(GL_ARB_texture_rectangle)
|
||||||
|
case GL_TEXTURE_RECTANGLE_ARB:
|
||||||
|
glGetIntegerv(GL_TEXTURE_BINDING_RECTANGLE_ARB, &bound);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
os::Printer::log("DevSH would like to ask you what are you doing!!??\n",ELL_ERROR);
|
os::Printer::log("DevSH would like to ask you what are you doing!!??\n",ELL_ERROR);
|
||||||
return;
|
return;
|
||||||
|
@ -302,49 +302,51 @@ bool CPLYMeshFileLoader::readVertex(const SPLYElement &Element, scene::CDynamicM
|
|||||||
for (u32 i=0; i < Element.Properties.size(); ++i)
|
for (u32 i=0; i < Element.Properties.size(); ++i)
|
||||||
{
|
{
|
||||||
E_PLY_PROPERTY_TYPE t = Element.Properties[i].Type;
|
E_PLY_PROPERTY_TYPE t = Element.Properties[i].Type;
|
||||||
|
const core::stringc& name = Element.Properties[i].Name;
|
||||||
|
|
||||||
if (Element.Properties[i].Name == "x")
|
if (name == "x")
|
||||||
vert.Pos.X = getFloat(t);
|
vert.Pos.X = getFloat(t);
|
||||||
else if (Element.Properties[i].Name == "y")
|
else if (name == "y")
|
||||||
vert.Pos.Z = getFloat(t);
|
vert.Pos.Z = getFloat(t);
|
||||||
else if (Element.Properties[i].Name == "z")
|
else if (name == "z")
|
||||||
vert.Pos.Y = getFloat(t);
|
vert.Pos.Y = getFloat(t);
|
||||||
else if (Element.Properties[i].Name == "nx")
|
else if (name == "nx")
|
||||||
{
|
{
|
||||||
vert.Normal.X = getFloat(t);
|
vert.Normal.X = getFloat(t);
|
||||||
result=true;
|
result=true;
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "ny")
|
else if (name == "ny")
|
||||||
{
|
{
|
||||||
vert.Normal.Z = getFloat(t);
|
vert.Normal.Z = getFloat(t);
|
||||||
result=true;
|
result=true;
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "nz")
|
else if (name == "nz")
|
||||||
{
|
{
|
||||||
vert.Normal.Y = getFloat(t);
|
vert.Normal.Y = getFloat(t);
|
||||||
result=true;
|
result=true;
|
||||||
}
|
}
|
||||||
// there isn't a single convention for the UV, some software like Blender or Assimp uses "st" instead of "uv"
|
// There isn't a single convention for the UV, some software like Blender or Assimp uses "st" instead of "uv"
|
||||||
else if (Element.Properties[i].Name == "u" || Element.Properties[i].Name == "s")
|
// Not sure which tool creates texture_u/texture_v, but those exist as well.
|
||||||
|
else if (name == "u" || name == "s" || name == "texture_u")
|
||||||
vert.TCoords.X = getFloat(t);
|
vert.TCoords.X = getFloat(t);
|
||||||
else if (Element.Properties[i].Name == "v" || Element.Properties[i].Name == "t")
|
else if (name == "v" || name == "t" || name == "texture_v")
|
||||||
vert.TCoords.Y = getFloat(t);
|
vert.TCoords.Y = getFloat(t);
|
||||||
else if (Element.Properties[i].Name == "red")
|
else if (name == "red")
|
||||||
{
|
{
|
||||||
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
||||||
vert.Color.setRed(value);
|
vert.Color.setRed(value);
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "green")
|
else if (name == "green")
|
||||||
{
|
{
|
||||||
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
||||||
vert.Color.setGreen(value);
|
vert.Color.setGreen(value);
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "blue")
|
else if (name == "blue")
|
||||||
{
|
{
|
||||||
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
||||||
vert.Color.setBlue(value);
|
vert.Color.setBlue(value);
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "alpha")
|
else if (name == "alpha")
|
||||||
{
|
{
|
||||||
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
u32 value = Element.Properties[i].isFloat() ? (u32)(getFloat(t)*255.0f) : getInt(t);
|
||||||
vert.Color.setAlpha(value);
|
vert.Color.setAlpha(value);
|
||||||
@ -366,14 +368,15 @@ bool CPLYMeshFileLoader::readFace(const SPLYElement &Element, scene::CDynamicMes
|
|||||||
|
|
||||||
for (u32 i=0; i < Element.Properties.size(); ++i)
|
for (u32 i=0; i < Element.Properties.size(); ++i)
|
||||||
{
|
{
|
||||||
if ( (Element.Properties[i].Name == "vertex_indices" ||
|
const SPLYProperty& property = Element.Properties[i];
|
||||||
Element.Properties[i].Name == "vertex_index") && Element.Properties[i].Type == EPLYPT_LIST)
|
if ( (property.Name == "vertex_indices" || property.Name == "vertex_index")
|
||||||
|
&& property.Type == EPLYPT_LIST)
|
||||||
{
|
{
|
||||||
// get count
|
// get count
|
||||||
s32 count = getInt(Element.Properties[i].Data.List.CountType);
|
s32 count = getInt(property.Data.List.CountType);
|
||||||
u32 a = getInt(Element.Properties[i].Data.List.ItemType),
|
u32 a = getInt(property.Data.List.ItemType),
|
||||||
b = getInt(Element.Properties[i].Data.List.ItemType),
|
b = getInt(property.Data.List.ItemType),
|
||||||
c = getInt(Element.Properties[i].Data.List.ItemType);
|
c = getInt(property.Data.List.ItemType);
|
||||||
s32 j = 3;
|
s32 j = 3;
|
||||||
|
|
||||||
mb->getIndexBuffer().push_back(a);
|
mb->getIndexBuffer().push_back(a);
|
||||||
@ -383,19 +386,19 @@ bool CPLYMeshFileLoader::readFace(const SPLYElement &Element, scene::CDynamicMes
|
|||||||
for (; j < count; ++j)
|
for (; j < count; ++j)
|
||||||
{
|
{
|
||||||
b = c;
|
b = c;
|
||||||
c = getInt(Element.Properties[i].Data.List.ItemType);
|
c = getInt(property.Data.List.ItemType);
|
||||||
mb->getIndexBuffer().push_back(a);
|
mb->getIndexBuffer().push_back(a);
|
||||||
mb->getIndexBuffer().push_back(c);
|
mb->getIndexBuffer().push_back(c);
|
||||||
mb->getIndexBuffer().push_back(b);
|
mb->getIndexBuffer().push_back(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (Element.Properties[i].Name == "intensity")
|
else if (property.Name == "intensity")
|
||||||
{
|
{
|
||||||
// todo: face intensity
|
// todo: face intensity
|
||||||
skipProperty(Element.Properties[i]);
|
skipProperty(property);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
skipProperty(Element.Properties[i]);
|
skipProperty(property);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -894,7 +894,7 @@ const sVec4 CBurningVideoDriver::NDCPlane[6+2] =
|
|||||||
|
|
||||||
REALINLINE size_t CBurningVideoDriver::clipToFrustumTest ( const s4DVertex* v ) const
|
REALINLINE size_t CBurningVideoDriver::clipToFrustumTest ( const s4DVertex* v ) const
|
||||||
{
|
{
|
||||||
register size_t flag;
|
size_t flag;
|
||||||
f32 test[8];
|
f32 test[8];
|
||||||
const f32 w = - v->Pos.w;
|
const f32 w = - v->Pos.w;
|
||||||
|
|
||||||
@ -2238,8 +2238,8 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert
|
|||||||
//collect pointer to face vertices
|
//collect pointer to face vertices
|
||||||
VertexCache_get(face);
|
VertexCache_get(face);
|
||||||
|
|
||||||
register size_t clipMask_i;
|
size_t clipMask_i;
|
||||||
register size_t clipMask_o;
|
size_t clipMask_o;
|
||||||
|
|
||||||
clipMask_i = face[0]->flag;
|
clipMask_i = face[0]->flag;
|
||||||
clipMask_o = face[0]->flag;
|
clipMask_o = face[0]->flag;
|
||||||
|
@ -473,9 +473,9 @@ u32 linear_to_srgb_8bit(const float v)
|
|||||||
{
|
{
|
||||||
ieee754 c;
|
ieee754 c;
|
||||||
c.f = v;
|
c.f = v;
|
||||||
const register size_t x = c.u;
|
const size_t x = c.u;
|
||||||
const u32 *table = (u32*)srgb_8bit_to_linear_float;
|
const u32 *table = (u32*)srgb_8bit_to_linear_float;
|
||||||
register u32 y = 0;
|
u32 y = 0;
|
||||||
y += table[y + 128] <= x ? 128 : 0;
|
y += table[y + 128] <= x ? 128 : 0;
|
||||||
y += table[y + 64] <= x ? 64 : 0;
|
y += table[y + 64] <= x ? 64 : 0;
|
||||||
y += table[y + 32] <= x ? 32 : 0;
|
y += table[y + 32] <= x ? 32 : 0;
|
||||||
|
@ -158,7 +158,7 @@ void CTRTextureWire2::renderLine ( const s4DVertex *a,const s4DVertex *b, int re
|
|||||||
if ( dy > dx )
|
if ( dy > dx )
|
||||||
{
|
{
|
||||||
//swap
|
//swap
|
||||||
register s32 t;
|
s32 t;
|
||||||
t = dx;dx=dy;dy=t;
|
t = dx;dx=dy;dy=t;
|
||||||
t = xInc0;xInc0=yInc0;yInc0=t;
|
t = xInc0;xInc0=yInc0;yInc0=t;
|
||||||
#ifdef USE_ZBUFFER
|
#ifdef USE_ZBUFFER
|
||||||
|
@ -599,11 +599,11 @@ REALINLINE tFixPoint imulFix_tex2(const tFixPoint x, const tFixPoint y)
|
|||||||
REALINLINE tFixPoint imulFix_tex4(const tFixPoint x, const tFixPoint y)
|
REALINLINE tFixPoint imulFix_tex4(const tFixPoint x, const tFixPoint y)
|
||||||
{
|
{
|
||||||
#ifdef SOFTWARE_DRIVER_2_32BIT
|
#ifdef SOFTWARE_DRIVER_2_32BIT
|
||||||
register tFixPoint a = (((tFixPointu)x >> 2)*(((tFixPointu)y + FIX_POINT_ONE) >> 2)) >> (tFixPointu)(FIX_POINT_PRE + 2);
|
tFixPoint a = (((tFixPointu)x >> 2)*(((tFixPointu)y + FIX_POINT_ONE) >> 2)) >> (tFixPointu)(FIX_POINT_PRE + 2);
|
||||||
#else
|
#else
|
||||||
register tFixPoint a = (x * (y + FIX_POINT_ONE)) >> (FIX_POINT_PRE + 3);
|
tFixPoint a = (x * (y + FIX_POINT_ONE)) >> (FIX_POINT_PRE + 3);
|
||||||
#endif
|
#endif
|
||||||
register tFixPoint mask = (a - FIXPOINT_COLOR_MAX) >> 31;
|
tFixPoint mask = (a - FIXPOINT_COLOR_MAX) >> 31;
|
||||||
return (a & mask) | (FIXPOINT_COLOR_MAX & ~mask);
|
return (a & mask) | (FIXPOINT_COLOR_MAX & ~mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -624,7 +624,7 @@ REALINLINE tFixPoint imulFix_tex4(const tFixPoint x, const tFixPoint y)
|
|||||||
*/
|
*/
|
||||||
REALINLINE tFixPoint clampfix_maxcolor ( const tFixPoint a)
|
REALINLINE tFixPoint clampfix_maxcolor ( const tFixPoint a)
|
||||||
{
|
{
|
||||||
register tFixPoint c = (a - FIXPOINT_COLOR_MAX) >> 31;
|
tFixPoint c = (a - FIXPOINT_COLOR_MAX) >> 31;
|
||||||
return (a & c) | ( FIXPOINT_COLOR_MAX & ~c);
|
return (a & c) | ( FIXPOINT_COLOR_MAX & ~c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -828,7 +828,7 @@ struct sInternalTexture
|
|||||||
// get video sample plain
|
// get video sample plain
|
||||||
static inline tVideoSample getTexel_plain ( const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty )
|
static inline tVideoSample getTexel_plain ( const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty )
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
|
|
||||||
ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2;
|
ofs = ( ( ty & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2;
|
||||||
ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY );
|
ofs |= ( tx & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY );
|
||||||
@ -842,13 +842,13 @@ inline void getTexel_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b,
|
|||||||
const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty
|
const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
|
|
||||||
ofs = ( ((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2;
|
ofs = ( ((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask ) >> FIX_POINT_PRE ) << t->pitchlog2;
|
||||||
ofs |= ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY );
|
ofs |= ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY );
|
||||||
|
|
||||||
// texel
|
// texel
|
||||||
register tVideoSample t00;
|
tVideoSample t00;
|
||||||
t00 = *((tVideoSample*)( (u8*) t->data + ofs ));
|
t00 = *((tVideoSample*)( (u8*) t->data + ofs ));
|
||||||
|
|
||||||
r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE);
|
r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE);
|
||||||
@ -862,13 +862,13 @@ inline void getTexel_fix(tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b,
|
|||||||
const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty
|
const sInternalTexture* t, const tFixPointu tx, const tFixPointu ty
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
|
|
||||||
ofs = (((ty+ FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
ofs = (((ty+ FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
||||||
ofs |= ((tx+ FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
ofs |= ((tx+ FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
|
|
||||||
// texel
|
// texel
|
||||||
register tVideoSample t00;
|
tVideoSample t00;
|
||||||
t00 = *((tVideoSample*)((u8*)t->data + ofs));
|
t00 = *((tVideoSample*)((u8*)t->data + ofs));
|
||||||
|
|
||||||
a = (t00 & MASK_A) >> (SHIFT_A - FIX_POINT_PRE);
|
a = (t00 & MASK_A) >> (SHIFT_A - FIX_POINT_PRE);
|
||||||
@ -910,7 +910,7 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
#if 0
|
#if 0
|
||||||
if (t->lodFactor > 0)
|
if (t->lodFactor > 0)
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
|
|
||||||
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
||||||
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
@ -932,7 +932,7 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
tFixPointu r11, g11, b11;
|
tFixPointu r11, g11, b11;
|
||||||
|
|
||||||
size_t o0, o1, o2, o3;
|
size_t o0, o1, o2, o3;
|
||||||
register tVideoSample t00;
|
tVideoSample t00;
|
||||||
|
|
||||||
//wraps positive (ignoring negative)
|
//wraps positive (ignoring negative)
|
||||||
o0 = (((ty)& t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
o0 = (((ty)& t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
||||||
@ -961,8 +961,8 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
b11 = (t00 & MASK_B);
|
b11 = (t00 & MASK_B);
|
||||||
|
|
||||||
|
|
||||||
register tFixPointu fracx = tx & FIX_POINT_FRACT_MASK;
|
tFixPointu fracx = tx & FIX_POINT_FRACT_MASK;
|
||||||
register tFixPointu fracy = ty & FIX_POINT_FRACT_MASK;
|
tFixPointu fracy = ty & FIX_POINT_FRACT_MASK;
|
||||||
|
|
||||||
//w00 w01 w10 w11
|
//w00 w01 w10 w11
|
||||||
tFixPointu w[4];
|
tFixPointu w[4];
|
||||||
@ -999,11 +999,11 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
if (tex->lodFactor > 1)
|
if (tex->lodFactor > 1)
|
||||||
{
|
{
|
||||||
//nearest neighbor
|
//nearest neighbor
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
||||||
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & tex->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & tex->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
|
|
||||||
register tVideoSample t00;
|
tVideoSample t00;
|
||||||
t00 = *((tVideoSample*)((u8*)tex->data + ofs));
|
t00 = *((tVideoSample*)((u8*)tex->data + ofs));
|
||||||
|
|
||||||
r = (t00 & MASK_R) >> (SHIFT_R - FIX_POINT_PRE);
|
r = (t00 & MASK_R) >> (SHIFT_R - FIX_POINT_PRE);
|
||||||
@ -1015,8 +1015,8 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
//w00 w01 w10 w11
|
//w00 w01 w10 w11
|
||||||
tFixPointu w[4];
|
tFixPointu w[4];
|
||||||
{
|
{
|
||||||
register tFixPointu fracx = tx & FIX_POINT_FRACT_MASK;
|
tFixPointu fracx = tx & FIX_POINT_FRACT_MASK;
|
||||||
register tFixPointu fracy = ty & FIX_POINT_FRACT_MASK;
|
tFixPointu fracy = ty & FIX_POINT_FRACT_MASK;
|
||||||
w[0] = imulFixu(FIX_POINT_ONE - fracx, FIX_POINT_ONE - fracy);
|
w[0] = imulFixu(FIX_POINT_ONE - fracx, FIX_POINT_ONE - fracy);
|
||||||
w[1] = imulFixu(fracx, FIX_POINT_ONE - fracy);
|
w[1] = imulFixu(fracx, FIX_POINT_ONE - fracy);
|
||||||
w[2] = imulFixu(FIX_POINT_ONE - fracx, fracy);
|
w[2] = imulFixu(FIX_POINT_ONE - fracx, fracy);
|
||||||
@ -1026,7 +1026,7 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
//wraps positive (ignoring negative)
|
//wraps positive (ignoring negative)
|
||||||
tVideoSample t[4];
|
tVideoSample t[4];
|
||||||
{
|
{
|
||||||
register size_t o0, o1, o2, o3;
|
size_t o0, o1, o2, o3;
|
||||||
o0 = (((ty) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
o0 = (((ty) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
||||||
o1 = (((ty + FIX_POINT_ONE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
o1 = (((ty + FIX_POINT_ONE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
||||||
o2 = ((tx)& tex->textureXMask) >> (unsigned)(FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
o2 = ((tx)& tex->textureXMask) >> (unsigned)(FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
@ -1068,7 +1068,7 @@ static REALINLINE void getSample_texture(tFixPoint &a, tFixPoint &r, tFixPoint &
|
|||||||
tFixPointu a11, r11, g11, b11;
|
tFixPointu a11, r11, g11, b11;
|
||||||
|
|
||||||
size_t o0, o1, o2, o3;
|
size_t o0, o1, o2, o3;
|
||||||
register tVideoSample t00;
|
tVideoSample t00;
|
||||||
|
|
||||||
o0 = (((ty)& tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
o0 = (((ty)& tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
||||||
o1 = (((ty + FIX_POINT_ONE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
o1 = (((ty + FIX_POINT_ONE) & tex->textureYMask) >> FIX_POINT_PRE) << tex->pitchlog2;
|
||||||
@ -1142,7 +1142,7 @@ static REALINLINE void getSample_texture(tFixPoint &r, tFixPoint &g, tFixPoint &
|
|||||||
const sInternalTexture* burning_restrict t, const tFixPointu tx, const tFixPointu ty
|
const sInternalTexture* burning_restrict t, const tFixPointu tx, const tFixPointu ty
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
||||||
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
|
|
||||||
@ -1158,7 +1158,7 @@ static REALINLINE void getSample_texture(tFixPoint &a, tFixPoint &r, tFixPoint &
|
|||||||
const sInternalTexture* burning_restrict t, const tFixPointu tx, const tFixPointu ty
|
const sInternalTexture* burning_restrict t, const tFixPointu tx, const tFixPointu ty
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register size_t ofs;
|
size_t ofs;
|
||||||
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
ofs = (((ty + FIX_POINT_ZERO_DOT_FIVE) & t->textureYMask) >> FIX_POINT_PRE) << t->pitchlog2;
|
||||||
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
ofs += ((tx + FIX_POINT_ZERO_DOT_FIVE) & t->textureXMask) >> (FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY);
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<OutputFile>../../bin/Win32-visualstudio/GUIEditor.exe</OutputFile>
|
<OutputFile>../../bin/Win64-visualstudio/GUIEditor.exe</OutputFile>
|
||||||
<AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>..\..\lib\Win64-visualstudio;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
|
Loading…
Reference in New Issue
Block a user