[fixed] adding a set*ShaderConstant int* interface
[fixed] adding a set*ShaderConstant int* interface
While integers were only added in OpenGL 3.0, you need to send ints to set GLSL texture samplers currently.
Having to cast that to float* for Irr means the client code can't use strict aliasing, and is a bit ugly.
Requesting an interface be added that takes int* instead of float*. You should be able to trust the user and send it straight to Driver->extGlUniform1iv if the user says they are ints. It's a fairly straight copy-paste job of the existing setPixelShaderConstant function for GLSL.
Any comments?
Having to cast that to float* for Irr means the client code can't use strict aliasing, and is a bit ugly.
Requesting an interface be added that takes int* instead of float*. You should be able to trust the user and send it straight to Driver->extGlUniform1iv if the user says they are ints. It's a fairly straight copy-paste job of the existing setPixelShaderConstant function for GLSL.
Any comments?
Re: Request for adding a set*ShaderConstant int* interface
Ping. I'm willing to post patches, but please give me a yea/nay.
I also have no Windows in the house, so I can only do the GL implementation.
I also have no Windows in the house, so I can only do the GL implementation.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
Re: Request for adding a set*ShaderConstant int* interface
I second this request
Wouldn't be needed for DX though, integers aren't supported in SM3 shaders, and as far as I know there's no way to use SM4 or SM5 in DX9
Might come in handy for the future though when a decision might be made to include DX10/11 support
Wouldn't be needed for DX though, integers aren't supported in SM3 shaders, and as far as I know there's no way to use SM4 or SM5 in DX9
Might come in handy for the future though when a decision might be made to include DX10/11 support
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Request for adding a set*ShaderConstant int* interface
Yes, that's one where I should have a patch already. Anyway, should be faster if you send in one for this as well.
Re: Request for adding a set*ShaderConstant int* interface
Ping as the holidays are over.
Re: Request for adding a set*ShaderConstant int* interface
Ping on this too. It's working quite well here.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Request for adding a set*ShaderConstant int* interface
Yeah, I know. But these API changes need a second thought, as there are also other data types which may need to be automatically converted. So I'd like to have at least a few minutes to go through the current code, the patch, and the hardware driver APIs to get a better impression of the whole scene. And I didn't have enough time so far. But it will be in 1.8 for sure.
Re: Request for adding a set*ShaderConstant int* interface
It's been two months since the last post, so I thought I wasn't harassing you too muchSo I'd like to have at least a few minutes to go through the current code, the patch, and the hardware driver APIs to get a better impression of the whole scene. And I didn't have enough time so far.
Re: Request for adding a set*ShaderConstant int* interface
Patch which include methods for all drivers (D3D8, D3D9, OGL) is already on a tracker (compatible with trunk r4105). I also improved code style in Cg files ('p' in a methods parameters was replaced by Irrlicht style).
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
Re: Request for adding a set*ShaderConstant int* interface
The Cg 'p' changes are unrelated, a separate patch for those would be better IMHO.
Re: Request for adding a set*ShaderConstant int* interface
Patch is already applied in a trunk
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes