Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7523031
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:40:45+00:00 2026-05-30T02:40:45+00:00

I have a blender image exported using Jeff LaMarche .h export script. I am

  • 0

I have a blender image exported using Jeff LaMarche .h export script. I am trying to get it to render in OpenGL ES 1.1. I don’t think I am passing my vertices, normals, and texture coords right. Can someone help me out. Here is what I have.

This is the .h file with my vertices,etc.

struct vertexDataTextured
{
    GLKVector3      vertex;
    GLKVector3      normal;
    GLKVector2      texCoord;
};
typedef struct vertexDataTextured vertexDataTextured;
typedef vertexDataTextured* vertexDataTexturedPtr;


static const vertexDataTextured MeshVertexData[] = {
    {/*v:*/{0.351562, 0.828125, -0.242188}, /*n:*/{0.183599, 0.982971, 0.005310}, /*t:*/{0.199397, 0.671493}},
    {/*v:*/{0.445312, 0.781250, -0.156250}, /*n:*/{0.715171, 0.222724, 0.662465}, /*t:*/{0.216226, 0.665719}},
    {/*v:*/{0.476562, 0.773438, -0.242188}, /*n:*/{0.964446, 0.263863, 0.012665}, /*t:*/{0.216737, 0.679097}},
    {/*v:*/{-0.476562, 0.773438, -0.242188}, /*n:*/{-0.964446, 0.263863, 0.012665}, /*t:*/{0.052251, 0.677297}},
    {/*v:*/{-0.445312, 0.781250, -0.156250}, /*n:*/{-0.715171, 0.222724, 0.662465}, /*t:*/{0.053356, 0.663955}},

…

and here is my drawing code

…

glClearColor(1.0f, 1.0f, 0.0f, 1.0f); 
glClear(GL_COLOR_BUFFER_BIT); 


glMatrixMode(GL_MODELVIEW); 
glLoadIdentity(); 
glTranslatef(0.0f,-0.3f,-0.5f);


glVertexPointer(3, GL_FLOAT, 0, MeshVertexData); 
glEnableClientState(GL_VERTEX_ARRAY); 


glNormalPointer(GL_FLOAT, 0 , MeshVertexData);
glEnableClientState(GL_NORMAL_ARRAY);


glEnable(GL_TEXTURE_2D);                                             
glEnable(GL_BLEND);                                                  

glTexCoordPointer(2, GL_FLOAT,0,MeshVertexData);                      
glEnableClientState(GL_TEXTURE_COORD_ARRAY);                        

glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); 
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); 

//glTranslatef(0.0f,-1.0f,-1.5f); 

glDrawArrays(GL_TRIANGLES, 0, sizeof(MeshVertexData)/ sizeof(vertexDataTextured));                               



glDisableClientState(GL_VERTEX_ARRAY); 
glDisableClientState(GL_NORMAL_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY); 

Basically it looks like my screen threw up triangles everywhere. Any help for this N00B is very appreciated. Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T02:40:46+00:00Added an answer on May 30, 2026 at 2:40 am

    You’re setting your stride to 0. It should be sizeof (vertexDataTextured). It tells OpenGL how many bytes there are between one vertex (or normal, or texture coord) and the next.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple skeletal mesh created with Blender and I'm trying to export
I'm using OpenGL ES 1.1 and working on converting an OBJ export from Blender
I have a function which loads an image/text into my game.I'm using gluBuild2DMipmaps() to
Using Blender 2.49's Python API I'm creating a mesh. I have a list of
I have made a model using Sketchup, and have tested rendering it using Blender
I have a blender model and below is a image of how my model
I'm using OpenGL to draw in 2D. I'm trying to overlay textures with alpha.
I've been attempting to render text onto an openGL window using SDL and the
I have a model with 2 animations, created in Blender and exported to fbx.
Have just started using Google Chrome , and noticed in parts of our site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.