Search Results

Search found 4 results on 1 pages for 'gutsblow'.

Page 1/1 | 1 

  • OpenGL Color Interpolation across vertices

    - by gutsblow
    Right now, I have more than 25 vertices that form a model. I want to interpolate color linearly between the first and last vertex. The Problem is when I write the following code glColor3f(1.0,0.0,0.0); vertex3f(1.0,1.0,1.0); vertex3f(0.9,1.0,1.0); . .`<more vertices>; glColor3f(0.0,0.0,1.0); vertex3f(0.0,0.0,0.0); All the vertices except that last one are red. Now I am wondering if there is a way to interpolate color across these vertices without me having to manually interpolate color natively (like how opengl does it automatically) at each vertex since, I will be having a lot more number of colors at various vertices. Any help would be extremely appreciated. Thank you!

    Read the article

  • How to use Mesa3D on Mac OS X and Windows

    - by gutsblow
    Hello all, I need to use Mesa3D for a cross platform application(windows and Mac only) which uses only offline software rendering. The reason I wanted to use Mesa3D is because it has the same Drawing calls as OpenGL and they are really easy. Now I know that Apple itself has a software implementation (which I heard is flaky), but I prefer using Mesa so that it's a lot easier for me to maintain the code on both platforms. On windows I managed to compile three DLL's from the Mesa3d source, but don't know what to do with them. On Mac OS X I am completely clueless. I would highly appreciate your help. Thank you once again very much!

    Read the article

  • OpenGL 2D Texture Mapping problem.

    - by gutsblow
    Hi there, I am relatively new to OpenGL and I am having some issues when I am rendering an image as a texture for a QUAD which is as the same size of the image. Here is my code. I would be very grateful if someone helps me to solve this problem. The image appears way smaller and is squished. (BTW, the image dimensions are 500x375). glGenTextures( 1, &S_GLator_InputFrameTextureIDSu ); glBindTexture(GL_TEXTURE_2D, S_GLator_InputFrameTextureIDSu); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexImage2D( GL_TEXTURE_2D, 0, 4, S_GLator_EffectCommonData.mRenderBufferWidthSu, S_GLator_EffectCommonData.mRenderBufferHeightSu, 0, GL_RGBA, GL_UNSIGNED_BYTE, dataP); glBindTexture(GL_TEXTURE_2D, S_GLator_InputFrameTextureIDSu); glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, S_GLator_EffectCommonData.mRenderBufferWidthSu, S_GLator_EffectCommonData.mRenderBufferHeightSu, GL_RGBA, GL_UNSIGNED_BYTE, bufferP); //set the matrix modes glMatrixMode( GL_PROJECTION ); glLoadIdentity(); //gluPerspective( 45.0, (GLdouble)widthL / heightL, 0.1, 100.0 ); glOrtho (0, 1, 0, 1, -1, 1); // Set up the frame-buffer object just like a window. glViewport( 0, 0, widthL, heightL ); glDisable(GL_DEPTH_TEST); glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); glMatrixMode( GL_MODELVIEW ); glLoadIdentity(); glBindTexture( GL_TEXTURE_2D, S_GLator_InputFrameTextureIDSu ); //Render the geometry to the frame-buffer object glBegin(GL_QUADS); //input frame glColor4f(1.f,1.f,1.f,1.f); glTexCoord2f(0.0f,0.0f); glVertex3f(0.f ,0.f ,0.0f); glTexCoord2f(1.0f,0.0f); glVertex3f(1.f ,0.f,0.0f); glTexCoord2f(1.0f,1.f); glVertex3f(1.f ,1.f,0.0f); glTexCoord2f(0.0f,1.f); glVertex3f(0.f ,1.f,0.0f); glEnd();

    Read the article

  • glCreateShaderObjectARB( GL_FRAGMENT_SHADER_ARB ); crashes !

    - by gutsblow
    Hello there, I have an iMac with ATI Radeon 2600HD which supports Fragment_shader_arb. But whenever I use that function, it crashes the program. Ironically, it works on a windows installation in the same machine without any problems. I'm running OS X 10.6.2; Can anyone please help me out! P.S. Vertex shaders work fine without any problem. Thank you!

    Read the article

1