Category : textures

I have the following problem: I have a CUDA code that uses texture, for example: texture<unsigned char, 2, cudaReadModeElementType> text; unsigned char a = tex2D(text, cx + lx, cy); So when I use DPCT, I have this output: /* DPCT1059:12: SYCL only supports 4-channel image format. Adjust the code. */ dpct::image_wrapper<unsigned char, 2> text; SO, ..

Read more

I’m using STB to load png and other images. https://github.com/nothings/stb/blob/master/stb_image.h It works with static images. But I don’t know how to load animaged gif. Comment in STB points me to https://gist.github.com/urraka/685d9a6340b26b830d49 But it no longer works. And comments in there are point back to STB to function called stbi_load_gif_from_memory . And STB have function stbi_load_gif_from_memory, ..

Read more

I would like to make a shadow with the same texture png I get a shade that is too black and not transparent https://i.stack.imgur.com/LjqOs.jpg I can’t make a transparent and gray texture Thank you very much! here is the complete program and textures http://xenom.flash.free.fr/Projet%20Shadow.zip if( Shadow==false) { d3ddev->SetRenderState(D3DRS_LIGHTING, TRUE); d3ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); d3ddev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); d3ddev->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); ..

Read more

Hello, I would like to add a draw function to draw a map with texture. I can’t do it. I can’t find a solution. Thanks for your help. thanks again here is all my code : void draw(LPDIRECT3DTEXTURE9 &Texture,float x0,float x1,float y0,float y1) { vertices[0].X=x0; vertices[1].X=x1; vertices[2].X=x0; vertices[3].X=x1; } Thank you very much! here is ..

Read more