FAQ Database Discussion Community


Find first increasing value in vector

r,min,self,uniform
I draw a random sample from Uniform Distribution by u <- runif (1000,0,1) Now I want to calculate the value of this random variable N = min_n {n : u_n > u_{n-1}} Edit Let say I draw a random sample of size 10. So, I have u= (u_1,u_2,u_3,...,u_10). Now I...

Haskell - Could not deduce … from Context error - OpenGL AsUniform class type

class,haskell,opengl,types,uniform
I'm working on making my data types general instead of taking in the OpenGL type GLfloat. So I started making it take in type a and then just replacing everything with that. Now, I've come to a point where I'm setting uniform variables, but they take in GLfloat's. I'm using...

Declaring array in GLSL based on uniform int

c++,arrays,opengl,glsl,uniform
In the program that I'm coding, I have to generate multiple lights sources and pass is to the shader. As this number is defined outside the shader, I though to pass it through an uniform int and use this to declare the arrays size. uniform int numLights; uniform vec4 ambientColor;...

Meteor -> aldeed->Auto-form How to customize checkbox

twitter-bootstrap,meteor,twitter-bootstrap-3,uniform,meteor-autoform
I have following schema for checkbox: 'category.isParent': { type: Boolean ,defaultValue: false } Following is auto-form code for checkbox: <div class="row"> <div class="col-lg-8 col-md-offset-5 padding-left-0"> {{> afFieldInput name='category.isParent' id='isParent' template="plain"}} </div> </div> Following is generated source code (copied from firefox ) <div class="checkbox"> <label> <div id="uniform-isParent" class="checker"><span><input data-schema-key="category.isParent"...

Random Generator using UNIFORM

vhdl,uniform
I am trying to generate a random number for a little game and I tried to use the UNIFORM function from the package MATH_REAL. I get a value when I test my code, but it never changes. I tried to make the code happen at every rising_edge but it didn't...

glGetProgramiv returns a lower number of active uniforms, why?

java,android,glsl,opengl-es-2.0,uniform
I'm doing a game framework for Android with opengl es 2.0 and glsl in java. I did a method that automatically loads all the active uniform in the GL program to a java map with their locators. The problem I found is that the line GLES20.glGetProgramiv( this.m_GL_Program_ID, GLES20.GL_ACTIVE_UNIFORMS, total, 0);...