fogleman / Craft

A simple Minecraft clone written in C using modern OpenGL (shaders).
http://www.michaelfogleman.com/craft/
MIT License
10.39k stars 1.39k forks source link

how to add a sprite in replace of the cursor? #255

Open houcy opened 4 years ago

houcy commented 4 years ago

First of all, thanks for the great 3D project, it's awesome! I'd like to add a sprite, say a boy or robot into the stage to replace the default cursor, so the boy can move and controlled like in minecraft. How to make it? Thanks!

twetzel59 commented 4 years ago

Well, Craft uses GLFW, so you might be able to use this.

Another option could be to render two triangles directly with OpenGL, and texture them with a simple shader, using alpha blending.

I would opt for the first solution since it's native to the library.