1 | HSHADER CALL Shader_Create(const char *filename) |
1 | void CALL HGE_Impl::Shader_SetValue(HSHADER shader, const char *varName, float value) |
1 | void CALL HGE_Impl::Shader_SetValue(HSHADER shader, const char *varName, float value) |
1 | sampler2D g_samSrcColor; |
1 | hge->Shader_SetValue(shader1, "g", 3.0f); // Just at the beginning |
And my Shader_SetValue func:
1
2 hge->Shader_SetValue(shader1, "g", 3.0f); // Just at the beginning
// If I put it in RenderFunc game crashes
What is wrong with this code? Thanks!
1 | hge->Shader_SetValue(shader1, "$g", 3.0f); |
1 | void CALL HGE_Impl::Shader_SetValue(HSHADER shader, const char *varName, float value) |
1 | HRESULT result = D3DXCompileShader( file, //filepath |
1 | sampler2D g_samSrcColor; |
1 | sampler2D g_samSrcColor; |
1 | // Create a distortion mesh |

HGE Started..
HGE version: 1.80
Date: 18.12.2010, 04:46:46
Application: HGE Tutorial 04 - Using render targets
OS: Windows 5.1.2600
Memory: 2096236K total, 819344K free
D3D Driver: ati2dvag.dll
Description: ATI Radeon HD 3600 Series
Version: 6.14.10.7008
Mode: 800 x 600 x X8R8G8B8
Sound Device: SoundMAX HD Audio
Sample rate: 44100
Init done.
Gfx_BeginScene: Can't set render target
Gfx_BeginScene: Can't set render target
...
Gfx_BeginScene: Can't set render target
Render target handling changed slightly in DX9. Apparently your updates to DX9 aren't complete.

Do you have a patch file containing your changes?
I'd be more interested in seeing some of the code behind the effect created by that screenshot. I'm assuming its using shaders etc to create the effects in the background.
fantomass said:
I can't run any tutorial (precompiled and compiled on my own), my own project also crashes. It is unable to load any texture. I have WinXP SP3 and GeForce 8600M.
I'm adding shaders to that as we speak. I was trying to determine the way the OGL does similar shaders but its taking a bit longer than expected... would you like what I have in its current state?
fantomass said:as i know DX use hlsl and OGL - glsl o,O
1 | struct Shader_t |
1 | void HGE_Impl::_GfxDone() |
1 | sampler2D BaseTexture; |
1 | float _mask_width = fHGE->Texture_GetWidth(fSpMask.GetTexture(),false); |
It looks like you're new here. If you want to get involved, click one of these buttons!