Skip to content

NaFo44/OpenNGL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open NumWorks Grapical Library

This is a C++ app to use on a NumWorks calculator.

// triangles coordinates
Triangle planeTriangles[] = {
    {{0,0,0}, {1,0,0}, {0,1,0}},
    {{1,1,0}, {1,0,0}, {0,1,0}}
};

// new mesh : triangles, triangles count
Mesh planeMesh = { planeTriangles, 2};

// new entity : position, rotation, scale, and pivot point
Entity plane = {
  &planeMesh,
  { { 0,0,0 }, { 0,0,0 }, { 1,1,1 } },
  { 0.0f, 0.0f, 0.0f }
};

void main() {
  while(true) {
    drawObject(plane);
  }
  
  return 0;
}

Keyboard

  • Forward : Toolbox
  • Backward : comma
  • Camera movements : directionnal arrows
  • Go left : OK key
  • Go right : back
  • Go up : backspace
  • Go down : power

Build the app

To build this sample app, you will need to install the embedded ARM toolchain and Node.js. The C SDK for Epsilon apps is shipped as an npm module called nwlink that will automatically be installed at compile time.

brew install numworks/tap/arm-none-eabi-gcc node # Or equivalent on your OS
make

You should now have a target/render.nwa file that you can distribute! Anyone can now install it on their calculator from the NumWorks online uploader.

Run the app locally

To run the app on your development machine, you can use the following command

# Now connect your NumWorks calculator to your computer using the USB cable
make run

About

Tiny 3D rendering engine for Numworks calculators

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published