173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
# File 'lib/mittsu/renderers/opengl/opengl_state.rb', line 173
def set_polygon_offset(polygon_offset, factor, units)
if @current_polygon_offset != polygon_offset
if polygon_offset
glEnable(GL_POLYGON_OFFSET_FILL)
else
glDisable(GL_POLYGON_OFFSET_FILL)
end
@current_polygon_offset = polygon_offset
end
if polygon_offset && (@current_polygon_offset_factor != factor || @current_polygon_offset_units != units)
glPolygonOffset(factor, units)
@current_polygon_offset_factor = factor
@current_polygon_offset_units = units
end
end
|