Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to convert the following code to Java:

glVertexPointer( 3, GL_FLOAT, 0, &(mesh.m_PositionBuffer[0]) );

Where mesh::mPositionBuffer is std::vector<glm::vec3>;

How would I make a similar call to glVertexPointer with a first index to the position buffer?

share|improve this question
1  
Which Java OpenGL API are you using? –  Josh Petrie Jan 26 '12 at 16:20
    
I'm using LWJGL –  da4c30ff Jan 26 '12 at 16:30
    
Am I taking crazy pills or is that code C++? EDIT: Oh. Porting tag. –  Byte56 Jan 26 '12 at 17:54
add comment

1 Answer

You should look at the overload set in the documentation. Probably the candidate you're interested in would be the glVertexPointer overload that takes a FloatBuffer, which you'd fill with the components of the mesh's position vertices.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.