mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Merge branch '0.9.0' of ssh://g-truc.git.sourceforge.net/gitroot/ogl-math/ogl-math into 0.9.0
This commit is contained in:
commit
d54f1930d7
@ -3,8 +3,9 @@
|
||||
<glm copyright="Copyright © 2005 - 2010 ">
|
||||
<downloads>
|
||||
<section name="GLM - zip files">
|
||||
<download name="GLM 0.9.0.1" date="21/06/2010" size="714 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.1/glm-0.9.0.1.zip/download"/>
|
||||
<download name="GLM 0.9.0.0" date="25/05/2010" size="1.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.zip/download"/>
|
||||
<download name="GLM 0.9.0.2" date="08/07/2010" size="809 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.2/glm-0.9.0.2.zip/download"/>
|
||||
<download name="GLM 0.9.0.1" date="21/06/2010" size="727 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.1/glm-0.9.0.1.zip/download"/>
|
||||
<download name="GLM 0.9.0.0" date="25/05/2010" size="1.0 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.zip/download"/>
|
||||
<download name="GLM 0.9.B.2" date="30/04/2010" size="1.1 MB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.B.2/glm-0.9.B.2.zip/download"/>
|
||||
<download name="GLM 0.9.B.1" date="03/04/2010" size="964 KB" link="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.zip/download"/>
|
||||
<download name="GLM 0.9.A.2" date="20/02/2010" size="1.3 KB" link="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.zip/download"/>
|
||||
@ -49,8 +50,9 @@
|
||||
<download name="GLM 0.1.0.0" date="02/21/2005" size="29.2 KB" link="http://prdownloads.sourceforge.net/glf/glm-0.1-ur.zip?download"/>
|
||||
</section>
|
||||
<section name="GLM - 7z files">
|
||||
<download name="GLM 0.9.0.1" date="21/06/2010" size="556 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.1/glm-0.9.0.1.7z/download"/>
|
||||
<download name="GLM 0.9.0.0" date="25/05/2010" size="526 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.7z/download"/>
|
||||
<download name="GLM 0.9.0.2" date="08/07/2010" size="651 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.2/glm-0.9.0.2.7z/download"/>
|
||||
<download name="GLM 0.9.0.1" date="21/06/2010" size="569 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.1/glm-0.9.0.1.7z/download"/>
|
||||
<download name="GLM 0.9.0.0" date="25/05/2010" size="514 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.0/glm-0.9.0.0.7z/download"/>
|
||||
<download name="GLM 0.9.B.2" date="30/04/2010" size="555 KB" link="https://sourceforge.net/projects/ogl-math/files/glm-0.9.B.2/glm-0.9.B.2.7z/download"/>
|
||||
<download name="GLM 0.9.B.1" date="03/04/2010" size="414 KB" link="https://sourceforge.net/projects/glf/files/glm/glm-0.9.B.1/glm-0.9.B.1.7z/download"/>
|
||||
<download name="GLM 0.9.A.2" date="20/02/2010" size="726 KB" link="https://sourceforge.net/projects/glf/files/glm/glm-0.9.A.2/glm-0.9.A.2.7z/download"/>
|
||||
@ -1524,6 +1526,18 @@
|
||||
</update>
|
||||
</changelog>
|
||||
<page_news>
|
||||
<news index="0053" date="08/07/2010" title="GLM 0.9.0.2 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||
<paragraph>
|
||||
Second update of GLM 0.9.0 with more bug fixes.
|
||||
It also contains a new extension called GLM_GTX_int_10_10_10_2 to use GLM with OpenGL and
|
||||
<link href="http://www.opengl.org/registry/specs/ARB/vertex_type_2_10_10_10_rev.txt">GL_ARB_vertex_type_2_10_10_10_rev</link>.
|
||||
</paragraph>
|
||||
|
||||
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.2/glm-0.9.0.2.zip/download">GLM 0.9.0.2 (zip, 809 KB)</source>
|
||||
<source type="Download" href="https://sourceforge.net/projects/ogl-math/files/glm-0.9.0.2/glm-0.9.0.2.7z/download">GLM 0.9.0.2 (7z, 651 KB)</source>
|
||||
<source type="Link" href="https://sourceforge.net/apps/trac/ogl-math/newticket">Submit a bug report</source>
|
||||
</news>
|
||||
|
||||
<news index="0052" date="21/06/2010" title="GLM 0.9.0.1 released" image="goodies/logo.png" image-mini="image/logo-mini.png">
|
||||
<paragraph>
|
||||
This revision only fixes few extensions bugs.
|
||||
|
@ -1,4 +1,5 @@
|
||||
#include "../../glm/glm.hpp" // glm::vec3, glm::vec4, glm::ivec4, glm::mat4
|
||||
#include <vector>
|
||||
|
||||
struct triangle
|
||||
{
|
||||
@ -17,12 +18,29 @@ void computeNormal(triangle & Triangle)
|
||||
#include "../../glm/gtc/matrix_projection.hpp" // glm::perspective
|
||||
#include "../../glm/gtc/matrix_transform.hpp" // glm::translate, glm::rotate, glm::scale
|
||||
#include "../../glm/gtc/type_ptr.hpp" // glm::value_ptr
|
||||
#include "../../glm/gtc/quaternion.hpp" // glm::quat
|
||||
#include "../../glm/gtx/comparison.hpp" // == !=
|
||||
//#include "../../glm/ext.hpp"
|
||||
|
||||
glm::vec4 const ClearColor = glm::vec4(glm::vec3(0.0f), 1.0f);
|
||||
glm::ivec4 const Viewport = glm::ivec4(0, 0, 640, 480);
|
||||
|
||||
void glUniformMatrix4fv(int location, int count, bool transpose, const float * value);
|
||||
|
||||
void ticket0023()
|
||||
{
|
||||
std::vector<int> vals;
|
||||
vals.push_back(1);
|
||||
vals.push_back(2);
|
||||
vals.push_back(3);
|
||||
std::vector<int>::iterator it1, it2;
|
||||
it1 = vals.begin();
|
||||
it2 = vals.end();
|
||||
it1 != it2; // <-- Here
|
||||
glm::vec3 c;
|
||||
glm::quat q;
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
//triangle Triangle;
|
||||
@ -38,5 +56,7 @@ int main()
|
||||
glm::mat4 Model = glm::scale(glm::mat4(1.0f), glm::vec3(0.5f));
|
||||
glm::mat4 MVP = Projection * View * Model;
|
||||
|
||||
glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP));
|
||||
//glUniformMatrix4fv(LocationMVP, 1, GL_FALSE, glm::value_ptr(MVP));
|
||||
|
||||
ticket0023();
|
||||
}
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "./gtx/gradient_paint.hpp"
|
||||
#include "./gtx/handed_coordinate_space.hpp"
|
||||
#include "./gtx/inertia.hpp"
|
||||
#include "./gtx/int_10_10_10_2.hpp"
|
||||
#include "./gtx/integer.hpp"
|
||||
#include "./gtx/intersect.hpp"
|
||||
#include "./gtx/inverse.hpp"
|
||||
|
@ -28,13 +28,45 @@ namespace glm
|
||||
|
||||
//! Define == operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename vecType>
|
||||
bool operator== (vecType const & x, vecType const & y);
|
||||
template <typename T>
|
||||
bool operator== (
|
||||
detail::tvec2<T> const & x,
|
||||
detail::tvec2<T> const & y);
|
||||
|
||||
//! Define == operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename T>
|
||||
bool operator== (
|
||||
detail::tvec3<T> const & x,
|
||||
detail::tvec3<T> const & y);
|
||||
|
||||
//! Define == operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename T>
|
||||
bool operator== (
|
||||
detail::tvec4<T> const & x,
|
||||
detail::tvec4<T> const & y);
|
||||
|
||||
//! Define != operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename vecType>
|
||||
bool operator!= (vecType const & x, vecType const & y);
|
||||
template <typename T>
|
||||
bool operator!= (
|
||||
detail::tvec2<T> const & x,
|
||||
detail::tvec2<T> const & y);
|
||||
|
||||
//! Define != operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename T>
|
||||
bool operator!= (
|
||||
detail::tvec3<T> const & x,
|
||||
detail::tvec3<T> const & y);
|
||||
|
||||
//! Define != operator for vectors
|
||||
//! From GLM_GTX_comparison extension.
|
||||
template <typename T>
|
||||
bool operator!= (
|
||||
detail::tvec4<T> const & x,
|
||||
detail::tvec4<T> const & y);
|
||||
|
||||
}//namespace comparison
|
||||
}//namespace gtx
|
||||
|
40
glm/gtx/int_10_10_10_2.hpp
Normal file
40
glm/gtx/int_10_10_10_2.hpp
Normal file
@ -0,0 +1,40 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2010-07-07
|
||||
// Updated : 2010-07-07
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/int_10_10_10_2.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_int_10_10_10_2
|
||||
#define glm_gtx_int_10_10_10_2
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtx/raw_data.hpp"
|
||||
|
||||
namespace glm
|
||||
{
|
||||
namespace gtx{
|
||||
//! GLM_GTX_int_10_10_10_2 extension: Add support for integer for core functions
|
||||
namespace int_10_10_10_2
|
||||
{
|
||||
using namespace gtx::raw_data;
|
||||
|
||||
//! From GLM_GTX_int_10_10_10_2 extension.
|
||||
//! Cast a vec4 to an u_10_10_10_2.
|
||||
dword uint10_10_10_2_cast(glm::vec4 const & v);
|
||||
|
||||
}//namespace integer
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "int_10_10_10_2.inl"
|
||||
|
||||
namespace glm{using namespace gtx::int_10_10_10_2;}
|
||||
|
||||
#endif//glm_gtx_int_10_10_10_2
|
21
glm/gtx/int_10_10_10_2.inl
Normal file
21
glm/gtx/int_10_10_10_2.inl
Normal file
@ -0,0 +1,21 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2010-07-07
|
||||
// Updated : 2010-07-07
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/int_10_10_10_2.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace int_10_10_10_2
|
||||
{
|
||||
dword uint10_10_10_2_cast(glm::vec4 const & v)
|
||||
{
|
||||
return dword(uint(v.x * 2047.f) << 0 | uint(v.y * 2047.f) << 10 | uint(v.z * 2047.f) << 20 | uint(v.w * 3.f) << 30);
|
||||
}
|
||||
|
||||
}//namespace int_10_10_10_2
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
@ -17,7 +17,7 @@
|
||||
#define GLM_VERSION_MAJOR 0
|
||||
#define GLM_VERSION_MINOR 9
|
||||
#define GLM_VERSION_PATCH 0
|
||||
#define GLM_VERSION_REVISION 1
|
||||
#define GLM_VERSION_REVISION 2
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Common values
|
||||
|
@ -4,6 +4,12 @@ G-Truc Creation
|
||||
www.g-truc.net
|
||||
glm@g-truc.net
|
||||
|
||||
=============================
|
||||
GLM 0.9.0.2: 2010-07-08
|
||||
-----------------------------
|
||||
- Added GLM_GTX_int_10_10_10_2
|
||||
- Fixed bugs
|
||||
|
||||
=============================
|
||||
GLM 0.9.0.1: 2010-06-21
|
||||
-----------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user