Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualsuliman

Posted 17 December 2012 - 10:23 AM

removed

#1suliman

Posted 08 October 2012 - 11:25 AM

I use irrlicht engine so i dont manually unit DX. I know they have a forum but its slow and i have asked there but there is no reply.
Also do i really compile the hlsl and if so how do i get a pointer to it?
As far as i understand, it should be in this part:
io::path vsFileName = "Dx_Shader.hlsl";
  io::path psFileName = "Dx_Shader.hlsl";
  if (!driver->queryFeature(video::EVDF_PIXEL_SHADER_2_0))
  {
			    device->getLogger()->log("WARNING: Pixel shaders disabled "\
					    "because of missing driver/hardware support.");
			    psFileName = "";
	    }
	    if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_2_0))
	    {
			    device->getLogger()->log("WARNING: Vertex shaders disabled "\
					    "because of missing driver/hardware support.");
			    vsFileName = "";
	    }
// create materials
    video::IGPUProgrammingServices* gpu = driver->getGPUProgrammingServices();
    s32 newMaterialType = 0;	   
    if (gpu)
    {
		    MyShaderCallBack* mc = new MyShaderCallBack();
		    // create the shaders depending on if the user wanted high level
		    // or low level shaders:
		    if (UseHighLevelShaders)
		    {
				    // create material from high level shaders (hlsl or glsl)
				    newMaterialType = gpu->addHighLevelShaderMaterialFromFiles(
						    vsFileName, "vs_main", video::EVST_VS_2_0,
						    psFileName, "ps_main", video::EPST_PS_2_0,
	   mc, video::EMT_DETAIL_MAP);					   
		    }			   
		    mc->drop();
    }

PARTNERS