thank you all of you. i try myself to finish my homework now. my teacher only gave some guides to do. i am begin to solve another home work. beside , i am a math student , not computer programming student.
a04 lqd
Posts
-
polygon made by intersection of two polygon ??? -
polygon made by intersection of two polygon ???i am looking for for this code. if you have it, please share.
-
Scanline Polygon Fill Algorithm ???can you define "POLYGON" ?
-
Scanline Polygon Fill Algorithm ???can i have an project ?
-
Scanline Polygon Fill Algorithm ???can i have an example using this method?
-
load bmp picture.this code is used to load bmp picture. but then i can't draw anything on the window. please help !! http://www.mediafire.com/?fihytwvjlyn
-
how to use this code ??the problem is: i have this code to load bmp picture, but i don't know how to use.
int LoadGLTextures();
i only need to load bmp picture.
-
how to use this code ??this is my project. draw B-spline by De Boor method, and use it to take boundary of bmp picture. http://www.mediafire.com/?4m2jrmg3lyv[^]
-
how to use this code ??but i put apple.bmp in the same folder with main code, write int main() to use it. then it did not work.
int main(int argc, char* argv[])
{glutInit(&argc, argv); glutInitDisplayMode(GLUT\_DOUBLE | GLUT\_RGB); glutInitWindowSize(640, 480); glutInitWindowPosition(0, 0); glutCreateWindow("Hello OpenGL!"); OnInit(); glutDisplayFunc(OnDraw); glutReshapeFunc(OnSize); glutIdleFunc(OnIdle); glutKeyboardFunc(OnKey); //--------------------------- glutMouseFunc(OnMouse); glutSpecialFunc(OnKeySpecial); LoadGLTextures(); //--------------------------- glutMainLoop(); return 0;
}
-
how to use this code ??Can you write a simple code which use this code as an example? thank very much. :)
-
how to use this code ??i have this code to load a bmp picture. but i don't know how to use it.!!!
#include "stdafx.h" #include "glaux.h" #include "glut.h"
GLuint texture[6];
int LoadGLTextures() { int Status=FALSE; // Status Indicator AUX_RGBImageRec *TextureImage[1]; // Create Storage Space For The Texture memset(TextureImage,0,sizeof(void *)*2); // Set The Pointer To NULL // Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit if (TextureImage[0]=LoadBMP("apple.bmp")) { Status=TRUE; // Set The Status To TRUE glGenTextures(3, &texture[0]); // Create Three Textures // Create Nearest Filtered Texture glBindTexture(GL_TEXTURE_2D, texture[0]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST); // ( NEW ) glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST); // ( NEW ) glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY,0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // Create Linear Filtered Texture glBindTexture(GL_TEXTURE_2D, texture[1]); 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, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY,0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); // Create MipMapped Texture glBindTexture(GL_TEXTURE_2D, texture[2]); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); // ( NEW ) glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR_MIPMAP_NEAREST); gluBuild2DMipmaps(GL_TEXTURE_2D, 3, TextureImage[0]->sizeX,TextureImage[0]->sizeY, GL_RGB, GL_UNSIGNED_BYTE,TextureImage[0]->data); // ( NEW ) if (TextureImage[0]) // If Texture Exists { if (TextureImage[0]->data) // If Texture Image Exists { free(TextureImage[0]->data); // Free The Texture Image Memory } free(TextureImage[0]); // Free The Image Structure } } return Status; } //----------------------------------------------------------------------------- AUX_RGBImageRec
-
plese help me these error !!main.obj : error LNK2001: unresolved external symbol _auxDIBImageLoadA@4 Debug/main.exe : fatal error LNK1120: 1 unresolved externals
-
may i have openGL version 1.1 or higher ???please share me link to down
-
cover a double x to char ???example: double 5 cover to '5'.
-
print double array on openGL window???i have an double array u[100]. this code print "Hello 123" to openGL window, can i print u like this?
static char sbuff[20];
wsprintf(sbuff,"Hello %d",123);
OutText(0,yMax - 10,sbuff,GLUT_BITMAP_8_BY_13);void OutText(float x,float y,char *text,void *font)
{
glRasterPos2f(x,y);
for(int i=0;text[i]!=0;i++)
{
glutBitmapCharacter(font,text[i]);
}
glutPostRedisplay();
} -
can use GLUT to read an picture (bmp)???X| please !!
-
openGL can read an bmf picture or another picture ????sorry , it is my mistake -> bmp. i need to load a bmp picture by openGL ,then i can use mouse in openGL to draw a point in that pic.
-
mouse in openGL, double click ??here is the code:
int _xC,_yC;
void OnMouse(int button, int state, int x, int y)
{
int xMax = glutGet(GLUT_WINDOW_WIDTH);
int yMax = glutGet(GLUT_WINDOW_HEIGHT);
_xC = x;
_yC = yMax-y;}
with this code , left click get xC and yC. use this, i want to make Point array to save x-axis and y-axis of point which is defined by left click by Onmouse code. but how to stop??? can i use right click or double click to break ???
-
openGL can read an bmf picture or another picture ????if it can, show me how to use, please !!!
-
De Boor method to draw Bspline ??anybody has clearly defination of De Boor method ?? thank very much !!