X3 Core XDK
The X3 Core XDK is a cross-platform 3D graphics development kit for the Xojo programming language. X3Core contains all the classes and methods needed to render, load and save 3D assets.
Usage
Here are the basic steps to start a new X3 project:
-
Create a new Xojo desktop project.
-
Import the X3Core module into the project.
-
Add an OpenGLSurface control to your window.
-
Call X3_Initialize from the OpenGLSurface.Open event.
-
Call X3_SetPerspective from the OpenGLSurface.Resized event.
-
Call OpenGLSurface.Render from the Window.Paint event.
-
Add your rendering code to the OpenGLSurface.Render event, e.g.
' set the background color
OpenGL.glClearColor(0.2, 0.2, 0.2, 1) OpenGL.glClear(OpenGL.GL_COLOR_BUFFER_BIT + OpenGL.GL_DEPTH_BUFFER_BIT)
' render an X3Model
OpenGL.glPushMatrix
OpenGL.glTranslatef 0, 0, -2
X3_RenderModel CurrentModel
OpenGL.glPopMatrix