[fixed]OpenGL shader callback in Irrlicht 1.8

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
Erelas
Competition winner
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

[fixed]OpenGL shader callback in Irrlicht 1.8

Post by Erelas »

Dear Irrlicht Community,

We're having some problems with OpenGL shader support in the newest Irrlicht release.

We are using this normal map shader for our models:
http://irrlicht.sourceforge.net/forum/v ... hp?t=21186

We tested it with different Irrlicht versions:
  • 1.7.2 = Shader works
  • 1.7.3 = Shader works
  • 1.8 release branch = Does not work
  • trunk = Does not work
A change somewhere between the 1.7.3 and the new 1.8 release broke OpenGL support for this shader. The DirectX9 renderer is working across all versions.

Irrlicht version 1.7.3:
Image

Irrlicht version 1.8:
Image



Source code:
http://db.tt/t5SSRC54

Any ideas? Thanks in advance.

Greetings,
Erelas
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Re: OpenGL renderer in Irrlicht 1.8

Post by Nadro »

Please change:

Code: Select all

int var0 = 0;
services->setPixelShaderConstant("baseMap", (float*) (&var0), 1); //the colormap
int var1 = 1;
services->setPixelShaderConstant("bumpMap", (float*) (&var1), 1); //the normalmap
to:

Code: Select all

int var0 = 0;
services->setPixelShaderConstant("baseMap", &var0, 1); //the colormap
int var1 = 1;
services->setPixelShaderConstant("bumpMap", &var1, 1); //the normalmap
In v1.8 we added int intarface for setPixelShaderConstant method and textures are handled now by this interface.
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Erelas
Competition winner
Posts: 20
Joined: Mon Apr 18, 2011 8:40 am

Re: OpenGL renderer in Irrlicht 1.8

Post by Erelas »

Thank you very much Nadro! That certainly fixed it :D
Post Reply