Requests

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Requests

Post by Pr3t3nd3r »

1. every GUI element need to have one function what is allowing to change position.

setPosition(rect ....);
//very useful for changing the place where some gui appears

2. IGUIListBox need to have an removeItem function ... to be possble to remove items from list.

3. IGUIListBox need to have some possibility to make scroll from soft...
because adding in it text log or etc ... i want it to scroll automatically so that the last entered line to be visible ...
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

You're right, thanks for posting. But what do you mean with the first point? I don't quite understand.
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

... looked at the code and i the first point is already made .. just the name have induced me to belife it does not exist .. so never mind

I made one function for the driver to allow to draw 2DPixel. I also want to make an function to draw a 'list' of pixels but i haven't found yet a good enought way to past the information .. because the pixels will change and i don't want to use new and delete ...



IVideoDriver.h
//! Draws a 2d point.
virtual void draw2DPoint (const core::position2d<s32>& pointPoz,SColor color = SColor(255,255,255,255)) =0;

CSoftwareDriver.h

//! Draws a 2d point.
virtual void draw2DPoint (const core::position2d<s32>& pointPoz,SColor color = SColor(255,255,255,255))
{
}


COpenGlDriver.h CNullDriver.h CD3D9Driver.h CD3D8Driver.h
//! Draws a 2d point.
virtual void draw2DPoint (const core::position2d<s32>& pointPoz,SColor color = SColor(255,255,255,255));

CNullDriver.cpp
//! Draws a 2d point.
void CNullDriver::draw2DPoint (const core::position2d<s32>& pointPoz,SColor color)
{
}

CD3D9Driver.cpp
//! Draws a 2d point.
void CD3D9Driver::draw2DPoint (const core::position2d<s32>& pointPoz,SColor color)
{
// thanks to Vash TheStampede who sent in his implementation

const s32 xPlus = -(ScreenSize.Width>>1);
const f32 xFact = 1.0f / (ScreenSize.Width>>1);

const s32 yPlus =
ScreenSize.Height-(ScreenSize.Height>>1);
const f32 yFact = 1.0f / (ScreenSize.Height>>1);

vtx[0].Pos.set((f32)(pointPoz.X + xPlus) * xFact,
(f32)(yPlus - pointPoz.Y) * yFact,
0.0f);
vtx[0].Color = color;
vtx[0].TCoords.set(0.0f, 0.0f);

setRenderStates2DMode(color.getAlpha() < 255, false, false);
setTexture(0,0);

setVertexShader(EVT_STANDARD);

pID3DDevice->DrawPrimitiveUP(D3DPT_POINTLIST,
1,
&vtx[0],
sizeof(S3DVertex) );
}


CD3D8Driver.cpp

//! Draws a 2d point.
void CD3D8Driver::draw2DPoint (const core::position2d<s32>& pointPoz,SColor color)
{
// thanks to Vash TheStampede who sent in his implementation

const s32 xPlus = -(ScreenSize.Width>>1);
const f32 xFact = 1.0f / (ScreenSize.Width>>1);

const s32 yPlus =
ScreenSize.Height-(ScreenSize.Height>>1);
const f32 yFact = 1.0f / (ScreenSize.Height>>1);

vtx[0].Pos.set((f32)(pointPoz.X + xPlus) * xFact,
(f32)(yPlus - pointPoz.Y) * yFact,
0.0f);
vtx[0].Color = color;
vtx[0].TCoords.set(0.0f, 0.0f);

setRenderStates2DMode(color.getAlpha() < 255, false, false);
setTexture(0,0);

setVertexShader(EVT_STANDARD);

pID3DDevice->DrawPrimitiveUP(D3DPT_POINTLIST,
1,
&vtx[0],
sizeof(S3DVertex) );
}



COpenGLDriver.cpp

//! Draws a 2d point.
void COpenGLDriver::draw2DPoint (const core::position2d<s32>& pointPoz,SColor color)
{
// thanks to Vash TheStampede who sent in his implementation

setRenderStates2DMode(color.getAlpha() < 255, false, false);
setTexture(0,0);

const s32 xPlus = -(ScreenSize.Width>>1);
const f32 xFact = 1.0f / (ScreenSize.Width>>1);

const s32 yPlus =
ScreenSize.Height-(ScreenSize.Height>>1);
const f32 yFact = 1.0f / (ScreenSize.Height>>1);

core::position2d<f32> npos_start;
npos_start.X = (f32)(pointPoz.X + xPlus) * xFact;
npos_start.Y = (f32)(yPlus - pointPoz.Y) * yFact;


glBegin(GL_POINTS);
glColor4ub(color.getRed(), color.getGreen(),
color.getBlue(),
color.getAlpha());
glVertex2f(npos_start.X, npos_start.Y);
glEnd();
}




And one question.
Why begeining with irrlicht 1.11 you have commented the line
material.ZWriteEnable = false; in
class: ..materialrender_TRANSPARENT_ALPHA_CHANEL
in every material render.h ?

I think that's why the cloud scene node form the project announcemets is not workink ...
Is that fixing any problem with 127 alpha? meybe you should do somethink for the cloud scene node(using png ...) to work too... a diferent render for textures with all alpha ...
(I haven't tested to see if that generate the error ..)
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

niko. .. or anybody else ...who knows how i can fix it ...
can you make back the texture alpha to work ? or tell me how is workink ?

1. In all my tries(with png, system png, irrlicht png) i only full transparency and the object drawn not tranparent at all ... EMT_TRANSPARENT_ALPHA_CHANNEL

i even tried changing the MaterialTypeParam but no result ... is seems that texture transparency is gone ...
now i look at documentation and i see that
EMT_TRANSPARENT_ALPHA_CHANNEL is gone :cry: you only have alpha chanel for transparency more than 128 ...
"
Also, an alpha ref is used, which can be manipulated using SMaterial::MaterialTypeParam. If set to 0, the alpha ref gets its default value which is 0.5f and which means that pixels with an alpha value >127 will be written, others not. "

how i can set the paramerter to use all alpha ? because with out that making good clouds is impossble ... (i think right now i will add a new material to my version ... the old one )

2. load mesh viewer from the release of irrlicht. set material to reflexion and
tadam ...
please tell me what is that ... (i wasn't geting any more when i tried to use it in my program ...)
pr3t3nd3r_guest

Post by pr3t3nd3r_guest »

Image

clowds with verry low alpha ... i can show you with big alpha .. meybe good for grass and trees but not for clouds ...

Reflexions
Image[/url]
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Pr3t3nd3r wrote:1. In all my tries(with png, system png, irrlicht png) i only full transparency and the object drawn not tranparent at all ...
Hm, seems to be a bug. the object should be at least transparent where the alpha channel is not set to opaque. Does it help using 32 bit loading of textures? Maybe this is your problem?
Pr3t3nd3r wrote:2. load mesh viewer from the release of irrlicht. set material to reflexion and
tadam ...
please tell me what is that ... (i wasn't geting any more when i tried to use it in my program ...)
What do you mean? Looks ok for me.
Pr3t3nd3r
Posts: 186
Joined: Tue Feb 08, 2005 6:02 pm
Location: Romania
Contact:

Post by Pr3t3nd3r »

2. lool
Plz
Download OGRE.
And look at reflexions.
The image i pos it dosn't even do reflexion i don't see any sky box reflexcted ...

And if you donload ogre please look at the quality of rendering too.
ThommyE
Posts: 48
Joined: Sun Sep 18, 2005 3:02 pm
Location: germany/badnerlaendle

Post by ThommyE »

Pr3t3nd3r wrote:2. lool
Plz
Download OGRE.
And look at reflexions.
The image i pos it dosn't even do reflexion i don't see any sky box reflexcted ...

And if you donload ogre please look at the quality of rendering too.
not the skybox is reflected .. its the models texture (i guess sphere mapped).
-create a spherical sky-box (nonsense.. use a skysphere^^) ,add it as models texture and you will see a sky
-tried to compile ogre on my lin, no sucsess.. but i could watch the win-demos via wine. impressive but if you write a shader you can have frensel+reflection in irrlicht,too

sry4 beeing too offtopic
athlon2400xp+,geforce4200ti, 0.2Tb hd+64mb extern, 512mb ram, linux FC5 2.6.16-1.2096, 100%gates-free system
Pr3t3nd3r_guest

Post by Pr3t3nd3r_guest »

ogre:
Demo_BSP.exe ... look at that map rendering ... no alien efects, no blur .. even animated textures ...
Demo_Fresnel.exe those reflexion of the sky and objects in the wather ...
Demo_Grass.exe the quality of rendering (you can see than in allmoust every example ...), qulity of light, and the quality of shiness ...

Demo_VolumeTex.exe ... hmmm ...
create a spherical sky-box (nonsense.. use a skysphere^^) ,add it as models texture and you will see a sky
I already tried that on a sphere ... and i see poligons ...
And why do you see 2 mouth 'reflected' on that dwarf? i realy don't belihe he have 2 mouth.

A shader you say ... that will be nice but my video card is only suporting 1.4 ... and the most important think: i don't know how to to them :D

Anybody want to tho a shader like that for pixel per lightning 1.1 ?

And an other think what is hapening with smoth of the models when you create mesh with tangents ? (form 3ds loaded models ...)
Post Reply