15,388,979 members
Home / Discussions / Graphics

# Graphics

 First PrevNext
 tack snap shot with windows service sa1114419-Oct-21 23:02 sa11144 19-Oct-21 23:02
 Re: tack snap shot with windows service OriginalGriff19-Oct-21 23:05 OriginalGriff 19-Oct-21 23:05
 UWP Flyout Problem RWey22-Jun-21 10:39 RWey 22-Jun-21 10:39
 Re: UWP Flyout Problem Gerry Schmitz23-Jun-21 6:38 Gerry Schmitz 23-Jun-21 6:38
 Re: UWP Flyout Problem RWey25-Jun-21 6:38 RWey 25-Jun-21 6:38
 Drawing a simple triangle horror when using std::vector Isawyouoo21-May-21 11:21 Isawyouoo 21-May-21 11:21
 this is bullshit, the first VAO without std::vector get drawn but not the second with vector : Vector3f Vertices[4]; Vertices[0] = Vector3f(-1.0f, -1.0f, 0.5773f); Vertices[1] = Vector3f(0.0f, -1.0f, -1.15475f); Vertices[2] = Vector3f(1.0f, -1.0f, 0.5773f); Vertices[3] = Vector3f(0.0f, 1.0f, 0.0f); unsigned int Indices[] = { 0, 3, 1, 1, 3, 2, 2, 3, 0, 0, 1, 2 }; GLuint VBO[2]; GLuint IBO[2]; unsigned int id[2]; glGenVertexArrays(2, id); glGenBuffers(2, VBO); glGenBuffers(2, IBO); glBindVertexArray(id[0]); glBindBuffer(GL_ARRAY_BUFFER, VBO[0]); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertices), Vertices, GL_STATIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IBO[0]); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(Indices), Indices, GL_STATIC_DRAW); struct Vertex { Vector3f position; //Vector2f texCoord; //Vector3f normal; //int Boneindices[4]; //float Weights[4]; }; vector Vertices2; Vertex* v=new Vertex(); v->position = Vector3f(-1.0f, -0.0f, 0); Vertices2.push_back(v); v->position = Vector3f(1.0f, -0.0f, -1); Vertices2.push_back(v); v->position = Vector3f(1.0f, -0.0f, 0); Vertices2.push_back(v); v->position = Vector3f(0.0f, 1.0f, 0.0f); Vertices2.push_back(v); struct Triangle { int indices[3]; }; Triangle* t = new Triangle(); t->indices[0]=0; t->indices[1]=3; t->indices[2]=1; vector Indices2; Indices2.push_back(t); t->indices[0] = 1; t->indices[1] = 3; t->indices[2] = 2; Indices2.push_back(t); t->indices[0] = 2; t->indices[1] = 3; t->indices[2] = 0; Indices2.push_back(t); t->indices[0] = 0; t->indices[1] = 1; t->indices[2] = 2; Indices2.push_back(t); glBindVertexArray(id[1]); glBindBuffer(GL_ARRAY_BUFFER, VBO[1]); glBufferData(GL_ARRAY_BUFFER, sizeof(Vertex)* Vertices2.size(), &Vertices2[0], GL_STATIC_DRAW); glEnableVertexAttribArray(0); glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IBO[1]); glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(Triangle)* Indices2.size(), &Indices2[0], GL_STATIC_DRAW); for (size_t i = 0; i < 2; i++) { glBindVertexArray(id[i]); glDrawElements(GL_TRIANGLES, 12, GL_UNSIGNED_INT, 0); glBindVertexArray(0); }
 Re: Drawing a simple triangle horror when using std::vector Graham Breach21-May-21 21:03 Graham Breach 21-May-21 21:03
 Re: Drawing a simple triangle horror when using std::vector Richard MacCutchan21-May-21 21:37 Richard MacCutchan 21-May-21 21:37
 Looking for a C# option for doing simple 2D graphics MollyJanet13-May-21 8:45 MollyJanet 13-May-21 8:45
 SharpDX MediaFoundation and DirectShow RWey15-Apr-21 4:22 RWey 15-Apr-21 4:22
 Re: SharpDX MediaFoundation and DirectShow Dave Kreskowiak15-Apr-21 4:53 Dave Kreskowiak 15-Apr-21 4:53
 Re: SharpDX MediaFoundation and DirectShow RWey15-Apr-21 6:16 RWey 15-Apr-21 6:16
 Re: SharpDX MediaFoundation and DirectShow Gerry Schmitz15-Apr-21 8:25 Gerry Schmitz 15-Apr-21 8:25
 Re: SharpDX MediaFoundation and DirectShow RWey15-Apr-21 9:35 RWey 15-Apr-21 9:35
 Re: SharpDX MediaFoundation and DirectShow Dave Kreskowiak15-Apr-21 9:40 Dave Kreskowiak 15-Apr-21 9:40
 Re: SharpDX MediaFoundation and DirectShow RWey15-Apr-21 10:45 RWey 15-Apr-21 10:45
 Pygame image wont show up until I close the window c0d3r1/212-Jul-20 11:04 c0d3r1/2 12-Jul-20 11:04
 Re: Pygame image wont show up until I close the window Richard MacCutchan12-Jul-20 21:24 Richard MacCutchan 12-Jul-20 21:24
 OpenGL stencil in 2D - advanced (?) issues Vaclav_10-May-20 5:32 Vaclav_ 10-May-20 5:32
 OpenGL removing "objects" - how ? Vaclav_9-Apr-20 9:53 Vaclav_ 9-Apr-20 9:53
 Re: OpenGL removing "objects" - how ? Graham Breach9-Apr-20 21:22 Graham Breach 9-Apr-20 21:22
 Re: OpenGL removing "objects" - how ? Vaclav_10-Apr-20 5:35 Vaclav_ 10-Apr-20 5:35
 Re: OpenGL removing "objects" - how ? Graham Breach10-Apr-20 6:45 Graham Breach 10-Apr-20 6:45
 SOLVED Re: OpenGL removing "objects" - how ? Vaclav_10-Apr-20 7:08 Vaclav_ 10-Apr-20 7:08
 Re: OpenGL removing "objects" - how ? jhonaa22-Mar-22 1:23 jhonaa 22-Mar-22 1:23
 Last Visit: 31-Dec-99 18:00     Last Update: 7-Aug-22 19:03 Refresh 1234567891011 Next ᐅ

General    News    Suggestion    Question    Bug    Answer    Joke    Praise    Rant    Admin

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.