General > Off Topic

Programming Fast circle code for OpenGL

<< < (3/3)

Numsgil:

--- Quote from: peterb ---I'm not sure if i'm following this you mean that a 'drawn' object is stored in the graphics card
--- End quote ---

So it's quite possible I'm just confusing you.  In which case ignore moe.  But the vertex positions, color information, etc. are, yes.  The graphics cards have on board memory (called VRAM).  They're basically an entirely separate computer inside your system.  They can only draw things which they have in memory.  When you use the immediate mode OpenGL calls, the graphics driver figures out some way to send them to the garphics card's memory for the one frame you want to draw, then it discards them unless you tell it otherwise.


--- Quote ---And so you can then adres a whole object like move all the lines by 1 vector ??  (moving a poly line)
(so no redraw of the complete circle ?), only have one command like move object(XXX) by vector(x,y,z)   //z=0
In my sample i just redraw each frame.
If move by vector is possible that would be way faster..
--- End quote ---

Yes.  Vertices are transformed by a matrix before they are drawn.  So you just have to change the matrix and you can rotate, scale, scew, transform, etc. an "object" (consisting of vertices).

Navigation

[0] Message Index

[*] Previous page

Go to full version