fix guard issue, and remove fallback unneccessary else clause (default shader ill work)
This commit is contained in:
parent
bf658a3d1f
commit
608bf601b8
|
|
@ -2027,11 +2027,12 @@ void rlSetPointSize(float size)
|
||||||
// Get the point drawing size
|
// Get the point drawing size
|
||||||
float rlGetPointSize(void)
|
float rlGetPointSize(void)
|
||||||
{
|
{
|
||||||
|
float size = 1;
|
||||||
#if defined(GRAPHICS_API_OPENGL_11)
|
#if defined(GRAPHICS_API_OPENGL_11)
|
||||||
float size = 0;
|
|
||||||
glGetFloatv(GL_POINT_SIZE, &size);
|
glGetFloatv(GL_POINT_SIZE, &size);
|
||||||
return size;
|
|
||||||
#endif
|
#endif
|
||||||
|
return size;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable line aliasing
|
// Enable line aliasing
|
||||||
|
|
|
||||||
|
|
@ -1484,17 +1484,6 @@ void DrawMesh(Mesh mesh, Material material, Matrix transform)
|
||||||
|
|
||||||
rlSetUniform(material.shader.locs[SHADER_LOC_COLOR_DIFFUSE], values, SHADER_UNIFORM_VEC4, 1);
|
rlSetUniform(material.shader.locs[SHADER_LOC_COLOR_DIFFUSE], values, SHADER_UNIFORM_VEC4, 1);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
float values[4] = {
|
|
||||||
material.maps[MATERIAL_MAP_DIFFUSE].color.r/255.0f,
|
|
||||||
material.maps[MATERIAL_MAP_DIFFUSE].color.g/255.0f,
|
|
||||||
material.maps[MATERIAL_MAP_DIFFUSE].color.b/255.0f,
|
|
||||||
material.maps[MATERIAL_MAP_DIFFUSE].color.a/255.0f
|
|
||||||
};
|
|
||||||
rlSetVertexAttributeDefault(RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR, values, SHADER_ATTRIB_VEC4, 4);
|
|
||||||
rlDisableVertexAttribute(RL_DEFAULT_SHADER_ATTRIB_LOCATION_COLOR);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Upload to shader material.colSpecular (if location available)
|
// Upload to shader material.colSpecular (if location available)
|
||||||
if (material.shader.locs[SHADER_LOC_COLOR_SPECULAR] != -1)
|
if (material.shader.locs[SHADER_LOC_COLOR_SPECULAR] != -1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user