goat3dgfx

view src/sdrman.cc @ 9:25b911c7c35c

fixed some line endings fixed the cubemap2.jpg file in examples/cubemap/data which was resized improperly causing seams...
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 18 Nov 2013 04:10:19 +0200
parents
children 7d6b667821cf
line source
1 #include "sdrman.h"
3 ShaderSet vsdrset(GL_VERTEX_SHADER);
4 ShaderSet psdrset(GL_FRAGMENT_SHADER);
6 ShaderProg *get_sdrprog(const char *vname, const char *pname)
7 {
8 Shader *vsdr = vname ? vsdrset.get(vname) : 0;
9 Shader *psdr = pname ? psdrset.get(pname) : 0;
11 if(vname && !vsdr) {
12 return 0;
13 }
14 if(pname && !psdr) {
15 return 0;
16 }
17 if(!vsdr && !psdr) {
18 return 0;
19 }
21 ShaderProg *prog = new ShaderProg;
22 if(!prog->create(vsdr, psdr)) {
23 delete prog;
24 return 0;
25 }
26 return prog;
27 }