It has been long time since I used OpenGL, but I'll try to help.
First, if you know how to intilialize OpenGL properly try the following approach.. otherwise wait for someone else to help:p
Second, I didn't test the code and I'm not sure whether it works or not.
Add the following global variables (you can change the values as you like) :
int lineHight = 25; // the hight of each line
int lineMargin = 10; // the left margin for your text
int currentHight = 25; // the y position of the cursor.
Now in the main function and after OpenGL initialization enter the following lines:
glutKeyboardFunc(myKey); // register the key handler.
glRasterPos2f(lineMargin, currentHight); // set the cursor to the initial position.
And here is some definition of the key handler:
void myKey(unsigned char key, int x, int y)
if (key == 13) // enter key
currentHight += lineHight; // change cursor y position
glRasterPos2f(lineMargin, currentHight); // jumb to next line
glColor3f(0.0, 0.0, 1.0); // text color
glutBitmapCharacter(GLUT_BITMAP_TIMES_ROMAN_24, key); // print the color
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.