• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1388 Excellent

About HawkDeath

  • Rank


  • Twitter
  • Github
  • Steam
  1. OpenGL OpenGL 4.5 - create buffer

    Wow, @bartman3000 thank you very much for the help.
  2. OpenGL OpenGL 4.5 - create buffer

    Thanks, work :) . You could tell me how to use indices instead of vertices? That mean, which functions strictly OpenGL 4,5 I should use.
  3.   Hello, I learn OpenGL 4.5 and I try to create a simple triangle using only OpenGL 4.5 functions. Below I'm posting a code which creates buffer and fills a buffer.  struct Vertex { ..... glm::vec3 position; glm::vec4 color; }; Vertex object[] = { Vertex(glm::vec3( 0.5f, 0.5f, 0.0f), glm::vec4(1.0f, 0.0f, 0.0f,1.0f)), Vertex(glm::vec3( 0.5f, -0.5f, 0.0f), glm::vec4(1.0f, 0.0f, 0.0f,1.0f)), Vertex(glm::vec3( -0.5f, -0.5f, 0.0f), glm::vec4(1.0f, 0.0f, 0.0f,1.0f)) }; //Init GLuint vao, buffer; glCreateVertexArrays(1,&vao); glCreateBuffers(1,&buffer); glNamedBufferStorage(buffer, sizeof(object), &object, GL_STATIC_DRAW); //position glVertexArrayAttribBinding(vao, 0, 0); glVertexArrayAttribFormat(vao,0,3,GL_FLOAT,GL_FALSE,offsetof(Vertex,position)); glEnableVertexAttribArray(0); //color glVertexArrayAttribBinding(vao, 1, 0); glVertexArrayAttribFormat(vao,1,4,GL_FLOAT,GL_FALSE,offsetof(Vertex,color)); glEnableVertexAttribArray(1); glVertexArrayVertexBuffer(vao,0,buffer,0,0); //Draw glBindVertexArray(vao); glDrawArrays(GL_TRIANGLES,0,3); What I do wrong?  
  4. Own UI

    Hi, I wonder how to design own UI like DXUT, please about some scheme. I want use WinApi and Direct2D.  P.S. Whether I must reference to main function of collision?
  5. GDI+ How to redraw screen?

    Thanks, but I don't know where in I have hand on "backbufferDC" to Graphics* m_pGraphics;
  6. GDI+ How to redraw screen?

    Hi, it is my first post, i want ask how to redraw screen without "flicker" screen. I used  InvalidateRect(), RedrawWindow() and Graphics::Clear(). Always result it was same. Join link with program : http://speedy.sh/3JBhu/Release.zip
  • Advertisement