opengl Xojo300 21There are many impressive games that have been created with OpenGL, such as Doom3, Counter-Strike, various Medal of Honor, Need for Speed and many others. This book will provide you with the basics to start your own OpenGL core projects on Xojo. Watch the video clip below!

OpenGL is one of the few standards for creating a powerful software interface. There is a great deal of reusable code and material on the internet that can be adapted to Xojo.

This book builds a strong foundation on programming graphics. This is an advanced graphics book and it is highly recommended to understand the Xojo programming language first. An intermediate book called "I Wish I Knew How to... Program the Canvas Control with Xojo Desktop" is a good book to study and understand before learning OpenGL. Examples in this book have been created and tested on the Windows 11 operating systems. This book is focused on 64-bit programming. Much of the code works with a game-loop to provide smooth graphics and animation. Below are a few video's of examples that are included in this book. These examples are currently 64-bit and are for Windows OS only.

Purchase the book!

 Here is a Youtube teaser video of some of the programs.


 Required plugins that are included with the book:

  • GLFWXojoPlugin.xojo_plugin (Creates an OpenGL high-performance graphics window). The coding prefix is GLFWSS.
  • OpenGLXojoPlugin.xojo_plugin (OpenGL 2.1 methods and constants). The coding prefix is GLSS.
  •  WinXojoPlugin.xojo_plugin (Windows API performance code). The coding prefix is WinSS.

Plugin installation instructions

  • Copy the three plugins located in the Plugin folder in the book
  • Paste the plugins in the Xojo plugin folder. In Xojo 2022r3.2 the folder is located at C:\Program Files\Xojo\Xojo 2022r3.2\Plugins\
  • Close all Xojo programs and restart Xojo to have access to the plugins.
  • Use the plugin methods and constants within Xojo for programming. If OpenGL has code with glPushMatrix, then the Xojo plugin code is GLSS.glPushMatrix.

Examples include:

  1. Many primitives (quads, triangles, etc.)
  2. Fundamentals of colours
  3. Movement and rotation
  4. Points
  5. Starting a graph and chart
  6. Beginning lighting
  7. Lots of texturing
  8. Blender models
  9. Transparency
  10. Camera viewing
  11. An introductory understanding of threads
  12. Collision detection
  13. Xojo Blocks game
  14. Keyboard and mouse callback
  15. This book includes 3-plugins: 1) OpenGL 2.1, 2) GLFW, 3) Some Windows API calls
  16. ...and more 

There are over 500 pages with 22 chapters and more than 80 example programs with this book.This ebook is pdf formatted and all examples are included as Xojo code. This is one of the many books which can be purchased at Xojo Library

Why is this book on OpenGL 2.1? The number of external libraries such as GLUT, GLU, and others have aged over time and with the many upgrades in OpenGL and Xojo, these 32-bit libraries are in need of an update. Three plugins have been written from scratch and the base code with a powerful game-loop has been included. With 64-bit programs and debugging fully developed and released, the OpenGL 2.1 functions should be compatible with many Windows Operating Systems. If you are new to graphics programming, I would suggest learning about Canvas Drawing, and once mastered, then proceed to OpenGL drawing. 

OpenGL Window in Xojo 2022 r3.x works with most OpenGL version 1.X and 2.X commands.

ISBN: 978-1-927924-33-4 

It is assumed that you have an intermediate understanding of both Graphics programming and of the Xojo language.

Version 3.0 - Released in November 2022 

  • Wrote the book
  • Updated to Xojo API 2 GUI and API2 Code
  • Updated Windows OS algorithm for optimized graphics
  • Created GLFWXojoPlugin.xojo_plugin
  • Created OpenGLXojoPlugin.xojo_plugin
  • Created WinXojoPlugin.xojo_plugin
  • Most of the drawing algorithms are exposed to maximize customization
  • Added mouse callback functionality
  • Added keyboard callback functionality
  • Wrote most examples with updated polling graphics, like the way game engines are written


Tested Information

  • Compatible Operating System: Windows 11
  • Xojo IDE: 2022 r3.2, 2022 r3.1, 2022 r3
  • Desktop programming
  • Intermediate programming skills 
  • GLFW version: 3.3.8
  • OpenGL version 2.1
  • Windows API version: Windows 11
  • GLFWXojoPlugin version
  • OpenGLXojoPlugin version
  • WinXojoPlugin version