Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
89 views

I m trying to learn creating tilemap with vertex array. I found a code from a tutorial and i read its necessary to use vertex array for creating huge tilemaps if we need optimal rendering performance ...
xy1qw1's user avatar
  • 1
0 votes
1 answer
273 views

I am trying to make a simple 2D rectangle renderer in OpenGL. I'm storing transform of each rectangle as a 3x3 matrix inside a buffer object, and passing into my vertex shader as a vertex attribute. ...
Shuppin's user avatar
1 vote
1 answer
94 views

I'm studying Opengl and the book i've been using is OpenGL(R) ES 3.0 Programming Guide, 2nd Edition. And at chapter 6 they talk about Vertex arrays and they have a example code that uses Vertex Array ...
apo's user avatar
  • 43
0 votes
0 answers
181 views

For a university assignment, I need to draw various shapes using a vertex array, and one such shape that they have asked for is a circle. I know that I would need to use sf::TriangleFan but I'm not ...
AnishG555's user avatar
3 votes
1 answer
200 views

I am trying to render multiple models sharing the same VAO and vertex format (following top answer on this post Render one VAO containing two VBOs), however I cannot get it to work with ...
Victor Drouin's user avatar
2 votes
1 answer
722 views

I am using three.js and I want to create geometry 16x16 size. I want that each segment is different color and some of them is transparent. What is the best solution for this problem? Should i render ...
user13762985's user avatar
1 vote
1 answer
267 views

I try to make the code cleaner by extracting the whole main Proramm in some classes. So I have a vertex buffer, index buffer and a shader class. Only the array buffer is in the main and it worked. Now ...
Razielruss's user avatar
2 votes
1 answer
937 views

Context: I am trying to make a script in Abaqus that will automatically create partitions between vertices for all faces. The partitioning won't be perfect, but the users will be able to delete the ...
Chung David's user avatar
2 votes
1 answer
610 views

Im making simple fps game using raycasting, because I thought its very fast and light method. My Raycasting function saves data in to a vertex array, which is then rendered by OpenGl. But because this ...
Dave F.'s user avatar
  • 175
-2 votes
1 answer
622 views

i am trying to learn usinf opengl and lwjgl with java and i have amde a program and am trying to render some mesh but the class handling the Vaos and Vbos is faulty.After doing some research , i have ...
ORIGAMI Mittal's user avatar
1 vote
0 answers
82 views

I've tried to write a code that will draw a motion field by drawing green rectangles on a tile map everywhere where hero can go (hero can't move diagonally). It's very hard to me I have read: https://...
BigFatPig's user avatar
2 votes
1 answer
225 views

My model looks stretched because of corrupted data in vertex shader attribute location Here's the vertex shader code: #version 330 core layout (location = 0) in vec3 vertPos; layout (location = 1) in ...
rahul meda's user avatar
1 vote
1 answer
2k views

I'm pretty sure that the vertex array is not binding the vertex buffer because if I comment out the line where I unbind the vertex buffer it works perfectly fine, which suggests that the vertex array ...
MaximV's user avatar
  • 325
2 votes
1 answer
281 views

After some effort, I managed to draw dynamic aircraft trail using OpenGL. You may see a part of my code below: private void getTrailVertices(){ verticeBuffer = Buffers.newDirectFloatBuffer(6 * ...
Nebi Sarikaya's user avatar
1 vote
0 answers
92 views

I'm having trouble putting the data inside a wavefront .obj file together. These are the vec3 and vec2 definitions template <typename T> struct vec3 { T x; T y; T z; }; template &...
Big Temp's user avatar
  • 448
0 votes
1 answer
793 views

I'm the process of converting some opengl code to DSA and everywhere its written not to bind the vertex array, because its inherit in DSA. So I use GLuint VBO, VAO, indexBuffer; glCreateVertexArrays(...
Hans Micheelsen's user avatar
1 vote
0 answers
94 views

I have an OpenGL Graphics assignment and well for some reason I'm trying to create a flat square on the X,Z plane (Y is just 1.0 for every vertices). I've tried making the problem smaller by just ...
noahlattari's user avatar
2 votes
1 answer
998 views

To tell from the beginning, I'm very novice within OpenGL world but I need to use it for some rendering optimisations in Android. I have to render a block or a bunch of contiguous pixels in a 2D space ...
Cosmin Telescu's user avatar
2 votes
1 answer
5k views

How do I draw a primitive of my choice from a constructed VertexArray? In the example below I am adding two vertices to the 'vertices' array and I am trying to draw it with 'window.draw(vertices, 2, ...
Yajirobe's user avatar
  • 115
0 votes
3 answers
2k views

I am wondering if it is possible to create a VertexArray of circles in SFML. I have looked for answers but I didn't find anything that could help. Moreover, I don't understand the part on the SFML ...
Leop's user avatar
  • 75
0 votes
1 answer
195 views

I have a spritesheet animation drawn using a vertexarray. As an example let's say I have an arrow pointing to the right with a simple animation. I would like to be able to flip the texture on the x ...
Nathaniel G.M.'s user avatar
2 votes
1 answer
563 views

I found this sfml tutorial written back in 2009 and I'm trying to convert it to 2.4. I haven't been able to convert these 2 lines: win.draw(sf::Shape::Rectangle(le.Blocks[0].fRect, sf::Color(255, 0,...
Nathaniel G.M.'s user avatar
1 vote
3 answers
340 views

This is probably a stupid question, but I've been wondering it - do vertex structs in OpenGL NEED to have x, y and z? I'm drawing in 2D, yet all the tutorials I've seen seem to have a z variable in ...
MysteryPancake's user avatar
1 vote
1 answer
683 views

The documentation for SFML states that you can combine primitives to create vertex arrays. I think what they are referring to is the fact that multiple Triangles can be grouped into a TriangleFan or ...
Larry Turtis's user avatar
  • 1,916
1 vote
1 answer
221 views

I am trying to program some game with OpenGL and read a whole bunch of tutorials. Unfortunately I got a small problem who just interrupts my progress. I created a "Mesh" class where I handover an ...
linux_lover's user avatar
2 votes
1 answer
1k views

I'm rendering a polygon in OpenGL with a vertex array called vertices and a final index buffer called DRAW_ORDER with CCW winding. I have back-face culling enabled, and I make draw calls using ...
William's user avatar
  • 111
0 votes
2 answers
518 views

When I say storage layout, I mean what I define with glVertexAttribPointer. Is this state saved in the currently bound VAO or the buffer I bound to GL_ARRAY_BUFFER?
mskr's user avatar
  • 405
0 votes
0 answers
258 views

I'm building my own game engine in C++14 with a core OpenGL 4.3 back-end. I'm following the following tutorials: http://www.learnopengl.com/ http://antongerdelan.net/opengl/ I also follow these books:...
cjdb's user avatar
  • 46
0 votes
1 answer
622 views

So, I am trying to make a basic "Drawable" class that handles a lot of the drawing for me in the background and I want to use modern OpenGL (no begin and end statements). I keep just getting a blank ...
guitar80's user avatar
  • 726
0 votes
0 answers
558 views

I have tried following this and this to get vertex arrays from jogl to work and, although its not throwing any errors any more, it also isn't rendering anything but a blank screen. Here is the code: ...
Jordan Schneider's user avatar
3 votes
1 answer
2k views

I'm trying to get away from immediate mode because I keep getting told that it really isn't the best way to program in Opengl. I found a tutorial that will make a cube and colour it, but it doesn't ...
WhyYouNoWork's user avatar
1 vote
3 answers
2k views

GLuint VertexArrayID; glGenVertexArrays(1, &VertexArrayID); glBindVertexArray(VertexArrayID); As you can see from the above code, some tutorials use this before using opengl. But a tutorial that I ...
Ozum Safa's user avatar
  • 1,528
0 votes
2 answers
884 views

I have the following code to try to draw a rectangle using vertex arrays: glEnableClientState( GL_NORMAL_ARRAY ); glNormalPointer( GL_FLOAT, 0, &mNorms[ 0 ] ); glEnableClientState( ...
xpnctoc's user avatar
  • 62
1 vote
1 answer
388 views

I want to draw multiple polygon shapes (where each shape has it's own set of vertices). I want to be able to position these shapes independently of each other. Which API can i use to set the ...
AlvinfromDiaspar's user avatar
4 votes
1 answer
633 views

I'm drawing an interleaved buffer - it is a generic vertex attribute buffer. The layout consists of three floats as a vertex coordinate, and two other float attributes, interleaved thus: | float |...
Riot's user avatar
  • 16.9k
0 votes
3 answers
1k views

I have a couple questions about how OpenGL handles these drawing operations. So lets say I pass OpenGL the pointer to my vertex array. Then I can call glDrawElements with an array of indexes. It will ...
Klayton Curran's user avatar
0 votes
1 answer
287 views

I'm using OpenGL with g++. This simple code works fine in my system. It draws a rectangle as expected. GLfloat vertices[] = { 0,0,0, //0 0,6,0, //1 6,6,0, //2 6,0,0, //3 }; GLint ...
Shashwat's user avatar
  • 2,698
0 votes
1 answer
158 views

i'm trying to learn how to handle VBOs (VertexBufferObjects), but i can't get further than the Vertex Arrays. I followed some basic tutorials on this topic, each teaching a different way, making it ...
Matze's user avatar
  • 553
2 votes
0 answers
137 views

Is there any fast algorithm to merge polygons together as in the image below? Notice that new vertexes are created in the process. Is there any way to achieve this fast enough as to implement it in a ...
Leo's user avatar
  • 1,264
2 votes
2 answers
765 views

I'm attempting to hack and modify several rendering features of an old opengl fixed pipeline game, by hooking into OpenGl calls, and my current mission is to implement shader lighting. I've already ...
Zain Syed's user avatar
  • 493
0 votes
0 answers
94 views

For a smoother surface appearance of the terrain, the solution will be to associate a single not normal to a triangle, but a normal to associate to each of three vertices of the triangle. So, when I'...
Pépito's user avatar
  • 57
0 votes
1 answer
349 views

I'm pretty new to OpenGL ES, but all I'm trying to do is draw indexed vertices using glDrawElements in a Character class. I've gotten this to work before inside of my GLKViewController class, but when ...
michaelsnowden's user avatar
0 votes
2 answers
789 views

I've been trying to use OpenGL in Qt with shaders and a simple vertex array. I basically want a plain to be drawn in the middle of the screen but nothing appears when I run the program. I'm basing my ...
BlastDV's user avatar
  • 110
0 votes
1 answer
152 views

Can I use the 3D tex coord function for 2D textures by setting the Z value to 0 in OpenGL 2.1? Are there any 3D functions that I can not use for 2D? I can't use 2D functions because this is for a 2D/...
user82779's user avatar
0 votes
1 answer
962 views

I'm writting a simple bitmap font renderer in pySFML and wanted to ask is there a better and faster way to approach this problem. I'm using VertexArray and create a quad for each character in a ...
HankMoody's user avatar
  • 3,183
0 votes
1 answer
850 views

At the beginning of my code I have initialized the vbo: GLuint VBO; then my vertex and color array: GL float vertandcol[]={x1,y1, z1, r1,g1,b1, ...........,x3, y3, z3, r3,g3,b3}; Now I create and ...
flying teapot's user avatar
0 votes
2 answers
522 views

I've to render a scene that include various mesh with openGL. the meshes are defined like this: struct Mesh { frame3f frame; // frame vector<vec3f> pos; // vertex position ...
jack_the_beast's user avatar
2 votes
1 answer
3k views

I am writing an iOS/Android game and looking for the most performant way to render my vertex data with OpenGL ES 2.0. I have two different kinds of data: dynamic data that changes its attributes every ...
Sven's user avatar
  • 153
0 votes
1 answer
582 views

I'm in the process of building a graphics app where the user can specify vertices by clicking on a canvas and then the vertices are used to draw polygons. The app supports line, triangle and polygon ...
Ankur Huralikoppi's user avatar
0 votes
1 answer
2k views

I have a short program which draw a 3D GL.GL_QUADS , here its display() method - public void display(GLAutoDrawable drawable) { .... gl.glBegin(GL.GL_QUADS); // of the color cube ...
URL87's user avatar
  • 11.1k