mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 01:50:24 +08:00
fixed ios build
This commit is contained in:
@@ -80,7 +80,9 @@ const std::string kFragmentShader =
|
||||
void BackgroundRenderer::InitializeGlContent(GLuint textureId, bool oes)
|
||||
{
|
||||
texture_id_ = textureId;
|
||||
#ifdef __ANDROID__
|
||||
oes_ = oes;
|
||||
#endif
|
||||
|
||||
shader_program_ = tango_gl::util::CreateProgram(
|
||||
kVertexShader.c_str(),
|
||||
@@ -102,9 +104,11 @@ void BackgroundRenderer::Draw(const float * transformed_uvs) {
|
||||
glEnable (GL_BLEND);
|
||||
|
||||
glActiveTexture(GL_TEXTURE0);
|
||||
#ifdef __ANDROID__
|
||||
if(oes_)
|
||||
glBindTexture(GL_TEXTURE_EXTERNAL_OES, texture_id_);
|
||||
else
|
||||
#endif
|
||||
glBindTexture(GL_TEXTURE_2D, texture_id_);
|
||||
|
||||
glVertexAttribPointer(attribute_vertices_, 2, GL_FLOAT, GL_FALSE, 0, BackgroundRenderer_kVertices);
|
||||
|
||||
@@ -276,7 +276,7 @@ void postCameraPoseEventNative(const void *object,
|
||||
{
|
||||
if(object)
|
||||
{
|
||||
native(object)->postCameraPoseEvent(x,y,z,qx,qy,qz,qw);
|
||||
native(object)->postCameraPoseEvent(x,y,z,qx,qy,qz,qw,0.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -300,14 +300,15 @@ void postOdometryEventNative(const void *object,
|
||||
if(object)
|
||||
{
|
||||
native(object)->postOdometryEvent(
|
||||
x,y,z,qx,qy,qz,qw,
|
||||
fx,fy,cx,cy,
|
||||
stamp,
|
||||
rtabmap::Transform(x,y,z,qx,qy,qz,qw),
|
||||
fx,fy,cx,cy, 0,0,0,0,
|
||||
rtabmap::Transform(), rtabmap::Transform(),
|
||||
stamp, 0,
|
||||
yPlane, uPlane, vPlane, yPlaneLen, rgbWidth, rgbHeight, rgbFormat,
|
||||
depth, depthLen, depthWidth, depthHeight, depthFormat,
|
||||
conf, confLen, confWidth, confHeight, confFormat,
|
||||
(const float *)points, pointsLen, pointsChannels,
|
||||
vx, vy, vz, vqx, vqy, vqz, vqw,
|
||||
rtabmap::Transform(vx, vy, vz, vqx, vqy, vqz, vqw),
|
||||
p00, p11, p02, p12, p22, p32, p23,
|
||||
t0, t1, t2, t3, t4, t5, t6, t7);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user