Projects > cpp > Issues > Bug #3229

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

Lua version of GLGetUniformTest raise error on iOS when calling glGetUniformfv

Bug #3229 [Closed]
samuele3hu 2013-11-19 07:42 . Updated almost 3 years ago
ricardo 2013-11-21 22:51

What errors ? Please post them here. thanks.

samuele3hu 2013-11-22 08:27

When run GLGetUniformTest test case,the console will display “error in function ‘glGetUniformfv’. argument #33554431 is array of ‘[no object]’; array of ‘(null)’ expected.”

zhangxm 2014-01-08 01:46
  • Target version changed from 3.0-beta to 3.0-rc0
walzer@cocos2d-x.org 2014-01-09 03:00
  • Subject changed from The glGetUniformfv called in the GLGetUniformTest lua test have error in IOS to Lua version of GLGetUniformTest raise error on iOS when calling glGetUniformfv
samuele3hu 2014-02-19 09:03

The test codes as follows:

local matrix = {1,2,3,4, 4,3,2,1, 1,2,4,8, 1.1,1.2,1.3,1.4}
local shader = cc.ShaderCache:getInstance():getProgram("ShaderPositionTextureColor")
local program = shader:getProgram()
shader:use()
local loc = gl.getUniformLocation( program, "CC_MVPMatrix")
gl.uniformMatrix4fv(loc, false, table.getn(matrix), matrix)
local uniformTable = gl.getUniform( program, loc )

The errors happened on the gl.getUniformLocation( program, "CC_MVPMatrix").On the iOS platform based 7.0 the return value is 0,but this index point to "CC_Texture0" in the shader.So,it led to the error when call gl.getUniform.The mac platform have no error.

dumganhar 2014-02-21 05:43
  • Status changed from New to Resolved
dumganhar 2014-02-21 05:43
  • Status changed from Resolved to Closed

Atom PDF

Status:Closed
Start date:2013-11-19
Priority:Normal
Due date:
Assignee:samuele3hu
% Done:

0%

Category:ios, lua
Target version:3.0-rc0

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.