mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-20 18:28:15 +00:00
[rmodels] More performant point cloud rendering with DrawModelPoints()
(#4203)
* Added the ability to draw a model as a point cloud * Added example to demonstrate drawing a model as a point cloud * polished the demo a bit * picture for example * adhere to conventions for example * update png to match aspect ratio * minor changes * address code convention comments * added point rendering to makefiles * added point rendering to readme and renumbered examples * comment formatting --------- Co-authored-by: Reese Gallagher <re325479@ucf.edu.com> Co-authored-by: Ray <raysan5@gmail.com>
This commit is contained in:
@@ -3631,6 +3631,30 @@ void DrawModelWiresEx(Model model, Vector3 position, Vector3 rotationAxis, float
|
||||
rlDisableWireMode();
|
||||
}
|
||||
|
||||
// Draw a model points
|
||||
void DrawModelPoints(Model model, Vector3 position, float scale, Color tint)
|
||||
{
|
||||
rlEnablePointMode();
|
||||
rlDisableBackfaceCulling();
|
||||
|
||||
DrawModel(model, position, scale, tint);
|
||||
|
||||
rlEnableBackfaceCulling();
|
||||
rlDisableWireMode();
|
||||
}
|
||||
|
||||
// Draw a model points
|
||||
void DrawModelPointsEx(Model model, Vector3 position, Vector3 rotationAxis, float rotationAngle, Vector3 scale, Color tint)
|
||||
{
|
||||
rlEnablePointMode();
|
||||
rlDisableBackfaceCulling();
|
||||
|
||||
DrawModelEx(model, position, rotationAxis, rotationAngle, scale, tint);
|
||||
|
||||
rlEnableBackfaceCulling();
|
||||
rlDisableWireMode();
|
||||
}
|
||||
|
||||
// Draw a billboard
|
||||
void DrawBillboard(Camera camera, Texture2D texture, Vector3 position, float scale, Color tint)
|
||||
{
|
||||
|
Reference in New Issue
Block a user