T
threadom
Guest
Hi everyone,
i currently implement a 3D chunk system and i encounter a problem with buffer_get_surface.
Surface is not copied into srcBuff.
i have checked suface is correctly created and filed :
In a global_init file :
In a chunk_texture_writer file :
this morning everything work, but today i added some global (chunk_size, chunk_surface_bytes), after it that seem broken.
i currently implement a 3D chunk system and i encounter a problem with buffer_get_surface.
Surface is not copied into srcBuff.
i have checked suface is correctly created and filed :
In a global_init file :
Code:
global.chunk_size = 512;
global.chunk_surface_bytes = global.chunk_size*2*4;
Code:
surface_reset_target();
var srcBuff = buffer_create(global.chunk_surface_bytes, buffer_grow, 1);
buffer_get_surface(srcBuff, surf, buffer_surface_copy, 0, 0);
var cmpBuff = buffer_compress(srcBuff,0,global.chunk_surface_bytes);
buffer_save(srcBuff,_room_cur+"_"+string(ii)+".dat");
surface_free(surf);