mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-02 02:01:31 +00:00
- moved the surface shader to the backend and the shader source to the resource file.
This commit is contained in:
parent
644b07b718
commit
b83349fe6b
6 changed files with 77 additions and 117 deletions
|
@ -177,3 +177,28 @@ bool PolymostShader::Load(const char * name, const char * vert_prog, const char
|
|||
glUseProgram(0);
|
||||
return true;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
bool SurfaceShader::Load(const char* name, const char* vert_prog, const char* frag_prog)
|
||||
{
|
||||
if (!FShader::Load(name, vert_prog, frag_prog)) return false;
|
||||
|
||||
glUseProgram(hShader);
|
||||
|
||||
int SamplerLoc;
|
||||
SamplerLoc = glGetUniformLocation(hShader, "s_texture");
|
||||
glUniform1i(SamplerLoc, 0);
|
||||
SamplerLoc = glGetUniformLocation(hShader, "s_palette");
|
||||
glUniform1i(SamplerLoc, 1);
|
||||
|
||||
glBindAttribLocation(hShader, 0, "i_vertPos");
|
||||
glBindAttribLocation(hShader, 1, "i_texCoord");
|
||||
|
||||
glUseProgram(0);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue