Author Topic: WinDev OR64 project  (Read 13878 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1987
    • zapsolution
WinDev OR64 project
« on: February 21, 2020, 10:50:40 am »
This is a Work In Progress, the latest version is attached to this post.

The attached WINDEV project is compatible with: WD17+

This thread is to explain how to use ObjReader inside of a 64-bit WinDev application.

The OR17 project is based on the "ObjReader Lite" version 3.00

You can post your questions and comments about using it with WinDev in this thread.

  • 02-21-2020 Release V01 - First beta
  • 02-24-2020 Release V02 - ComboBox + new "3D_models" folder (located into the EXE's)
  • 02-25-2020 Release V04 - Model info (Vertices, Triangles, Indices, Meshes, Materials, OBJ size, Loaded in)

Note: To test the project you can use this animated model

The latest is attached to this post (WD source code and EXE binary)

The core ORDLL64.dll 3D engine, expose this set of API:
(Note: The use of GDImage64.dll is a prerequisite)

OR_CreateWindow(IN DWORD dwExStyle, IN HWND hParent, IN DWORD dwStyle, IN long x, IN long y, IN long width, IN long height, IN HMENU CtrlID)
Create the OpenGL viewport window.

Detect the graphic card being used (nVidia, ATI, Intel).

Return a string with specific informations matching the GPU being used.

Return a string about the current model used.

Reset the OpenGL viewport to the model specific default.

Get the current audio volume used by the model, in the range 0 to 100 (the value is reseted, each time you load a new model).

OR_SetAudioVolume(IN long nVolume)
Adjust the audio level volume, in the range 0 to 100.

OR_ProcessCommandLine(IN WCHAR* lpCmdLine)
To select the full path of a specific 3D model.

The vertices number.

The triangles number.

The indices number.

The meshes number.

The materials number.

The .OBJ file size.

The ellapsed time to load the project into the GPU memory.

The DLL internal version number.

OR_TimerEnable(IN BOOL enable);
Set to TRUE, if you want to use the OR sync timer (see the marquee text in the ORV64 demo project)

OR_SetSwapInterval(IN BOOL bUseInterval);
This is an advanced API
bUseInterval = 1 (Turbo mode, that is the default)
bUseInterval = 2 (Standard mode)
bUseInterval = 0 (no wait state, maximum GPU speed, requires the use of a GPU cooler fan)

Return an unicode string with the name of the active .obj file.

Return the GPU memory percentage used by the application.

Return the CPU memory percentage used by the application.

Return the last tick used by the OR sync timer.

User guide:

3D model to use
You must use any model from the 3D collection, they have been highly optimized (with C4D) to use the unique features of the ObjReader material,
thus to achieve top-notch rendering quality in real time, and high refresh rate (FPS).

The models are loaded directly into the memory of the graphic card (GPU) to save the CPU ram, but you must have enough graphic memory (4Gb recommended),
and use the latest graphic drivers.

Select a wavefront.obj model with Explorer and drag the icon onto the OpenGL viewport.
You can also do the same with any audio file, audio processing is performed in real time to sync the animations and pulse the lighting of the model.
Note: The processing of the audio signal and the animation sync is related to the use of a specific ObjReader material file.

The left mouse button change the model orientation, the right mouse button drag the model left or right, and up or down (paning).
The mouse wheel adjust the zoom magnification (inertia smooth zooming).


The folder named "3D-models", is the right place to put all the models (each one using a distinct subfolder).
All models stored here, are shown into the ComboBox for easy selection.

Note: The attachment has both the WinDev source code, and the compiled binary into the EXE folder.
« Last Edit: March 25, 2020, 11:47:17 am by Patrice Terrier »
(Always working with the latest Windows version available...)