Search Results

Search found 144 results on 6 pages for 'user146780'.

Page 6/6 | < Previous Page | 2 3 4 5 6 

  • Help with memory leak (malloc)

    - by user146780
    I'v followed a tutorial to use OGL tesselaton. In one of the callbacks there is a malloc and it creates a leak every time I render a new frame. void CALLBACK combineCallback(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **dataOut) { GLdouble *vertex; vertex = (GLdouble *) malloc(6 * sizeof(GLdouble)); vertex[0] = coords[0]; vertex[1] = coords[1]; vertex[2] = coords[2]; for (int i = 3; i < 6; i++) { vertex[i] = weight[0] * vertex_data[0][i] + weight[1] * vertex_data[0][i] + weight[2] * vertex_data[0][i] + weight[3] * vertex_data[0][i]; } *dataOut = vertex; } I'v tried to free(vertex) but then the polygons did not render. I also tried allocating on the heap then doing delete(vertex) but then the polygon rendered awkwardly. I'm not sure what to do. Thanks

    Read the article

  • Squigglly line under a word (Win32)

    - by user146780
    I want to implement basic spell checking in a Notepad clone project I'm doing. I want to underline misspelled words with a squiggly like like Word does. I think I need to use GDI and draw on the text field, but I'm not sure how to draw on controls. Thanks

    Read the article

  • Linear color interpolation?

    - by user146780
    If I have a straight line that mesures from 0 to 1, then I have colorA(255,0,0) at 0 on the line, then at 0.3 I have colorB(20,160,0) then at 1 on the line I have colorC(0,0,0). How could I find the color at 0.7? Thanks

    Read the article

  • Rendering sub tools on vertical toolbar

    - by user146780
    I was wondering how ex Photoshop and Expression Design render sub tools. These show up when for example you hold your mouse down on the fill tool, a sub menu comes up to your right with the fill and gradient tools. I'm just not sure how to go about this because this sub menu would essentially have to be an extension of my toolbar, but then it would find itself on my Frame control. How is this handled? Would it be a good idea to just paint on my frame?

    Read the article

  • Sending mail using Javascript

    - by user146780
    Here's what I'm trying to do. I want to use Java Script to send an email. I have created a form with a subject text field, a message field, and a send button. I want for when the person clicks Send that it sends the email, but I want to avoid server side scripting. Thanks

    Read the article

  • Make openGL lines connected

    - by user146780
    Right now I'v created a polygon, then I do the same thing but with line_loop to draw the outline. My issue right now is if I set the line thickness to high, the lines arn't connected. Their ends would need to be (linewidth) longer... is there a way to fix this? Thanks

    Read the article

  • prefill a std::vector at initialization?

    - by user146780
    I want to create a vector of vector of a vector of double and want it to already have (32,32,16) elements, without manually pushing all of these back. Is there a way to do it during initialization? (I dont care what value gets pushed) Thanks I want a 3 dimensional array, first dimension has 32, second dimension has 32 and third dimension has 16 elements

    Read the article

  • Scrollbar moves back after WM_VSCROLL

    - by user146780
    I have a window with its own H and V scrolling. I'm handling the event like this: case WM_VSCROLL: SetScrollPos(hWnd, SB_VERT, (int)HIWORD(wParam), TRUE); break; all I want is for the position of the scroll bar to stay once I release my mouse but what it's doing is just going back to the top after. What am I doing wrong? Thanks

    Read the article

  • Access element of pointed std::vector

    - by user146780
    I have a function where I provide a pointer to a std::vector. I want to make x = to vector[element] but i'm getting compiler errors. I'm doing: void Function(std::vector<int> *input) { int a; a = *input[0]; } What is the right way to do this? Thanks

    Read the article

  • WM_KEYDOWN confusion

    - by user146780
    I'm trying to get my application to do something when CTRL+S is pressed. I'm just not sure how the W and L params work for WM_KEYDOWN. MSDN has something about bit fields which i'm not sure about. How can I detect CTRL and S? Thanks

    Read the article

< Previous Page | 2 3 4 5 6