Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Jun 2008
Offline Last Active Sep 17 2015 04:10 AM

Topics I've Started

problem with vbo

15 September 2015 - 01:26 AM

I have a camera and i created a system for drawing on the screen the trace of movement of mouse.
The problem is that if i insert in the vbo directly the coords of the mouse of an 800 x 600 window like 172,12,0 ecc..... i see nothing, i must divide the original x and y by a value for see something.
i have a camera with a position of 0,0,15 and i set up a prospective projection.
Now the trace of the mouse is far away on the 15 on z is possible to use unproject or something of similar for see the drag of the mose in the real position?
ps. i use glm.


14 September 2015 - 02:10 AM

I have a problem with glBufferData:

glBufferData(GL_ARRAY_BUFFER, xxxxx, (GLvoid*)glm::value_ptr(*m_pBuffer->getAllData()), m_pOptions->GetDynamics());

i use a wrapper around a vector for manage the vertexes, i don't have a struct with the vertex composition but a list of these wrapper for position , normal eccc...

then the vector in the wrapper is a glm::vec3 and i see that the sizeof of a glm::vec3 is 12.

I don't know how calculate the xxxxxx i see that for 3 vertexes ( 3 glm:vec3) the correct value is 18 but i don't understand why and how calculate the correct value for bigger vbo.

can you help me?
and what is this param?

translate vector

12 September 2015 - 05:26 AM

hello i have a vector V v1 v2 and i would translate to the points a a1 a2.

How i can do that?is a simple translation? the direction must be the same for the vector v and vector a.thanks


orbit camera math

10 September 2015 - 01:02 AM

I would create a unit sphere coord in my orbit camera.
i use this:

float s = glm::min<float>(m_width, m_height);
float xp = ((m_deltax - (m_width/2 )) / s);
float yp = ((m_deltay -( m_height/2 )) / s);

this works fine , but it have a max of 0.6 for x and 0.4 for the y i would the max to 2pi for the x and pi for y.
now i ask if the creation of the sphere coords is correct and how i can fit the values to 0-360 for x and 0-180 for y.
now is a semisphere , but i would a sphere

self illumination in glsl

31 August 2015 - 06:03 AM

hello, i search for my project a shader effect like sketchup, are called self illumination light?
i would that my hardware instancing in glsl is illumined without light , light position attenuation eccc...