mirror of https://github.com/aap/librw.git
little fixes
This commit is contained in:
parent
4c4b199057
commit
dfe8d1f115
|
@ -526,7 +526,7 @@ setFilterMode(uint32 stage, int32 filter, int32 maxAniso = 1)
|
|||
setActiveTexture(stage);
|
||||
if(natras->autogenMipmap || natras->numLevels > 1){
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterConvMap_MIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_MIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_NoMIP[filter]);
|
||||
}else{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterConvMap_NoMIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_NoMIP[filter]);
|
||||
|
@ -627,7 +627,7 @@ setRasterStage(uint32 stage, Raster *raster)
|
|||
if(natras->filterMode != filter){
|
||||
if(natras->autogenMipmap || natras->numLevels > 1){
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterConvMap_MIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_MIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_NoMIP[filter]);
|
||||
}else{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterConvMap_NoMIP[filter]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterConvMap_NoMIP[filter]);
|
||||
|
|
|
@ -45,7 +45,12 @@ registerUniform(const char *name, UniformType type, int32 num)
|
|||
{
|
||||
int i;
|
||||
i = findUniform(name);
|
||||
if(i >= 0) return i;
|
||||
if(i >= 0){
|
||||
Uniform *u = &uniformRegistry.uniforms[i];
|
||||
assert(u->type == type);
|
||||
assert(u->num == num);
|
||||
return i;
|
||||
}
|
||||
// TODO: print error
|
||||
if(uniformRegistry.numUniforms+1 >= MAX_UNIFORMS){
|
||||
assert(0 && "no space for uniform");
|
||||
|
|
Loading…
Reference in New Issue