MCPcopy Create free account
hub / github.com/NVIDIA/cuda-samples / plotCurve

Function plotCurve

cpp/5_Domain_Specific/bicubicTexture/bicubicTexture.cpp:197–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197void plotCurve(float (*func)(float))
198{
199 const int steps = 100;
200 glBegin(GL_LINE_STRIP);
201
202 for (int i = 0; i < steps; i++) {
203 float x = i / (float)(steps - 1);
204 glVertex2f(x, func(x));
205 }
206
207 glEnd();
208}
209
210// display results using OpenGL (called by GLUT)
211void display()

Callers 1

displayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected