Hi,
How can I use opengl commands by GLDirectOpenGL correctly?
I know I must use OnRender event but my commands not work completely,
for example for display a triangle with three colors at the vertices I use this code :
GLGraph .pas TGLHeightField.BuildList may help you with this.
Your triangle is green probably because you have another object in scene that is green and its state configuration is passing to the DirectOpenGL render. You need to configure this state before draw something.
Last edit: Jerson Seling 2020-07-08
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
How can I use opengl commands by GLDirectOpenGL correctly?
I know I must use OnRender event but my commands not work completely,
for example for display a triangle with three colors at the vertices I use this code :
But I have a triangle with one color (Green).
Where is my mistake?
Last edit: M.a. 2020-07-01
Try this:
GLGraph .pas TGLHeightField.BuildList may help you with this.
Your triangle is green probably because you have another object in scene that is green and its state configuration is passing to the DirectOpenGL render. You need to configure this state before draw something.
Last edit: Jerson Seling 2020-07-08