相关疑难解决方法(0)

在OpenGL ES中绘制一个球体

我想绘制一个球体,我知道如何使用glBegin()和glEnd()之类的调用在OpenGL中完成它.

但ES中没有任何内容.

建议/教程链接?

geometry opengl-es opengl-es-2.0

14
推荐指数
1
解决办法
2万
查看次数

在OPENGL ES中绘制球体的问题

我一直在尝试用OpenGL ES创建自己的球体,我按照这里描述的数学运算http://www.math.montana.edu/frankw/ccp/multiworld/multipleIVP/spherical/learn.htm

然而,当我绘制球体(只是顶点)时,只绘制了一半球体.你能指点一下我在下面给出的代码中的确切问题:

public class Sphere {

    static private FloatBuffer sphereVertex;
    static private FloatBuffer sphereNormal;
    static float sphere_parms[]=new float[3];

    double mRaduis;
    double mStep;
    float mVertices[];
    private static double DEG = Math.PI/180;
    int mPoints;

    /**
     * The value of step will define the size of each facet as well as the number of facets
     *  
     * @param radius
     * @param step
     */

    public Sphere( float radius, double step) {
        this.mRaduis = radius;
        this.mStep = step;
        sphereVertex = FloatBuffer.allocate(40000);
        mPoints = …
Run Code Online (Sandbox Code Playgroud)

android opengl-es

9
推荐指数
1
解决办法
2万
查看次数

标签 统计

opengl-es ×2

android ×1

geometry ×1

opengl-es-2.0 ×1