[Lazarus] Fast drawing to canvas

Sven Barth pascaldragon at googlemail.com
Sat Feb 11 13:48:19 CET 2012


On 11.02.2012 12:12, Reimar Grabowski wrote:
>>    glMatrixMode(GL_MODELVIEW);
>>    glLoadIdentity();
> These are all deprecated but still available since OpenGL 3 (2008) and removed in 3.1 (if you create an OpenGL 3 and up only context - 2009), as they belong to the fixed function pipeline. They were run on the CPU anyway so if you really need this kind of matrix manipulations you can just implement them yourself (as most people using OpenGL have done anyway since you need to know your matrices for many tasks and OpenGL had no fast way to retrieve them).

How would one set matrices then? (<= this is a question out of curiosity)

>> lol! But just read any OpenGL tutorial which you can imagine. It
>> always starts with glBegin, glEnd and boom ... doesnt work in OpenGL
>> ES. And, read the code here:
> glBegin and friends (called immediate mode) was unefficient since 1997 and a bad idea to be used in production code. Normal mesh sizes start around 1000 vertices nowadays most are much larger. You do not want to specify such structures with glBegin/glEnd. You must layout your data in special ways to get the most from your hardware. This is just not possible with glBegin/glEnd.
> Yes, it was used a lot in tutorials but that doesn't change the above.

The deprecation of glBegin/glEnd I knew already :)

Regards,
Sven




More information about the Lazarus mailing list