Author Topic: ORDLL64.dll  (Read 5175 times)

0 Members and 1 Guest are viewing this topic.

KarenZ

  • Jr. Member
  • **
  • Posts: 51
Re: ORDLL64.dll
« Reply #15 on: February 28, 2020, 10:58:19 am »
Hi Charles,   in your reply#13 

You mentioned that

Code: [Select]
This o2 header is a lightly retouched verion of your c++ header:

 Do you mean that the code block  be saved as  OR64.inc  ?
 So that your  Test.exe  can Uses OR64  ?

Thanks and Regards
Karen

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #16 on: February 28, 2020, 12:26:03 pm »
Hi Karen,

Yes, uses OR64 means include once "OR64.inc"



Patrice,

This is my Window code:

Code: [Select]

  $filename "test.exe"
  uses RTL64
  uses corewin
  uses OR64


  '=========
  'MAIN CODE
  '=========
 
  dim cmdline as asciiz ptr, hinst as sys
  @cmdline=GetCommandLine
  hinst=GetModuleHandle 0
  '


 Function WinMain(sys hinst, prevInst, asciiz*cmdline, sys show) as sys
  '=====================================================================


  WndClass wc
  MSG      wm

  sys hwnd, wwd, wht, wtx, wty, tax

  wc.style = CS_HREDRAW or CS_VREDRAW
  wc.lpfnWndProc = @WndProc
  wc.cbClsExtra = 0
  wc.cbWndExtra = 0   
  wc.hInstance = hinst
  wc.hIcon=LoadIcon 0, IDI_APPLICATION
  wc.hCursor=LoadCursor 0,IDC_ARROW
  wc.hbrBackground = GetStockObject WHITE_BRUSH
  wc.lpszMenuName =null
  wc.lpszClassName = strptr "Demo"

  RegisterClass (@wc)
 
  Wwd = 800 : Wht = 640
  Tax = GetSystemMetrics SM_CXSCREEN
  Wtx = (Tax - Wwd) /2
  Tax = GetSystemMetrics SM_CYSCREEN
  Wty = (Tax - Wht) /2
 
  hwnd = CreateWindowEx 0,wc.lpszClassName,"OXYGEN BASIC",WS_OVERLAPPEDWINDOW,Wtx,Wty,Wwd,Wht,0,0,hinst,0
  'OR_CreateWindow(IN dword dwExStyle, IN HWND hParent, IN dword dwStyle, IN long x, IN long y, IN long w, IN long h, IN HMENU CtrlID)
  OR_CreateWindow(0, hWnd, WS_POPUP, 0,0,800,640, 0)

  ShowWindow hwnd,SW_SHOW
  UpdateWindow hwnd
  '
  sys bRet
  '
  do while bRet := GetMessage (@wm, 0, 0, 0)
    if bRet = -1 then
      'show an error message
    else
      TranslateMessage @wm
      DispatchMessage @wm
    end if
  wend

  End Function



  function WndProc ( sys hWnd, wMsg, wParam, lparam ) as sys callback
  '==================================================================

    select wMsg
       
       case WM_DESTROY
         
         PostQuitMessage 0

       case else

        function=DefWindowProc hWnd,wMsg,wParam,lParam

     end select
       
  end function ' WndProc

  WinMain hinst,0,cmdline,SW_NORMAL
 

After lauching the window I'm getting the error message below. My Pavilion laptop has Windows10 and Intel graphics hardware.

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #17 on: February 28, 2020, 01:34:55 pm »
Charles

It looks like your graphic card doesn't use the current OpenGL extensions.

First thing is to check your hardware for OpenGL 4.00.

Then check if OR is working on your system, using the ObjReader64_Lite.7z attached to this post
http://www.objreader.com/index.php?topic=2.msg2#msg2

Then you can also check ORDLL64 with the WinDev project.
If they both work on your system, this means an error in O2.

I am using mostly nVidia on my computers, but one of them has an Intel 4000 and it works also well with it.

Added:
It works even on my little Windows Surface, using an Intel Atom, with only 2.00 Gb ram, and an Intel HD Graphic card.

« Last Edit: February 28, 2020, 01:47:33 pm by Patrice Terrier »

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #18 on: February 28, 2020, 03:13:37 pm »
Patrice,

ObjReader64.exe produced the same error message on launch.

I checked the intel model: Intel HD Graphics 520, supporting OpenGl 4.6. Opengl.dll was last updated in Oct 2019.

https://opengl.gpuinfo.org/displayreport.php?id=4569

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #19 on: February 28, 2020, 03:48:15 pm »
Yes, so far, that is a requirement (see the code below in red).

That is the first time i had report of this problem, perhaps there is a specific setting on the graphic card to enable it ?


GLuint glsl_LoadShaderFromMemory(IN long pResourceId) {
    GLuint program = 0;
    GLuint vertShader = 0;
    GLuint fragShader = 0;
    GLuint geomShader = 0;
    char* quadShader = "void main() {gl_Position = ftransform();}"; // MLL 03-30-2019: reusable
    char* vs = NULL, *fs = NULL, *gs = NULL; // MLL 11-25-2018: geometry shader support

    // Get the vertex shader source and compile it.
    if (pResourceId == SHADER_BLINN) {
        vs = "#extension GL_OES_standard_derivatives : require\n"
            "#extension GL_OES_standard_derivatives : enable\n"

            "uniform bool bDoSpherical;\n"
            "varying vec3 vertex;\n"
            "varying vec3 normal;\n"
            "varying vec3 vertPos;\n"

            "void main() {\n"
                "vertex = gl_Vertex.xyz;\n"
                "gl_Position = ftransform();\n"
                "vec4 vertPos4 = gl_ModelViewMatrix * vec4(vertex, 1.0);\n"
                "vertPos = vec3(vertPos4) / vertPos4.w;\n"
                "normal = normalize(gl_NormalMatrix * gl_Normal);\n"
                "if (bDoSpherical) {\n"
                    "vec3 u = normalize(vec3(gl_ModelViewMatrix * gl_Vertex));\n"
                    "vec3 r = reflect(u, normal);\n"
                    "float m = 1.0 / (2.0 * sqrt(r.x * r.x + r.y * r.y + (r.z + 1.0) * (r.z + 1.0)));\n"
                    "gl_TexCoord[0].s = r.x * m + 0.5;\n"
                    "gl_TexCoord[0].t = r.y * m + 0.5;\n"
                "} else {\n"
                    "gl_TexCoord[0] = gl_MultiTexCoord0;\n"
                "}\n"
            "}";


Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #20 on: February 28, 2020, 10:12:12 pm »
Charles

Without the "GL_OES_standard_derivatives" extension, GLSL could be very problematic, including the hability to play shaders from the Internet. (see www.Shadertoy.com or www.SketchFab.com).

It is part of the WebGL API.

Added:
Could you send me your compiled O2 code to check how it works on my different computers, thank you!
« Last Edit: February 29, 2020, 12:09:51 am by Patrice Terrier »

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #21 on: February 29, 2020, 01:33:46 am »
Patrice,

Binaries and source for the 2 tests below:



attachments withdrawn
« Last Edit: March 01, 2020, 03:25:17 pm by Charles Pegge »

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #22 on: February 29, 2020, 02:54:22 am »
Charles

Thank you for the zip.

Here are the results.

test1:
it does not display the OR_GPUinfo (empty string)

test2:
The OR_CreateWindow, does not shows up, IsWindow(OR_CreateWindow) ?

So far, it doesn't seem to work, but if your graphic card is not GLSL compliant then you won't be able to check anything.

Thus don't waste anymore time on this, except if you can check this on another computer (nVidia is my favorite GPU).

Thank you for the time you spent on it.


Arnold

  • Hero Member
  • *****
  • Posts: 977
Re: ORDLL64.dll
« Reply #23 on: February 29, 2020, 03:04:52 am »
If I run OR64test1.exe each item indicates null except the hardware brand. Is this expected? Clicking on Graphics Card Info in ObjReader viewer, this will show the values of my system.

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #24 on: February 29, 2020, 03:58:42 am »
Roland

Here is mine

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #25 on: February 29, 2020, 04:20:26 am »
I won't give just yet, Patrice,

There is something in my opengl framework that activates opengl for OR64

Code: [Select]
  $filename "test3.exe"
  uses RTL64
  % Title "Console Demo"
 '% Animated
 '% ScaleUp
 '% PlaceCentral
 '% AnchorCentral
  uses ConsoleG
  uses OR64

  sub main()
  ==========
  string s
  cls 0,0,0
  scale 2,2
  'typeface=1
  printl OR_version()
  'printl OR_About()
  s=OR_GPUinfo()
  printl mid(s,01,32)
  printl mid(s,33,32)
  printl mid(s,65,32)
  printl mid(s,97,32)
  printl mid(s,129,32)
  printl mid(s,161,32)
  printl mid(s,193,32)
  printl mid(s,225,32)
 

  scale .5,.5
  sys i
  printl
  printl
  PushState
  color .20,.80,.00,.88
  Scale 2.,2.
  print "Enter: "
  color .80,.80,.00,.88
  typeface=1
  input inputs
  typeface=0
  PopState
  printl
  color .00,.80,.80,1.
  if LastInput
    printl "Last input: " LastInput
  end if
  printl ""
  lastkey=0
  lastchar=0
  '
  shading 'opposite of 'flat'
  GoldMaterial.act
  move 2.,-2.,-1.0
  go sphere
  glTranslatef 0.,-2.0,0.
  RedMaterial.act
  go cube
  move 2.00,.00,.00
  rotateX -70
  scale 4
  color .70,.70,.20,.99
  print3d "Solids",1
 
  end sub

  EndScript

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #26 on: February 29, 2020, 05:17:25 am »
both Roland and I, are using GLSL 4.60

About the refresh rate, in TURBO mode the OR FPS self adjust on it, meaning 75hz on my main display while only 60hz on the secondary display, and 150hz with the new display generation.

And see on the attachment the FPS rate when running at full speed (no VSYNC mode), and look about the model info on the right panel.
With lighter model i can jump to 677 FPS go figure!
Then you need to have a good GPU cooler !
« Last Edit: February 29, 2020, 05:33:27 am by Patrice Terrier »

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #27 on: February 29, 2020, 05:27:25 am »
Unfortunately, I still cannot persuade my system to support GL_OES_standard_derivatives

Patrice Terrier

  • Jr. Member
  • **
  • Posts: 81
Re: ORDLL64.dll
« Reply #28 on: February 29, 2020, 05:44:58 am »
Charles

Being very graphic oriented i know that Intel comes last on my GPU favorite list, and i avoid like the plague shared memory.

Here is another screen shot of a model running in demo mode + play audio + sync audio + animation,
and look at the FPS rate on the top left corner.

OR FPS display returns exactly the same value than FRAPS.

Charles Pegge

  • Admin Support Member
  • *****
  • Posts: 4486
    • Oxygen Basic
Re: ORDLL64.dll
« Reply #29 on: February 29, 2020, 08:02:26 am »
Patrice

Would you consider incorporating some adaptive coding for mediochre graphics hardware?