Forum > OpenGL

Help (OpenGL-FPC) with the graphic of the view of two polygons in 3D

(1/2) > >>


My problem is to represent the view of two polygons in 3D, using Free Pascal and OpenGL at fullscreen mode 640x480;

Note: In each polygon draw the image of a bitmap.

1) Position of eye: (20, 20, 20)
2) Point of observation: (0, 0, 0)
3) Vector Up the camera: (-1, -1, 1)
4) Visual Angle: 45
5) Distance Far: 50
6) Near Distance: 0.1

7) The vertices of the polygon 1 are: (0, 0, 0), (1, 1, 0), (2, 0, 0) with a bitmap 1 of 640x480. (occupying the area of ​​the polygon)

8> The vertices of the polygon 2 are: (0, 0, 5), (1, 1, 5), (2, 0, 5) with a bitmap 2 of 320x200. (occupying the area of ​​the polygon)

The code (free pascal) for this program-problem would be helpful. (please).
Any suggestions would help.


Have you tried GLScene?


Thanks for responding. I've tried but I failed to install. I followed the instructions in

Actually I want to know what would be the code of the program the problem I raised. It would be helpful.

I think those instructions are a bit outdated.

Just download GLScene from

I downloaded the Snapshot for SVN revision 5593 last week and it installed fine in lazarus 0.9.30.

From lazarus do Package -> open package file
and then select glscene_runtime.lpk in the /Lazarus directory of GLScene (or the other one, don't remember). Lazarus will add the other required packages automatically.

Try the OpenGL example, then try solving the problem yourself. When stuck, post your code so far and explain what you have done and what's missing.


[0] Message Index

[#] Next page

Go to full version