forked from enlightenment/efl
Fix more wrong migration to Eo4.
The if wasn't using {} so one of the statements was out of the scope of the condition. There was some misindented code.
This commit is contained in:
parent
12d8654f14
commit
b60db90ddc
|
@ -348,14 +348,17 @@ evas_model_load_file_md2(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
|
||||||
|
|
||||||
/* Add a mesh frame. */
|
/* Add a mesh frame. */
|
||||||
evas_canvas3d_mesh_frame_add(mesh, f);
|
evas_canvas3d_mesh_frame_add(mesh, f);
|
||||||
|
|
||||||
/* Allocate vertex buffer for the frame. */
|
/* Allocate vertex buffer for the frame. */
|
||||||
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 0, NULL);
|
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION, 0, NULL);
|
||||||
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
|
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
|
||||||
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
|
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
|
||||||
|
|
||||||
/* Map vertex buffer. */
|
/* Map vertex buffer. */
|
||||||
pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
pos = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
||||||
nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
||||||
tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
||||||
|
|
||||||
stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
||||||
stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
||||||
stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, f, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
||||||
|
|
|
@ -380,14 +380,18 @@ evas_model_load_file_obj(Evas_Canvas3D_Mesh *mesh, Eina_File *file)
|
||||||
stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
stride_pos = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_POSITION);
|
||||||
|
|
||||||
if (counts.existence_of_normal)
|
if (counts.existence_of_normal)
|
||||||
|
{
|
||||||
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
|
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL, 0, NULL);
|
||||||
nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
nor = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
||||||
stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
stride_nor = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_NORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
if (counts.existence_of_tex_point)
|
if (counts.existence_of_tex_point)
|
||||||
|
{
|
||||||
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
|
evas_canvas3d_mesh_frame_vertex_data_copy_set(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, 0, NULL);
|
||||||
tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
tex = (float *)evas_canvas3d_mesh_frame_vertex_data_map(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
||||||
stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
stride_tex = evas_canvas3d_mesh_frame_vertex_stride_get(mesh, 0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD);
|
||||||
|
}
|
||||||
|
|
||||||
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
|
if (stride_pos == 0) stride_pos = sizeof(float) * 3;
|
||||||
if ((counts.existence_of_normal) && (stride_nor == 0))
|
if ((counts.existence_of_normal) && (stride_nor == 0))
|
||||||
|
|
Loading…
Reference in New Issue