-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I'm looking to test this in VB6/tB and a number of issues are coming up. I'm not sure if all of these are wrong so bear with me:
-
End PropertyandEnd Submissing in interface classes (IBufferIndex, I...) - This is accepted while in the IDE but VB6/tB cannot compile to binary. -
VBGLContext.cls:
Public Sub SetTimerFunc(ByVal Pointer As LongPtr): Call glutTimerFunc(Pointer): End Sub
Your prototype expects 3 arguments in glutTimerProc, none of which are marked Optional. The function pointer is the 2nd argument.
- VBGLContext.cls
Public Function GetCullFace() As Long
CullFace = p_CullFace
End Function
Public Function GetFrontFace() As Long
FrontFace = p_FrontFace
End Functionin keeping with the similar functions this appears it should be a return? GetCullFace = and GetFrontFace =
- VBGLContext.cls
Public Sub ClearColor(Optional ByVal r As Single = 0, Optional ByVal g As Single = 0, Optional ByVal b As Single = 0, Optional ByVal a As Single = 1)
Call glClearColor(r, g, b, a)
End Sub
Public Sub ClearColorArr(ByRef Arr() As Single)
Dim Size As Long
Size = USize(Arr)
Select Case Size
Case 0: Call glClearColor(Arr(0))
Case 1: Call glClearColor(Arr(0), Arr(1))
Case 2: Call glClearColor(Arr(0), Arr(1), Arr(2))
Case 3: Call glClearColor(Arr(0), Arr(1), Arr(2), Arr(3))
End Select
End SubIt appears ClearColorArr should be calling ClearColor rather than glClearColor directly, since its arguments are not optional.
- VBDualGrid.cls
Public Function CreateFromFile(ByVal FilePath As String) As VBGLDualGrid
Dim Manager As VBGLTextureManager
Set Manager = VBGLTextureManager.Create(VBGLTextureMergerGrid.Create(False))
Manager.Flip = True
Call Manager.LoadFromFileArr(FolderPath, _
TilesPerSprite, _
VBGLTextureManagerHelperSetUp.VBGLTextureManagerHelperSetUpGrid, _
TypeTypeString)
Dim Texture As VBGLTexture
Set Texture = Manager.CreateTexture(TextureFactory(Manager), "DualGrid", Empty)
Set CreateFromFolder = Create(Texture)
End FunctionIt appears to need FilePath instead of FolderPath in Call Manager... and the return should be CreateFromFile, and .LoadFromFileArr expects 5 arguments.
-
VBDualGrid.cls -> Update uses a commented out var and also has a call with incorrect arg count.
-
VBGLUniforms.cls - SetVecI converts a Long array to a Single array then tries to use that with glUniform1iv etc which expect Long (GLint)
-
VBGLShaderWorkflow.cls - VBGLIShaderElement_GetVariableAll calls VBGLIShaderElement_GetVariableCall without the argument it expects
-
VBGLSubTexture.cls - CreateFromPattern sets CreateFromArray like it's the function name for a return value
-
VBGLTextureManagerHelper.cls - In AddName, p_NamesName is an unrecognized symbol and VBGLAdd expects 2 args
-
VBGLWindow.cls - In GetWindowHwnd, glutGetWindowHwnd is undefined (presumably should be glutGetWindow)
PS- It's done a little differently, using delegates/aliases that preserve original types, but it may be easier than doing it from C if you want the declares for the EXT functions: https://github.com/fafalone/WinDevLib/blob/main/Export/Sources/wdGL.twin#L6299