this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'master' of https://github.com/grimfang4/sdl-gpu

+14 -2
+3
include/SDL_gpu.h
··· 1456 1456 /*! Creates and links a shader program with the given shader objects. */ 1457 1457 DECLSPEC Uint32 SDLCALL GPU_LinkShaders(Uint32 shader_object1, Uint32 shader_object2); 1458 1458 1459 + /*! Creates and links a shader program with the given shader objects. */ 1460 + DECLSPEC Uint32 SDLCALL GPU_LinkManyShaders(Uint32 *shader_objects, int count); 1461 + 1459 1462 /*! Deletes a shader object. */ 1460 1463 DECLSPEC void SDLCALL GPU_FreeShader(Uint32 shader_object); 1461 1464
+11 -2
src/SDL_gpu.c
··· 1846 1846 1847 1847 Uint32 GPU_LinkShaders(Uint32 shader_object1, Uint32 shader_object2) 1848 1848 { 1849 + Uint32 shaders[2]; 1850 + shaders[0] = shader_object1; 1851 + shaders[1] = shader_object2; 1852 + return GPU_LinkManyShaders(shaders, 2); 1853 + } 1854 + 1855 + Uint32 GPU_LinkManyShaders(Uint32 *shader_objects, int count) 1856 + { 1849 1857 Uint32 p; 1858 + int i; 1850 1859 1851 1860 if(_gpu_current_renderer == NULL || _gpu_current_renderer->current_context_target == NULL) 1852 1861 return 0; ··· 1856 1865 1857 1866 p = _gpu_current_renderer->impl->CreateShaderProgram(_gpu_current_renderer); 1858 1867 1859 - _gpu_current_renderer->impl->AttachShader(_gpu_current_renderer, p, shader_object1); 1860 - _gpu_current_renderer->impl->AttachShader(_gpu_current_renderer, p, shader_object2); 1868 + for (i = 0; i < count; i++) 1869 + _gpu_current_renderer->impl->AttachShader(_gpu_current_renderer, p, shader_objects[i]); 1861 1870 1862 1871 if(_gpu_current_renderer->impl->LinkShaderProgram(_gpu_current_renderer, p)) 1863 1872 return p;