Questions tagged [glkbaseeffect]

The GLKBaseEffect is a class of iOS SDK that provides shaders that mimic many of the behaviors provided by the OpenGL ES 1.1 lighting and shading model, including materials, lighting and texturing. The base effect allows up to three lights and two textures to be applied to a scene.

The GLKBaseEffect class provides shaders that mimic many of the behaviors provided by the OpenGL ES 1.1 lighting and shading model, including materials, lighting and texturing. The base effect allows up to three lights and two textures to be applied to a scene.

11 questions
2
votes
0 answers

Memory leak when changing GLKBaseEffect

I am trying to render two objects with GLKit. Initially I was trying to do this: [Cube drawViewController:self.effect CameraMatrix:&lookatmatrix]; //turn off lighting for floor self.effect.light0.enabled = GL_FALSE; [Floor…
1
vote
1 answer

GLKit in swift don't show anything?

I'm following this tutorial and this. It's going fine but it doesn't show anything on the screen. Render : override func glkView(view: GLKView!, drawInRect rect: CGRect) { glClearColor(0.1, 0.5, 0.0, 1.0) …
1
vote
1 answer

Android GLKBaseEffect equivalent (already existing OpenGL shaders)

I'm learning OpenGL ES 2.0 in Android, do you know of a library providing already existing shaders? I'm on a project with a friend who's developing on iOS, he told me that he can use GLKBaseEffect to avoid devolping custom shaders, as long as we…
1
vote
2 answers

Const positioned light with GLKBaseEffect

I need to set const spot light position with GLKBaseEffect: so when I change modelview, light stays in the same place. How can I achieve this?
kpower
  • 3,871
  • 4
  • 42
  • 62
1
vote
2 answers

Memory usage keeps increasing over time (GLKit - iOS)

I've almost finished my app. One of the views uses GLKit. I just have a problem with memory. Basically what happens is that when GLKView is displayed, the memory consumption constantly rises (seen with Instruments). At a certain point it obviously…
Davide
  • 764
  • 1
  • 6
  • 18
1
vote
1 answer

GLKBaseEffect: light + textures

I'm trying to display some simple object with texture and enable spot light in my scene. I use GLKBaseEffect's texture & light. When textures are disabled - I can see light effect (when I rotate object, it partly becomes dark, as expected). But when…
kpower
  • 3,871
  • 4
  • 42
  • 62
0
votes
0 answers

glUniform. Fragment shader fails to compile with uniform or varying compares

I've created a subclass of GLKViewController to render some waveforms using GLKBaseEffect which all works fine. I want to use my own vertex and fragment shaders, so I used the boilerplate code from the default OpenGL Game project. Both shaders…
VaporwareWolf
  • 10,143
  • 10
  • 54
  • 80
0
votes
1 answer

OpenGL app's framerate has detiorated following an upgrade from iOS7.1 to iOS8.1

The app uses OpenGL ES2 and the GLKit framework, and the render/update loop provided by GLKitViewController. It used to run at a steady 60 fps on my iPad2 with iOS7.1, but once I updated the iPad2 to iOS8.1, the exact same code now fluctuates…
Amral
  • 1
  • 1
0
votes
2 answers

Enabling light0 in GLKit results in loss of color

I've been modifying some sample code from OpenGL ES 2 tutorials. I can set the GLKBaseEffect to use a constant colour. Now, when I go to add light to the scene, the colour is lost and I am left with 2 black cubes. Below is the draw method: -…
Lancophone
  • 310
  • 2
  • 17
0
votes
1 answer

GLKBaseEffect set Constant color

I want use GLKBaseEffect for coloring my 3DModel. I created examplar of GLKBaseEffect GLKBaseEffect effect; When i setup OpenGL i write: effect = new GLKBaseEffect(); When i draw my figure i use effect: effect.Light0.SpecularColor = new Vector4…
0
votes
0 answers

OpenGL ES texture blending is not being affected

Note: I am using GLKBaseEffect. Im not sure what i could be doing wrong. Basically, for my GLKBaseEffect, i have setting up 2 textures. But i am only seeing the 1st texture (texture2d0) rendered. I would like to have the 2nd texture (texture2d1) to…
AlvinfromDiaspar
  • 6,611
  • 13
  • 75
  • 140