FirstRanker Logo

FirstRanker.com - FirstRanker's Choice is a hub of Question Papers & Study Materials for B-Tech, B.E, M-Tech, MCA, M.Sc, MBBS, BDS, MBA, B.Sc, Degree, B.Sc Nursing, B-Pharmacy, D-Pharmacy, MD, Medical, Dental, Engineering students. All services of FirstRanker.com are FREE

📱

Get the MBBS Question Bank Android App

Access previous years' papers, solved question papers, notes, and more on the go!

Install From Play Store

Download OU BE (B-Tech) CSE Mini Projects Code Programs on Logical operations in GLUT

Download OU (Osmania University)BE (B-Tech) (Bachelor of Engineering) CSE Best Practicle Programs And Code Programs on Logical operations in GLUT

This post was last modified on 27 January 2020

AKTU B-Tech Last 10 Years 2010-2020 Previous Question Papers || Dr. A.P.J. Abdul Kalam Technical University


FirstRanker.com


#include<windows.h>

--- Content provided by FirstRanker.com ---

#include<GL/glut.h>
float xm,ym,xmm,ymm;
void display()
{
}

--- Content provided by‍ FirstRanker.com ---

/* Program to draw erasable rectangle */
{
glClearColor(1.0,1.0,1.0,1.0);
glClear(GL_COLOR_BUFFER_BIT);
glEnable(GL_COLOR_LOGIC_OP);

--- Content provided by‍ FirstRanker.com ---

void myMouse(int btn, int state, int x, int y)
{
if(btn==GLUT_LEFT_BUTTON && state==GLUT_DOWN)
{
xm=x;

--- Content provided by FirstRanker.com ---

ym=(500-y);
glColor3f(0.0,0.0,1.0);
glLogicOp(GL_XOR);
}
if(btn==GLUT_LEFT_BUTTON && state==GLUT_UP)

--- Content provided by FirstRanker.com ---

{
xmm=x;
ymm=(500-y);
glLogicOp(GL_XOR);
glRectf(xm,ym,xmm,ymm);

--- Content provided by‍ FirstRanker.com ---

glFlush();
}
}
void reshape(GLsizei w, GLsizei h)
{

--- Content provided by​ FirstRanker.com ---

}
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0,500,0,500);
glMatrixMode(GL_MODELVIEW);

--- Content provided by FirstRanker.com ---

int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE|GLUT_DEPTH|GLUT_RGB);
glutInitWindowSize(500,500);

--- Content provided by​ FirstRanker.com ---

glutInitWindowPosition(100,100);
glutCreateWindow("erasable lines");
glutDisplayFunc(display);
glutReshapeFunc(reshape);
glutMouseFunc(myMouse);

--- Content provided by⁠ FirstRanker.com ---

glutMainLoop();
}

FirstRanker.com



--- Content provided by‌ FirstRanker.com ---

This download link is referred from the post: AKTU B-Tech Last 10 Years 2010-2020 Previous Question Papers || Dr. A.P.J. Abdul Kalam Technical University