Questions tagged [vertex]

A vertex is a single point in a 3D object, used for simple model creation or advanced animation systems.

756 questions
0
votes
1 answer

Directx Vertex Color

code is here as requested: void MakeTeapotRed() { D3DXCreateTeapot(Device, &Teapot, 0); } so how do I change the vertex color of the teapot? If your thinking material, i already know that, I just need to know the color vertex which is supposed…
0
votes
1 answer

glMultiDrawElements: Values to pass to "indices" parameter (GLvoid**)

I had to convert some code (which deals with building a VBO of data for the outlines of 2D shapes, i.e. they are not just triangle meshes, they can be an arbitrary length polygon outline) from using primitive restart to using glMultiDrawElements. I…
Steven Lu
  • 41,389
  • 58
  • 210
  • 364
0
votes
1 answer

CGFX shader extracting data from alpha channel

I posted this as well on Nvidia Developer discussion. http://forums.developer.nvidia.com/devforum/discussion/9946/extracting-numbers-cgfx-shader I am learning to write my first cgfx shader- a terrain shader. So I can only use 1 vertex channel (the…
fghajhe
  • 239
  • 1
  • 2
  • 8
0
votes
1 answer

Retrieve Vertex Coordinates

My question is: Is there a way to retrieve the coordinates of a vertex after translations or rotation? Example: x = 10, y = 10, z = 0 After a series of calls to glTranslate or glRotate how can I know the actual status of x, y and z? Thanks.
James
  • 5
  • 2
0
votes
2 answers

How to tell about vertex attributes to shaders?

I want to switch between shader programs runtime, with a fixed VBO array. I thik I need no more than the following functions with fixed vertex attributes index (I want 0 for position, 1 for texture…
Geri Borbás
  • 15,810
  • 18
  • 109
  • 172
0
votes
1 answer

Obj loader in directX 9

I wrote a program to load an obj file in directx 9. All I do is read the vertex data and the index data from the file ( I did not read any texture or vertex normal data). Then I plug this data directly into the vertex and index buffers. When I run…
carboncopy
  • 37
  • 9
-1
votes
1 answer

Updating vertex buffer via staging buffer causes my application to error out

I was able to update my vertex buffer using the vkCmdUpdateBuffer method, while following the solution to a similar problem asked in this stack thread. However, I am struggling to implement the solution utilizing a staging buffer and the…
-1
votes
1 answer

Covering k edges with minimum number of vertices

I am trying to write a DP algorithm that calculates the minimum number of vertices we need to select in order to cover k edges on a graph. The code I have written so far…
user12610369
-1
votes
1 answer

"cant add two pointers" error C2110, using a GLfloat array.cannot

So i think this is the part of my code that has the error. I think im not sending my array correctly or its something different when trying to add my vertex vectors. void tetrahedron(GLfloat vertice[6][3]) { glTranslatef(0.3f, 0.0f,…
-1
votes
2 answers

Creating a polygon in Python

I'm generating random coordinates in Python for each of the vertex as follows: n = 10 V = [] V=range(n) #vertices random.seed(1) points = [] for i in V: x = random.randint(0,50) y = random.randint(0,50) points.append((x,y)) I need…
ccc
  • 574
  • 2
  • 9
  • 22
-1
votes
2 answers

OpenGL-GLSL drawing 3D GL_LINES vertex shaders vs. vertex

I am trying to draw 3D lines in OpenGL using shaders ... so far no way to do it. I got this working just fine: void draw_bonds (int nbonds) { glDisable (GL_LIGHTING); glEnableClientState(GL_VERTEX_ARRAY); // in 3D each bonds is defined using…
-1
votes
1 answer

OpenGL Mesh Class VertexColor

I wanna create a dynamic mesh class but i must do something wrong when I enable vertex colors. In my example I have 2 fragment shaders (fragment.glsl -> solid red color / fragmentExp.glsl -> vertexColor). Next I create two primitives one triangle…
Michael
  • 177
  • 2
  • 15
-1
votes
2 answers

Verticies rendered at the wrong position (OpenGl)

When I try to render a PERFECT cube, one vertex renders in the middle of the cube - (.5, .5, -.5) instead of (1, 1, 1) - and one renders one unit too high - (1, 1, 1) instead of (1, 0, 0). I really don't have a single clue how that could happen. I…
-1
votes
1 answer

how to find a dxf entity is inside another entity?

3d letter from DXF File In the image there is a 3d letter O from dxf file. O represented as two rounds.so there is two entity. How can i detect one entity is inside another (in case of o,how to know small round is inside big round)?
-1
votes
1 answer

create meshed rectangle from its vertex values in matlab

I am facing some problem in creating the meshed rectangle. I know the max and min coordinate values (xmin, xmax, ymin, ymax, zmin, zmax). So, I can easily find the vertex of the rectangle which are [xmin ymin zmin; xmax ymin zmin; xmax ymax…
galib
  • 93
  • 2
  • 9