Questions tagged [vertex-array]
109 questions
0
votes
0 answers
OpenGL Terrain 3D calcul normal summits -> blured
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'm trying to implement it, I found some problems…

Pépito
- 57
- 4
- 11
0
votes
1 answer
gldrawelements bad access in xcode when used outside of GLKViewController
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 I tried creating a Character class which would…

michaelsnowden
- 6,031
- 2
- 38
- 83
0
votes
2 answers
OpenGL + Qt 4.8 is not drawing anything
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 code in the "Texture" example of Qt, everything…

BlastDV
- 112
- 7
0
votes
1 answer
In OpenGL 2.1, is it safe to use a 3D tex coord, even in 2d space (with a 2D texture)?
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/3D wrapper and it's too inefficient to try and…

user82779
- 65
- 1
- 3
- 9
0
votes
1 answer
Bitmap fonts in SFML (OpenGL)
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 string. Each quad has appropriate texture coordinates…

HankMoody
- 3,077
- 1
- 17
- 38
0
votes
1 answer
opengl VBO rendering doesn't work properly
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 bind the vbo and allocate the…

flying teapot
- 23
- 4
0
votes
2 answers
Render a scene with openGL
I've to render a scene that include various mesh with openGL. the meshes are defined like this:
struct Mesh {
frame3f frame; // frame
vector pos; // vertex position
vector norm; // vertex…

jack_the_beast
- 1,838
- 4
- 34
- 67
0
votes
1 answer
Not able to get output with glDrawElements() & glMultiDrawElements()
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 modes. Drawing a line and triangle is done by…
0
votes
1 answer
Drawing 3D polygon using vertex array
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
// Top-face
gl.glColor3f(0.0f,…

URL87
- 10,667
- 35
- 107
- 174
0
votes
2 answers
XNA - Drawing 2D lines
I already looked at http://msdn.microsoft.com/en-us/library/bb196414.aspx#ID2EEF
here they explain how to draw 2D lines in xna, but i get an exeption(see script)
{
int points = 3;//I tried different values(1,2,3,4)
…

MooshBeef
- 279
- 1
- 5
- 15
0
votes
0 answers
D3D9 Creating a Circle
I posted a different question earlier that gave me a bug using D3DPT_TRIANGLEFAN but I tried to recode my circle differently. Only problem is that it doesn't draw to the screen... I have tried debugging it but everything seems to be going perfect…

Pasha Kravtsov
- 11
- 3
0
votes
1 answer
Textures are black in JOGL using VAO
So far, I used the deprecated immediate mode rendering, and I'm trying to switch to VAO then VBO. 2D quads are normally rendered using VAO, but when I'm trying to attach a texture, it remains black. I would really appreciate if somebody could take a…

LugaidVandroiy
- 209
- 2
- 17
0
votes
1 answer
Introducing a depth buffer to a renderer that uses multiple vertex array objects
I have a rendering infrastructure that uses multiple vertex array objects to render a complex scene. Each vertex array object is responsible for maintaining its own set of bound buffers, pointers and attributes (as they are designed to do).
Given…
user236520
0
votes
1 answer
What is required to use Vertex Array Objects?
I am trying to use Vertex Array Objects in one of my programs, but it seems that my PC don't support this feature.
When I execute this function glewIsSupported("GL_ARB_vertex_array_object"), it returns false.
If I try to update my video driver,…

user1905910
- 162
- 1
- 13
0
votes
0 answers
Drawing using Dynamic Array and Buffer Object
I have a problem when creating the vertex array and the indices array. I don't know what really is the problem with the code, but I guess is something with the type of the arrays, can someone please give me a light on this?
#define…

user1905910
- 162
- 1
- 13