summaryrefslogtreecommitdiff
path: root/drivers/gles3
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-02-12 22:51:16 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-02-15 08:30:32 -0300
commitd7fd86d51aadda665667c88dca657993f0de14d7 (patch)
tree9efd3db7c491de74a975ef2bf8487051050fcc5c /drivers/gles3
parent9cdd364fc0edee407a65fbef674dcc3bcea378a9 (diff)
-begin of export work, not done yet
-fixes to make scenes exported from godot 2.x work
Diffstat (limited to 'drivers/gles3')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index 2923dfff9f..5980a645fa 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -382,7 +382,7 @@ void RasterizerCanvasGLES3::_draw_gui_primitive(int p_points, const Vector2 *p_v
}
- float b[(2+2+4)];
+ float b[(2+2+4)*4];
for(int i=0;i<p_points;i++) {
@@ -646,7 +646,7 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item,Item *curr
state.canvas_shader.set_uniform(CanvasShaderGLES3::COLOR_TEXPIXEL_SIZE,texpixel_size);
}
- _draw_polygon(polygon->count,polygon->indices.ptr(),polygon->points.ptr(),polygon->uvs.ptr(),polygon->colors.ptr(),polygon->texture,polygon->colors.size()==1);
+ //_draw_polygon(polygon->count,polygon->indices.ptr(),polygon->points.ptr(),polygon->uvs.ptr(),polygon->colors.ptr(),polygon->texture,polygon->colors.size()==1);
} break;
case Item::Command::TYPE_CIRCLE: {
@@ -666,7 +666,7 @@ void RasterizerCanvasGLES3::_canvas_item_render_commands(Item *p_item,Item *curr
indices[i*3+1]=(i+1)%numpoints;
indices[i*3+2]=numpoints;
}
- _draw_polygon(numpoints*3,indices,points,NULL,&circle->color,RID(),true);
+ //_draw_polygon(numpoints*3,indices,points,NULL,&circle->color,RID(),true);
//canvas_draw_circle(circle->indices.size(),circle->indices.ptr(),circle->points.ptr(),circle->uvs.ptr(),circle->colors.ptr(),circle->texture,circle->colors.size()==1);
} break;
case Item::Command::TYPE_TRANSFORM: {
@@ -1459,7 +1459,7 @@ void RasterizerCanvasGLES3::initialize() {
glGenBuffers(1,&data.primitive_quad_buffer);
glBindBuffer(GL_ARRAY_BUFFER,data.primitive_quad_buffer);
- glBufferData(GL_ARRAY_BUFFER,sizeof(float)*2+sizeof(float)*2+sizeof(float)*4,NULL,GL_DYNAMIC_DRAW); //allocate max size
+ glBufferData(GL_ARRAY_BUFFER,(2+2+4)*4*sizeof(float),NULL,GL_DYNAMIC_DRAW); //allocate max size
glBindBuffer(GL_ARRAY_BUFFER,0);