Giter Club home page Giter Club logo

Comments (5)

Groovounet avatar Groovounet commented on July 21, 2024

Hi,

What compiler are you using?

Thanks,
Christophe

from glm.

gbarnes avatar gbarnes commented on July 21, 2024

I'm using Visual Studio 2012 with the following Platform Toolsets: Visual Studio 2012 (v110). Sry, forgotten to mention it :)

from glm.

Groovounet avatar Groovounet commented on July 21, 2024

erm... I actually really don't understand what's causing this issue...

Can you try GLM 0.9.4 branch https://github.com/g-truc/glm/zipball/0.9.4 and confirm the problem?

If you still have an issue can you send me a code to reproduce the issue?

Thanks,
Christophe

from glm.

gbarnes avatar gbarnes commented on July 21, 2024

I tried it and visual studio still gives me the same errors.

I'm using DirectX 9 and OpenGL 4.3 ... its a very large code base but I'm using the following code:

GlobalHeader.h:
#include < glm\glm.hpp > <-- this is included in a global source file

in the global header file I've the following typedefs:
typedef glm::vec3 dmVector3;
typedef glm::vec2 dmVector2;
typedef glm::vec4 dmVector4;
typedef glm::mat4x4 dmMatrix4;

dmGLTriangleNode.cpp:

#include < glm/gtc/matrix_transform.hpp >
#include < glm/gtc/type_ptr.hpp >

glm::mat4 trans = glm::rotate(dmMatrix4(1.0f), mAngle*=0.4f , VECTOR_UP);
this->VSetTransform(&trans, null);

this->mShader.VBind();

int locationProjection = this->mShader.GetLocation("projectionMatrix");
int locationView = this->mShader.GetLocation("viewMatrix");
int locationToWorld = this->mShader.GetLocation("toWorldMatrix");

glUniformMatrix4fv(locationProjection, 1, GL_FALSE, glm::value_ptr(pScene->GetCamera()->GetProjection()));
glUniformMatrix4fv(locationView, 1, GL_FALSE, glm::value_ptr(pScene->GetCamera()->GetView()));
glUniformMatrix4fv(locationToWorld, 1, GL_FALSE, glm::value_ptr(this->mProperties.ToWorld()));

whenever I use glm::value_ptr(); it gives me the error with the quaternion.hpp since there is a overloaded function for quaternions. I excluded the overload function of value_ptr and it works but ran into another issue with the glm::rotate function as described above.

from glm.

Groovounet avatar Groovounet commented on July 21, 2024

Hi,

I still have no solution for you... Is there any chance that your application is actually defining "value_ptr" with a define?

Thanks,
Christophe

from glm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.