H4shG3n 0.5.0 hash code generator for Windows and Linux
Started by Bat2K, September 26, 2019, 06:38:21 PM
0 Members and 1 Guest are viewing this topic.
Quote from: Bat2K on September 27, 2019, 09:20:46 AMThank you! Indeed I found the demo I've missed previously. As far as I understood the role of the wideline is to build vertex buffer resulting in line segments with certain thinkness, but in any way to get that thickness in the fragments I either need a proper fs or gs+fs shader.
Quote from: Bat2K on September 27, 2019, 09:20:46 AMI also see one more behavior that make ask a questions (if the rule is "new question - new forum topic" then pls let me know so i will rearrange): when I have a hieararchy of objects (gh_mesh->gh_object.create()->gh_utils.create_line, so i have a mesh with child pivot who has 3 lines attached as children) it looks like gh_object.render(topmost_parent_in_the_hierarchy) renders all the hierarchy at once.Is it the expected behaviour? If so, then how to address the situation when i want to render children with different gpu program - guess there's a material system for that pupose?
Quote from: Bat2K on September 27, 2019, 02:06:04 PMJust one small detail regarding "2 - the custom way" - did you meant "gh_object.render_geometry" instead of "gh_object.render"?
gizmo = gh_object.create()box1 =gh_mesh.create_box(...) box2 =gh_mesh.create_box(...) gh_object.add_child(gizmo, box1)gh_object.add_child(gizmo, box2)
-- You can render all hierarchy in one call:gh_gpu_program.bind(prog)gh_object.render(gizmo)
Quote from: Bat2K on September 27, 2019, 02:06:04 PMEDIT:I doublechecked myself and render_geometry worked for me :)EDIT;
Quote from: Bat2K on September 27, 2019, 02:06:04 PMSmall subquestion - I didn't find any function in the API for getting object bbox, while there's a function to check frustrum/aa bbox collision - which makes me think you have bboxes internally for all the meshes. Do you have a plan (if internally of course you do manage bboxes) to expose those as a part of the API?
gh_object.bounding_volume_update(obj_id)x, y, z = gh_object.bounding_volume_get_size(obj_id)x, y, z, radius = gh_object.bounding_volume_get_center_radius(obj_id)state = gh_camera.frustum_check_object_aa_box(camera, object)state = gh_camera.frustum_check_object_sphere(camera, object)state = gh_camera.frustum_check_sphere(camera, radius, x, y, z)state = gh_camera.frustum_check_point(camera, x, y, z)and maybe:gh_camera.frustum_update(camera)