Tag Info

New answers tagged

0

About the place of the camera location code: If you are not using the camera in the step() function (which your probably don't), it might get updated multiple times per frame, but only get used once in the draw() function. So to prevent a waste of calculations, I'd place it in the latter. Related to the jittery camera: there is no good reason for using a ...


1

There are a bunch of GL extensions related to ETC2 support: OES_compressed_ETC2_RGB8_texture OES_compressed_ETC2_sRGB8_texture OES_compressed_ETC2_punchthroughA_RGBA8_texture OES_compressed_ETC2_punchthroughA_sRGB8_alpha_texture OES_compressed_ETC2_RGBA8_texture OES_compressed_ETC2_sRGB8_alpha8_texture The ES3 compatibility extension aggregates those (and ...


0

The only way to go about this is to use Uniforms. You ALWAYS want to keep the Vertexs uv´s in the local space. for the reason that you don't want to have multiple vertex data containing almost the same information. Offseting and scaling will only happen on a per mesh basis so it wont be that bad for it either. Sometimes it will be on a special case basis ...


0

You need to fist query the sampler uniform locations with glGetUniformLocation, then set the sampler to the same texture unit that you've enabled with glActiveTexture. Thus, some sample code for this would look like: mySamplerLoc = glGetUniformLocation(programId, "mySampler"); ... glUniform1i(mySamplerLoc, 0); glActiveTexture(GL_TEXTURE0); ...


0

In brief, you want code like this: glActiveTexture(GL_TEXTURE0); glBindTexture(GL_TEXTURE_2D, this->texture2DObj); glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, this->otherTexture2DObj); GLint samplerArrayLoc = glGetUniformLocation(shaderObject, "texture"); const GLint samplers[2] = {0,1}; // we've bound our textures in textures 0 and 1. ...


0

I finally found the error. It was just wrong export settings, I just didn't expect that to have this sort of impact. In 3ds Max I changed the projection options -> normal map space -> red: right to red: left What a gigantic waste of time.



Top 50 recent answers are included