ok, SngToDbl should solve a bit of problems I had. Man, talk about hacking, well if it works then it works! heh... I'll try looking into converting some of my C code to Blitz and see if that SngToDbl helps me. Any OpenGL commands that deal with Doubles or Pointers had me stomped in Blitz alone. I guess if we need some kind of opengl functionality that can't be done in blitz alone, then we can add optional dlls later.
Well, as for other formats... every now and then I see people talking about .png for using the alpha component with it. But I'm not an alpha freak. I know tga uses the alpha component, so people can use that. If you have it written, why waste it. Use what you have. The external image loaders/savers library can be added later if needed.
DrawArrays are supposely faster then GLLists. But,they involve using vertex,color,texture coordinates and normal structures. As for DrawArrays, you would have to pass the pointer to functions like glVertexPointer, glColorPointer, and glTexCoordPointer. Before you use DrawArrays, you need to use the glEnableClientState function to enable the arrays( the structures arrays ) that DrawArrays will use. Below, is simple C/C++ code that does this:
But, that stuff can be also be done later for optional rendering ways. I like it because I can change the data of the structure arrays to anything I want at anytime for stuff like vertex animation or just to simply change color.
Ok, if we can use blitz banks and pass pointers around with "*" to directly to opengl dll's, can't we just use blitz banks instead of rewritting blitz commands that do the same thing? Sorry, I guess I'm not to clear on why the dll memory stuff is needed afterall except mabie for a speed increase. I'll be glad to do it though if it's really needed.
[3:00am ZZzzz time...]
Well, as for other formats... every now and then I see people talking about .png for using the alpha component with it. But I'm not an alpha freak. I know tga uses the alpha component, so people can use that. If you have it written, why waste it. Use what you have. The external image loaders/savers library can be added later if needed.
DrawArrays are supposely faster then GLLists. But,they involve using vertex,color,texture coordinates and normal structures. As for DrawArrays, you would have to pass the pointer to functions like glVertexPointer, glColorPointer, and glTexCoordPointer. Before you use DrawArrays, you need to use the glEnableClientState function to enable the arrays( the structures arrays ) that DrawArrays will use. Below, is simple C/C++ code that does this:
// // Multiple Vertex Arrays Example // struct Vertex { float x, y, z; }; Vertex g_cubeVertices[] = { { -1.0f,-1.0f, 1.0f }, { 1.0f,-1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { -1.0f, 1.0f, 1.0f }, { -1.0f,-1.0f,-1.0f }, { -1.0f, 1.0f,-1.0f }, { 1.0f, 1.0f,-1.0f }, { 1.0f,-1.0f,-1.0f }, { -1.0f, 1.0f,-1.0f }, { -1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f }, { 1.0f, 1.0f,-1.0f }, { -1.0f,-1.0f,-1.0f }, { 1.0f,-1.0f,-1.0f }, { 1.0f,-1.0f, 1.0f }, { -1.0f,-1.0f, 1.0f }, { 1.0f,-1.0f,-1.0f }, { 1.0f, 1.0f,-1.0f }, { 1.0f, 1.0f, 1.0f }, { 1.0f,-1.0f, 1.0f }, { -1.0f,-1.0f,-1.0f }, { -1.0f,-1.0f, 1.0f }, { -1.0f, 1.0f, 1.0f }, { -1.0f, 1.0f,-1.0f } }; struct Color { float r, g, b; }; Color g_cubeColors[] = { { 1.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 1.0f, 0.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 1.0f, 0.0f }, { 0.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, 1.0f }, { 0.0f, 0.0f, 1.0f }, { 1.0f, 1.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 1.0f, 1.0f, 0.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 1.0f, 0.0f, 1.0f }, { 0.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f }, { 0.0f, 1.0f, 1.0f } }; struct TexCoord { float tu, tv; }; TexCoord g_cubeTexCoords[] = { { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f }, { 0.0f, 0.0f }, { 0.0f, 1.0f }, { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f }, { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f }, { 0.0f, 0.0f }, { 0.0f, 0.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 0.0f, 1.0f } }; glBindTexture( GL_TEXTURE_2D, g_textureID ); glEnableClientState( GL_VERTEX_ARRAY ); glEnableClientState( GL_COLOR_ARRAY ); glEnableClientState( GL_TEXTURE_COORD_ARRAY ); glVertexPointer( 3, GL_FLOAT, 0, g_cubeVertices ); glColorPointer( 3, GL_FLOAT, 0, g_cubeColors ); glTexCoordPointer( 2, GL_FLOAT, 0, g_cubeTexCoords ); glDrawArrays( GL_QUADS, 0, 24 ); glDisableClientState( GL_VERTEX_ARRAY ); glDisableClientState( GL_COLOR_ARRAY ); glDisableClientState( GL_TEXTURE_COORD_ARRAY );
But, that stuff can be also be done later for optional rendering ways. I like it because I can change the data of the structure arrays to anything I want at anytime for stuff like vertex animation or just to simply change color.
Ok, if we can use blitz banks and pass pointers around with "*" to directly to opengl dll's, can't we just use blitz banks instead of rewritting blitz commands that do the same thing? Sorry, I guess I'm not to clear on why the dll memory stuff is needed afterall except mabie for a speed increase. I'll be glad to do it though if it's really needed.
[3:00am ZZzzz time...]