GLSL error

Stardragon

18-04-2009 21:20:58

I've been getting into shaders lately, out of necessity and not out of choice, and I've been digging through the Ogre.log a bit. I was running my app lately and came across this:


21:25:35: Texture: qgui.button.over.png: Loading 1 faces(PF_A8R8G8B8,78x23x1) with 5 hardware generated mipmaps from Image. Internal format is PF_A8R8G8B8,78x23x1.
21:25:35: Error prior to using GLSL Program Object : invalid enumerantFragment shader(s) linked, vertex shader(s) linked.

21:25:35: Error prior to using GLSL Program Object : invalid enumerantFragment shader(s) linked, vertex shader(s) linked.

21:25:35: Error prior to using GLSL Program Object : invalid enumerantFragment shader(s) linked, vertex shader(s) linked.

...

I just thought I'd mention it... I'm not quite sure what's going on there, but I do know it doesn't look good.

kungfoomasta

19-04-2009 19:25:05

Hm, I see this also, but don't know what it means. Its also important to note that these error message do not occur with use of the d3d render system plugin. The shader programs I use to draw are the same as RBGUI's, I really have no understanding of shaders. (although I wish I did)

Stardragon

20-04-2009 03:04:55

Mmm... I'd noticed that it only appears under OpenGL rendering, as well.

And I'd prefer to use DX as well, but for some reason the shadowcasting doesn't seem to work. *puzzled*

kungfoomasta

20-04-2009 07:14:13

I don't know if this is related, but in QuickGUI I had to make a default Ogre::Pass object, and apply it before rendering the GUI, otherwise the GUI would be rendered using the previously applied pass. I didn't realize this until my scenes had shadows, and all the textures became blackened. Probably not related..

Stardragon

23-04-2009 14:46:57

Don't know. Although you wouldn't have expected that to happen.

I'm going to ask here, because the two things are related --- Have you had a chance to ask about or dig into this fault? Because this is what's slowing down the OpenGL render of the GUI, not the Ogre team pushing DirectX. (Sorry, guys. :oops: )

And, since lighting doesn't seem to work properly on my machine under DirectX, I'm stuck with OpenGL :?

kungfoomasta

23-04-2009 16:57:17

I made a post on it here:

http://www.ogre3d.org/forums/viewtopic.php?f=5&t=49483

If you have any additional information to add, please do. Hopefully somebody who understands that error message can help us.

Stardragon

23-04-2009 17:57:12

I found this post over at GameDev.net... I don't know if it's any use: http://www.gamedev.net/community/forums/topic.asp?topic_id=483148

EDIT: Also this one on the Ogre boards: http://www.ogre3d.org/forums/viewtopic.php?p=308651

kungfoomasta

23-04-2009 18:38:12

Interesting. I haven't yet updated to 1.6.1, I need to do that and see if the messages are gone, since it fixed it for some. It sounds like a card/driver issue, if some people have it and some don't. Either way its greatly outside the scope of QuickGUI.. :P

Stardragon

23-04-2009 21:10:10

Well, I'm on 1.6.2 and it hasn't been fixed. We'll see what the great experts on the main forum have to say.

I do have another problem, though... one of my icons has disappeared. :? And it's a recent thing, too: certainly since the last update of QuickGUI... *peers meaningfully*

Across the top of my game screen I have a HUD which shows the threat state and the player's energy as a series of icons across the screen. It's in base 3 (don't ask: it does make sense): a tree icon represents 1 unit, a boulder icon 2 units and a robot icon 3 units. There are 20 icons in the HUD. Here's the init code:


win_desc->widget_dimensions=QuickGUI::Rect(0, 0, width, height);
win_desc->widget_dragable=false;
win_desc->widget_inheritOpacity=false;
win_desc->window_titleBar=false;
windows[5]=gui_sheet->createWindow(win_desc);
windows[5]->setResizeFromAllSides(false);
windows[5]->setName("game_hud");
windows[5]->setSkinType("empty");

int yp=height/16;

QuickGUI::Image* image;
image=windows[5]->createImage(QuickGUI::Rect(0, 0, width, yp));
image->setSkinType("Grey");
image->setRelativeOpacity(1);

for(int i=0; i<20; i++)
{
int xp=(i*((width-(width/20))/20));

icons[i]=windows[5]->createImage(QuickGUI::Rect(xp, 1, (width-(width/20))/21, yp-1));
icons[i]->setSkinType("Tree");
icons[i]->setVisible(true);
icons[i]->setRelativeOpacity(1);
}

image=windows[5]->createImage(QuickGUI::Rect((width-(width/20)), 1, (width/20), yp-1));
image->setName("warning_light");
image->setSkinType("warning_blue");

That worked fine, up until yesterday. Now, the icon[0] is missing. I've done tests and stepped through in debug, but it's not being drawn.

kungfoomasta

23-04-2009 23:35:26

This is by design, the first Image never gets drawn. jk.

It doesn't really make sense that all but one image would get drawn. What is "(width-(width/20))/21"? Also its important to note that the size of a window also includes the thickness of its borders. If you wanted more accuracy, you should base measurements from the client dimensions.

Rect clientDimensions = windows[5]->getClientDimensions();

Also I don't believe Windows can inherit transparency, since they are their own texture. RelativeOpacity is set to 1 by default.

What is icons[0]'s position/size?