posted this on GitHub, but i'm able to expand on this here:
https://github.com/GuvaCode/Ray4Laz/issues/19i get a 3d grid in a glfw window but when casting the handle to TOpenGLControl and calling the raylib methods in OpenGLControl1Paint i only see the red background.
is this even possible, what i'm attempting here?
code:
uses
OpenGLContext, raylib, glfw, Windows;
TPortFrm = class(TForm)
OpenGLControl1: TOpenGLControl;
procedure FormCreate(Sender: TObject);
procedure OpenGLControl1Paint(Sender: TObject);
private
WndContext: pGLFWwindow;
public
end;
procedure TPortFrm.FormCreate(Sender: TObject);
begin
InitWindow(1600, 900, 'port');
SetTargetFPS(60);
WndContext:=glfwGetCurrentContext();
OpenGLControl1.Handle:=HWND(WndContext);
end;
procedure TPortFrm.OpenGLControl1Paint(Sender: TObject);
begin
BeginDrawing;
ClearBackground(RED);
BeginMode3d(cam);
DrawGrid(10, 1.0);
EndMode3D;
OpenGLControl1.SwapBuffers;
EndDrawing;
end;