The latest SVN bugs thread

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.
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Re: The latest SVN bugs thread

Post by Ovan »

Plop!

don't know if you forget it, but the following line seem to be missing on COpenGLExtensionHandler.cpp at line 767

case EVDF_PIXEL_SHADER_3_0:
case EVDF_VERTEX_SHADER_3_0:
return Version>=300;

with, the query driver feature seem to work
chronologicaldot
Competition winner
Posts: 688
Joined: Mon Sep 10, 2012 8:51 am

Re: CMeshBuffer append does nothing

Post by chronologicaldot »

Foaly wrote:Hello!

Maybe this is a bad question, but why does append in CMeshBuffer do nothing? Inside is just a comment.
I recently tried to create some auto batching for a project and had to find out (after trying a long time), that it can't work, because the mesh buffer simply ignores it.

Thanks in advance for an answer and maybe a fix?
Delayed answer here.

The CMeshBuffer::append() does nothing because there is no guarantee that the vertex types will be the same (or at least, there wasn't a way to tell when that function was written), so the functionality was removed. However, the workaround is casting your IMeshBuffer to CMeshBuffer and accessing the vertices directly. From there, you can push_back the individual vertices if you have to.

Code: Select all

 
((SMeshBuffer*)mesh->getMeshBuffer(0))->Vertices.push_back( S3DVertex() );
 
Edit: I take that back - it's the other append() that's missing the body. In that case, just use IMeshBuffer::getVertices() and throw them into the other append function.
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

bug reoprt in ios 7.1 iphone 4 and ios simulator 7.1
but I test in Htc android is Good

follows can not show image on a button, because glEnable(GL_SCISSOR_TEST) will wrong

video::ITexture* image;
gui::IGUIButton* btn;
video::IVideoDriver* driver = IrrlichtManager::GetIrrlichtManager()->GetDriver();
gui::IGUIEnvironment* gui = device->getGUIEnvironment();
core::dimension2d<u32> screen = driver->getScreenSize();

#ifdef __APPLE__
image = driver->getTexture((GetBaseAppPath()+"game/ar_up.png").c_str());
btn = gui->addButton(core::rect<int>(85,screen.Height-300,155,screen.Height-230), NULL, GUI_ID_BUTTON_DIR_FORWARD);
btn->setImage(image);
btn->setUseAlphaChannel(true);
btn->setDrawBorder(false);
#endif

//////////////////////////
////////////
//////
fixed in cguibutton::draw()

if (!Pressed)
{
if (DrawBorder)
skin->draw3DButtonPaneStandard(this, AbsoluteRect, &AbsoluteClippingRect);

if (Image)
{
core::position2d<s32> pos = spritePos;
pos.X -= ImageRect.getWidth() / 2;
pos.Y -= ImageRect.getHeight() / 2;

driver->draw2DImage(Image,
ScaleImage? AbsoluteRect :
core::recti(pos, ImageRect.getSize()),
ImageRect,
#ifdef __APPLE__
NULL, //by stone, avoid ios run glEnable(GL_SCISSOR_TEST) bug
#else
&AbsoluteClippingRect,
#endif
0,
UseAlphaChannel);
}
}
else
{
if (DrawBorder)
skin->draw3DButtonPanePressed(this, AbsoluteRect, &AbsoluteClippingRect);

if (PressedImage)
{
core::position2d<s32> pos = spritePos;
pos.X -= PressedImageRect.getWidth() / 2;
pos.Y -= PressedImageRect.getHeight() / 2;

if (Image == PressedImage && PressedImageRect == ImageRect)
{
pos.X += skin->getSize(EGDS_BUTTON_PRESSED_IMAGE_OFFSET_X);
pos.Y += skin->getSize(EGDS_BUTTON_PRESSED_IMAGE_OFFSET_Y);
}

driver->draw2DImage(PressedImage,
ScaleImage? AbsoluteRect :
core::recti(pos, PressedImageRect.getSize()),
PressedImageRect,
#ifdef __APPLE__
NULL, //by stone, avoid ios run glEnable(GL_SCISSOR_TEST) bug
#else
&AbsoluteClippingRect,
#endif
0,
UseAlphaChannel);
}
}
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

bug report on ios 7.1 and android, not fix, if anyone free plz improve it.

in QuakeShaderMenu example have the problem in flame1~9.jpg texture

OGLES1 good
https://picasaweb.google.com/1061855410 ... 9986155154

OGLES2 can not show
https://picasaweb.google.com/1061855410 ... 9792019042

///
in CQuake3ShaderSceneNode::getRenderStage()

else if ( strstr ( Shader->name.c_str(), "flame" ) ||
group->isDefined( "surfaceparm", "water" ) ||
group->isDefined( "sort", "underwater" ) ||
group->isDefined( "sort", "underwater" )
)
{
ret = ESNRP_TRANSPARENT_EFFECT; //here
}

//modify this will show the fire flame texture
ret = ESNRP_TRANSPARENT_EFFECT; -> ret = ESNRP_SOLID;

//
//drawall will render this fire flame
TransparentNodeList.Node->render();


I guess its a TRANSPARENT problem
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

fixed ok

http://forge.opensimulator.org/gf/proje ... &pathrev=3

case 14:
// alphafunc ge128
//blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; //change here
blendfunc.param0 = 0.5f;
blendfunc.isTransparent = 1;
resolved = 1;
break;

//bug report on ios 7.1 and android, not fix, if anyone free plz improve it.
//in QuakeShaderMenu example have the problem in flame1~9.jpg texture
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

Hi feelthat, I've taken a look at the change for alphafunc ge128. My guess so far would be that EMT_TRANSPARENT_ALPHA_CHANNEL is correct - but the shader is wrong. Do you maybe have a format description for the q3 format?
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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

OK, it seems uAlphaRef is not yet used at all in the shader so far (that parameter is needed for this). I think EMT_TRANSPARENT_ALPHA_CHANNEL shouldn't use COGLES2Solid.fsh but an own shader as that parameter doesn't makes sense for other solid's. Maybe also an own callback as COGLES2MaterialSolidCB always does pass that on (thought might not hurt to use that - it does that so far without ill effect it seems).
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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

@feelthat: I've added a new fragment shader for EMT_TRANSPARENT_ALPHA_CHANNEL which will solve the problem in the q3 map. It's not yet 100% correct (can't control alpha-sharpness yet), but works for this case.
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
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

thanks a lot man~~~feel warm

///////////////////////////
//another way is in IQ3Shader.h

inline static void getBlendFunc
{
.
.
.
case 14:
// alphafunc ge128
//blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF; //modify here
blendfunc.param0 = 0.5f;
blendfunc.isTransparent = 1;
resolved = 1;
break;
.
.
.
}

////
in old version of irrlich 2009
http://sourceforge.jp/projects/irrlicht ... Q3Shader.h
they use blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF

in old version of irrlich 2008
http://forge.opensimulator.org/gf/proje ... athrev=140
they use blendfunc.type = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF

CuteAlien wrote:@feelthat: I've added a new fragment shader for EMT_TRANSPARENT_ALPHA_CHANNEL which will solve the problem in the q3 map. It's not yet 100% correct (can't control alpha-sharpness yet), but works for this case.
Last edited by feelthat on Wed Feb 04, 2015 8:08 pm, edited 1 time in total.
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

example from
https://github.com/fatalfeel/proton_sdk ... game/quake
or
7zip extract map-20kdm2.pk3 in irrlicht media

file is
C:\proton_sdk_git\RT3DApp\media\game\quake\scripts\models.shader

content is
models/mapobjects/timlamp/timlamp
{
cull disable
surfaceparm alphashadow
{
map models/mapobjects/timlamp/timlamp.tga
alphaFunc GE128
depthWrite
rgbGen vertex
}
}

CuteAlien wrote:Hi feelthat, I've taken a look at the change for alphafunc ge128. My guess so far would be that EMT_TRANSPARENT_ALPHA_CHANNEL is correct - but the shader is wrong. Do you maybe have a format description for the q3 format?
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

I guess its a .tga problem

use photoshop open tga, it have alpha 1 channel

but png don't have, png is a pure transparent image

CuteAlien wrote:@feelthat: I've added a new fragment shader for EMT_TRANSPARENT_ALPHA_CHANNEL which will solve the problem in the q3 map. It's not yet 100% correct (can't control alpha-sharpness yet), but works for this case.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

@feelthat: Not yet tried your file as you don't say what I should expect from it. Will it show another bug? Or a problem with the bugfix which I've checked in? Please use a little bit more words when discussing problems :-)
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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

@feelthat: I still don't understand you. Do you mean that the fix I added does not work? Or did you not try with that?
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
feelthat
Posts: 194
Joined: Sat Feb 02, 2013 5:27 am

Re: Android Port

Post by feelthat »

I mean you work fine and good fixed the bug!!!
but I use another way fixed the bug too, the way is modify IQ3Shader.h

two way both fixed the bug!!!
CuteAlien wrote:@feelthat: I still don't understand you. Do you mean that the fix I added does not work? Or did you not try with that?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Android Port

Post by CuteAlien »

feelthat wrote:two way both fixed the bug!!!
OK :-)
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