This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:orx:tutorials:community:sergeig:hexagongrid [2013/05/09 01:18 (11 years ago)] – [Introduction] sergeig | en:tutorials:shaders:hexagongrid [2020/08/31 08:51 (4 years ago)] (current) – ↷ Links adapted because of a move operation iarwain | ||
---|---|---|---|
Line 5: | Line 5: | ||
This tutorial demonstrates how to generate hex grid using shaders and how to track hexagon tiles based on the screen coordinate (mouse cursor tracking). | This tutorial demonstrates how to generate hex grid using shaders and how to track hexagon tiles based on the screen coordinate (mouse cursor tracking). | ||
- | {{hexagon_grid_tutorial_screenshot.png? | + | {{tutorials: |
The darker hexagon in the left bottom corner of the screenshot above marks the mouse position when screenshot was taken. | The darker hexagon in the left bottom corner of the screenshot above marks the mouse position when screenshot was taken. | ||
- | This tutorial builds on concepts developed in [[en:orx:tutorials:community: | + | This tutorial builds on concepts developed in [[en: |
+ | |||
+ | **__NOTE: | ||
===== Details ===== | ===== Details ===== | ||
Line 40: | Line 42: | ||
orxConfig_PopSection(); | orxConfig_PopSection(); | ||
</ | </ | ||
+ | |||
+ | ==== Visualizing Hexagon Parameters === | ||
+ | |||
+ | The code uses variable names based on the image below: | ||
+ | |||
+ | {{tutorials: | ||
===== Source Code ===== | ===== Source Code ===== | ||
Line 372: | Line 380: | ||
} | } | ||
- | |||
- | #ifdef __orxMSVC__ | ||
- | |||
- | // Here's an example for a console-less program under windows with visual studio | ||
- | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, | ||
- | { | ||
- | // Inits and executes orx | ||
- | orx_WinExecute(Init, | ||
- | | ||
- | // Done! | ||
- | return EXIT_SUCCESS; | ||
- | } | ||
- | |||
- | #endif // __orxMSVC__ | ||
</ | </ |