Irrlicht 1.8 beta phase

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: Irrlicht 1.8 beta phase

Post by Nadro »

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
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: Irrlicht 1.8 beta phase

Post by chronologicaldot »

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.

Code: Select all

 
inline s32 sign(const s32& value)
{
return value/abs(value);
}
 
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.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht 1.8 beta phase

Post by CuteAlien »

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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Irrlicht 1.8 beta phase

Post by hybrid »

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.

Code: Select all

 
inline s32 sign(const s32& value)
{
return value/abs(value);
}
 
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.
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...
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht 1.8 beta phase

Post by CuteAlien »

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
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
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Irrlicht 1.8 beta phase

Post by hendu »

It is in C99 and POSIX, for floats, doubles and long doubles: signbit.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht 1.8 beta phase

Post by CuteAlien »

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
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: Irrlicht 1.8 beta phase

Post by zerochen »

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?
Image
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Irrlicht 1.8 beta phase

Post by Granyte »

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?
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Irrlicht 1.8 beta phase

Post by Mel »

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
Granyte
Posts: 850
Joined: Tue Jan 25, 2011 11:07 pm
Contact:

Re: Irrlicht 1.8 beta phase

Post by Granyte »

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
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: Irrlicht 1.8 beta phase

Post by zerochen »

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

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);
    }
 
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: Irrlicht 1.8 beta phase

Post by chronologicaldot »

hybrid 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...
It was written in about five seconds, so I didn't think about it long. XD
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;
}
 
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Irrlicht 1.8 beta phase

Post by CuteAlien »

@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
Post Reply