Author Topic: WinDev OR64 project  (Read 6239 times)

Patrice Terrier

  • Administrator
  • *****
  • Posts: 1980
    • 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.

History:
  • 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 OR17.zip 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.

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

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

OR_About()
Return a string about the current model used.

OR_ViewReset()
Reset the OpenGL viewport to the model specific default.

OR_GetAudioVolume()
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.

OR_Vertices()
The vertices number.

OR_Triangles()
The triangles number.

OR_Indices()
The indices number.

OR_Meshes()
The meshes number.

OR_Materials()
The materials number.

OR_ObjSize()
The .OBJ file size.

OR_LoadTime()
The ellapsed time to load the project into the GPU memory.

OR_Version()
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)

OR_ObjFileName();
Return an unicode string with the name of the active .obj file.

OR_GPU();
Return the GPU memory percentage used by the application.

OR_CPU();
Return the CPU memory percentage used by the application.

OR_GetAniTick();
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).

Memory
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.

Drag-and-drop
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.

Mousing
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).


3D_models:

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 »
Patrice
(Always working with the latest Windows version available...)