mirror of https://github.com/axmolengine/axmol.git
Merge remote-tracking branch 'darkdukey/newRenderer' into newRenderer
This commit is contained in:
commit
439adafbcd
|
@ -169,8 +169,7 @@ void LabelAtlas::updateAtlasValues()
|
||||||
quads[i].tr.vertices.x = (float)(i * _itemWidth + _itemWidth);
|
quads[i].tr.vertices.x = (float)(i * _itemWidth + _itemWidth);
|
||||||
quads[i].tr.vertices.y = (float)(_itemHeight);
|
quads[i].tr.vertices.y = (float)(_itemHeight);
|
||||||
quads[i].tr.vertices.z = 0.0f;
|
quads[i].tr.vertices.z = 0.0f;
|
||||||
// Color4B c(_displayedColor.r, _displayedColor.g, _displayedColor.b, _displayedOpacity);
|
Color4B c(_displayedColor.r, _displayedColor.g, _displayedColor.b, _displayedOpacity);
|
||||||
Color4B c(255,255,255,255);
|
|
||||||
quads[i].tl.colors = c;
|
quads[i].tl.colors = c;
|
||||||
quads[i].tr.colors = c;
|
quads[i].tr.colors = c;
|
||||||
quads[i].bl.colors = c;
|
quads[i].bl.colors = c;
|
||||||
|
|
|
@ -33,6 +33,7 @@ void QuadCommand::init(int viewport, int32_t depth, GLuint textureID, GLProgram*
|
||||||
_shader = shader;
|
_shader = shader;
|
||||||
|
|
||||||
if(quadCount > _capacity ) {
|
if(quadCount > _capacity ) {
|
||||||
|
//TODO find a better way to manage quads, current way will result in memory be wasted
|
||||||
// _quad = (V3F_C4B_T2F_Quad*)malloc(sizeof(V3F_C4B_T2F_Quad) * quadCount);
|
// _quad = (V3F_C4B_T2F_Quad*)malloc(sizeof(V3F_C4B_T2F_Quad) * quadCount);
|
||||||
_quad = (V3F_C4B_T2F_Quad*) realloc(_quad, sizeof(*quad) * quadCount );
|
_quad = (V3F_C4B_T2F_Quad*) realloc(_quad, sizeof(*quad) * quadCount );
|
||||||
_capacity = quadCount;
|
_capacity = quadCount;
|
||||||
|
|
Loading…
Reference in New Issue