The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
gluPerspective SDL 2.0 NDK OpenGL ES 1.1
Timodor


Joined: 14 Apr 2013
Posts: 72
Location: Australia
Hello Dudes,

I'm now trying to enable 3D on my Android using SDL 2.0.

I downloaded the glu source directory from https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/glu
I added it to the jini/directory, tried comping no luck and the includes don't seem to work glu.h can't be found.

Anyone have an experience getting OpenGL ES 1.1 using the NDK to work with gluPerspective?
gluPerspective SDL 2.0 NDK OpenGL ES 1.1
Anthony Walter
Guest

I don't know if this helps but, you can simply implement it yourself:
 
procedure gluPerspective(fovY, aspect, zNear, zFar: GLdouble);
var
  fw, fh: GLdouble;
begin
  fh := Tan(fovY / 360 * PI) * zNear;
  fW := fH * aspect;
  glFrustum(-fW, fW, -fH, fH, zNear, zFar);
end;