Irrlicht 1.8 beta phase
Re: Irrlicht 1.8 beta phase
But when You move this 3 vertices You will also modify original - properly primitives aligned to these verts, so this solution is ok only when verices isn't connected with original - properly primitives - so it's doubled verts for our scenerio (eg. sydney mesh) we can't use this trick.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Irrlicht 1.8 beta phase
Tiny feature request:
It'd be convenient to have an sign function - an inline function in irrmath.h that returns the sign of a passed value.
e.g.
You guys probably know a faster way to do that, but that's the idea.
If there was a function for this already, I didn't happen to notice it.
It'd be convenient to have an sign function - an inline function in irrmath.h that returns the sign of a passed value.
e.g.
Code: Select all
inline s32 sign(const s32& value)
{
return value/abs(value);
}
If there was a function for this already, I didn't happen to notice it.
Re: Irrlicht 1.8 beta phase
Sorry, too late for 1.8 features. We're already working at the release for a few days ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Irrlicht 1.8 beta phase
Standard library provides sgn for these purposes. I hope it was just a joke, taking into account that you blindly divide by zero here and divide at all, where a test for the sign bit would be enough...chronologicaldot wrote:Tiny feature request:
It'd be convenient to have an sign function - an inline function in irrmath.h that returns the sign of a passed value.
e.g.You guys probably know a faster way to do that, but that's the idea.Code: Select all
inline s32 sign(const s32& value) { return value/abs(value); }
If there was a function for this already, I didn't happen to notice it.
Re: Irrlicht 1.8 beta phase
Surprisingly it's not in the standard library (I also thought so, but wanted to check how it handles 0 and couldn't find it).
But here's a page full of people discussion implementations:
http://stackoverflow.com/questions/1903 ... sgn-in-c-c
But here's a page full of people discussion implementations:
http://stackoverflow.com/questions/1903 ... sgn-in-c-c
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Irrlicht 1.8 beta phase
It is in C99 and POSIX, for floats, doubles and long doubles: signbit.
Re: Irrlicht 1.8 beta phase
Guess depends on what is wanted - signbit seems to return 1 for 0. Which certainly beats crashing on 0 ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: Irrlicht 1.8 beta phase
hi,
i dont want to delay the release but is it a bug that the background in example 22 in opengl and dx are different?
i dont want to delay the release but is it a bug that the background in example 22 in opengl and dx are different?
Re: Irrlicht 1.8 beta phase
Is it me or when you have multiple transparent object one in front of the other one or booth of them sudenly lose thier transparency?
Re: Irrlicht 1.8 beta phase
If you have ZWrite enabled for the transparent objects, the closest is the one that will prevail, and thus, no more transparent layers will be added.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
Re: Irrlicht 1.8 beta phase
unless it's enabeled by a bug i don't have zwrite enabeled when i get this issue
and whnat i'm saying is that one of he object clearly lose it's transparent atribute and become opaque even when part of it is over the background it does not aply blending
and whnat i'm saying is that one of he object clearly lose it's transparent atribute and become opaque even when part of it is over the background it does not aply blending
Re: Irrlicht 1.8 beta phase
hi,
if you start example 5 and move the transparent control to the right all ellements become more transparent but it should be more opaque.
this is because no default value is set to all elements
you can change line 236 to this and it will work fine
if you start example 5 and move the transparent control to the right all ellements become more transparent but it should be more opaque.
this is because no default value is set to all elements
you can change line 236 to this and it will work fine
Code: Select all
u32 alpha = env->getSkin()->getColor(EGDC_WINDOW).getAlpha();
// set scrollbar position to alpha value of an arbitrary element
scrollbar->setPos(alpha);
// set same alpha to all elements
for (u32 i=0; i<EGDC_COUNT ; ++i)
{
SColor col = env->getSkin()->getColor((EGUI_DEFAULT_COLOR)i);
col.setAlpha(alpha);
env->getSkin()->setColor((EGUI_DEFAULT_COLOR)i, col);
}
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Irrlicht 1.8 beta phase
It was written in about five seconds, so I didn't think about it long. XDhybrid wrote:I hope it was just a joke, taking into account that you blindly divide by zero here and divide at all, where a test for the sign bit would be enough...
If you guys didn't mention signbit, I'd probably do something like:
Code: Select all
T sign(T val)
{
if ( val >= 0 ) return 1; else return -1;
}
Re: Irrlicht 1.8 beta phase
@zerochen: Thx, example 05 now initialized the slider better.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm