Results 1 to 1 of 1

Thread: PowerVR OpenGL | ES 2 SDK problem?

Threaded View

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    10

    PowerVR OpenGL | ES 2 SDK problem?

    Hello,

    I'm trying to draw a triangle strip with the OpenGL | ES 2 SDK from Imagination Tech for windows (OGLES2_WINDOWS_PCEMULATION_2.03.23.1162)

    It works well when using GL_FLOAT's for my vertices but when using GL_FIXED it seems to allways miss the last vertex. Let me show a working example drawing a plane:

    Code :
    GLfloat pfVertices[] = { 0.0f, 0.0f,
    				0.0f, 1.0f,
    				1.0f, 0.0f,
    				1.0f, 1.0f};
     
    GLushort indeces[] = {0, 2, 1, 3};
    glVertexAttribPointer(VERTEX_ARRAY, 2, GL_FLOAT, GL_FALSE, 0, pfVertices);
    glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_SHORT, indices);

    when using fixed data type like this;

    Code :
    int fixedVertices[] = {  0 << 16, 0 << 16,
    				0 << 16, 1 << 16,
    				1 << 16, 0 << 16,
    				1 << 16, 1 << 16};
     
    GLushort indeces[] = {0, 2, 1, 3};
    glVertexAttribPointer(VERTEX_ARRAY, 2, GL_FIXED, GL_FALSE, 0, fixedVertices);
    glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_SHORT, indeces);

    only one single triangle appears.

    My idea is that the last vertex is discarded when using fixed data type, the following example shows a working plane:

    Code :
    int fixedVertices[] = {   0 << 16, 0 << 16,
    				0 << 16, 1 << 16,
    				1 << 16, 0 << 16,
    				1 << 16, 1 << 16,
    				2 << 16, 0 << 16};
     
    GLushort indeces[] = {0, 2, 1, 3, 4};
    glVertexAttribPointer(VERTEX_ARRAY, 2, GL_FIXED, GL_FALSE, 0, fixedVertices);
    glDrawElements(GL_TRIANGLE_STRIP, 5, GL_UNSIGNED_SHORT, indeces);

    Do anyone else having the same problems? Is this a bug? On desktop GL this works without any problems.
    Attached Files Attached Files

Similar Threads

  1. PowerVR SDK Windows OpenGL ES 1.1 Bug
    By McNopper in forum OpenGL ES
    Replies: 2
    Last Post: 11-16-2006, 11:11 AM
  2. Which SDK of PowerVR i have to use!
    By beecatch in forum OpenGL ES
    Replies: 3
    Last Post: 10-31-2006, 02:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean