Example usage for com.badlogic.gdx.graphics Color toFloatBits

List of usage examples for com.badlogic.gdx.graphics Color toFloatBits

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics Color toFloatBits.

Prototype

public static float toFloatBits(float r, float g, float b, float a) 

Source Link

Document

Packs the color components into a 32-bit integer with the format ABGR and then converts it to a float.

Usage

From source file:com.gemserk.commons.gdx.graphics.Gdx2dMeshBuilder.java

License:Apache License

public Gdx2dMeshBuilder color(Color color) {
    vertices[vertexIdx + colorOffset] = Color.toFloatBits(color.r, color.g, color.b, color.a);
    return this;
}