Tutorial 1 – Setting up an OpenGL Project in Visual Studio 2010 | آخربرنامج فيجوال ستوديو 2010 الأخبار

by Adel Bogy
39 comments

Tutorial 1 – Setting up an OpenGL Project in Visual Studio 2010| أخبار عامة كل يوم

شاهد الآن

كما يمكنك مشاهدة المزيد من الأخبار ذات الصلة برنامج فيجوال ستوديو 2010 أو أخبار أخرى Ar.kienthuccuatoi.com/informationقدمت

Tutorial 1 – Setting up an OpenGL Project in Visual Studio 2010 والصور ذات الصلة برنامج فيجوال ستوديو 2010

Tutorial 1 - Setting up an OpenGL Project in Visual Studio 2010

Tutorial 1 – Setting up an OpenGL Project in Visual Studio 2010


برنامج فيجوال ستوديو 2010 والمعلومات ذات الصلة

يوضح لك هذا البرنامج التعليمي كيفية إعداد مشروع OpenGL في Visual Studio 2010.

>>> بالإضافة إلى ذلك ، يمكنك رؤية العديد من المعلومات العامة المفيدة الأخرى من خلال https://ar.kienthuccuatoi.com/ قدمت هنا

نأمل أن تكون المعلومات المقدمة بخصوص برنامج فيجوال ستوديو 2010 مفيدة لك.
شكرا لدعمك

See also  How to FIX: xlive.dll is missing from Windows 10 - [100% Working - Resident Evil 5 PC] | آخرxlive.dll الأخبار

You may also like

39 comments

Tyler5Rock 31/08/2021 - 16:49

VS2010 PROJECT YTPMV IS A YTPMV PANEL THAT ALLOWS YOU HAVE TO BE A GOOD FIT FOR YOUR FINALLY YTPMVMAKER PROJECT 2020

Reply
Junior Santos Gerry 31/08/2021 - 16:49

Hi there
I just test your code i have a visual studio 2010 ultimate and when i compiled your code
the window start blink fast and disapear that is normal?

thanks for tutorial

Reply
Po Tato 31/08/2021 - 16:49

omg thanks you so much for this 😲. i have been struggling so much, it's a good thing i found this. lol 😓

Reply
Fransiscus Aprilyanto L. 31/08/2021 - 16:49

Got this error :
1>—— Rebuild All started: Project: HelloWorld, Configuration: Debug Win32 ——
1> main.cpp
1>main.obj : error LNK2019: unresolved external symbol __imp__glewInit@0 referenced in function _main
1>C:UsersFransiscusDocumentsVisual Studio 2010ProjectsHelloWorldDebugHelloWorld.exe : fatal error LNK1120: 1 unresolved externals
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Reply
Steffen Grund 31/08/2021 - 16:49

C++ mit Freeglut

Reply
Timoteo Cruz 31/08/2021 - 16:49

For who want the code used by him. Take below.

#include <glglew.h>
#include <glfreeglut.h>
#include <iostream>

using namespace std;

//Any time the window is resized, this function gets called

void changeViewport(int w, int h) {

glViewport(0, 0, w, h);
}

//Here is the function that gets called each time the window needs.
//It is the paint method for our program

void render()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSwapBuffers();
}

int main()
{//initializate GLUT
glutInit(&argc, argv);

//set up some memory bfefers for our display

glutInitDisplayMode(GLUT DOUBLE | GLUT RGBA | GLUT DEPTH);
//Set the window size
glutInitWindowSize(800, 600);
//create the window with the title "hello, gl"
glutCreateWindow("Hello, GL");
//Bind the two functions ,above, to respond when necessary
glutReshapeFunc(changeViewport);
glutDisplayFnc(render);

//very important! TRhis initialize the entry point in the OpenGl DRIVER SO WE CAN
//call all the function in the API.

GLenum err = glewInit();
if (GLEW_OK != err) {
fprint(stderr, "GLEW error");
return 1;
}
//Start up a loop that runs in the background (you never see it)
glutMainLoop();
return 0;
}

Reply
M. S 31/08/2021 - 16:49

Thanks for the great tutorial! OpenGL is so dumb! Setting it up is just so painful!

Reply
Jose Jimenez 31/08/2021 - 16:49

okoihio
kk
ll
.kkollkekrkldkkdlf,,fllr

Reply
Hasham Naveed 31/08/2021 - 16:49

Thank You soo Much Jeffrey. Been looking for a solution since 4 days and finally found one. Thank you.

Reply
Adarsh Gupta 31/08/2021 - 16:49

Code at 1:19 with comments –

#include <gl/glew.h>
#include <gl/freeglut.h>
#include <iostream>

using namespace std;

//Anytime the window is resized, this function gets called. It's setup to the
// "glutReshapeFunc" in main
void changeViewport(int w, int h)
{
glViewport(0, 0, w, h);
}

//This function gets called each the window needs to be redrawn
//It is the "paint" method for our program, and is setup from the glutDisplayFunc in main
void render()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSwapBuffers();
}

int main(int argc, char** argv)
{
//Initialize GLUT
glutInit(&argc, argv);

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); //setup some memory buffers for our display
glutInitWindowSize(800, 600); //set the window size
glutCreateWindow("Hello, GL"); //create the window with title "Hello, GL"
//Bind the two functions (above) to respond when necessary
glutReshapeFunc(changeViewport);
glutDisplayFunc(render);

//Very Important! – This initializes the entry points in the openGL driver so we can
//call all the functions in the API
GLenum err = glewInit();
if (GLEW_OK != err)
{
fprintf(stderr, "GLEW Error");
return 1;
}

glutMainLoop();
return 0;
}

Reply
Chou Joe 31/08/2021 - 16:49

Thank you so much, Jeffrey !!!!!!!!!!!!!

Reply
Neil Roy 31/08/2021 - 16:49

I prefer to use Code::Blocks for this. It can be set up very easily, all the libraries are available for it as well and easily set up. What bothers me about this video, and it is good, is that Visual Studio didn't give you an error in your code. You are using fprintf() and the #include <stdio.h> was not added to the file. This actually bugs me that VS let you get away with this. Code::Blocks gave an error, so I changed the fprintf() to cerr (or you can use cout) instead.

Reply
ConsolePeasant92 31/08/2021 - 16:49

Is this the old or modern version of gl?

Reply
Beltha 31/08/2021 - 16:49

Thank you very much for this video! 🙂

Reply
Jitendra Kumar 31/08/2021 - 16:49

Not able to find glew32.dll Could you provide the link to download glew which includes .dll files.

Reply
Pranav Gore 31/08/2021 - 16:49

Thank you very much!!

Reply
Alem Sehic 31/08/2021 - 16:49

Hey,where I can get codes from this tutorial.I downloaded Code.zip but I cannot find Tut1 folder ,there are only Tut(4,6,8,13,14,15,17) 🙁 ???

Reply
Juggernaut UCI 31/08/2021 - 16:49

help me a lot. thanks

Reply
Livestock17 31/08/2021 - 16:49

Excellent.  Very helpful.  Thanks.

Reply
build stone 31/08/2021 - 16:49

thanks man, you helped me a lot!!

Reply
MrOriginalMix 31/08/2021 - 16:49

What is all the code copied in the beginning?  where did it come from??

Reply
Zach Chang 31/08/2021 - 16:49

I did it step by step and then compiled.
But finally it gor wrong and appered:
"LINK : fatal error LNK1104: cannot open file 'freeglutd.lib'"
How could I solve this problem?

Reply
Wes Wickwire 31/08/2021 - 16:49

I keep getting the error file cannot open input file freeglutd.lib. In my download of freeglut there isnt even a file of that name. Ive looked everywhere and cannot find a solution.

Reply
Aaveg S 31/08/2021 - 16:49

I am not getting a lib file in freeglut? What should I do?

Reply
Ryma ZAOUI 31/08/2021 - 16:49

thank you so much

Reply
msoulforged 31/08/2021 - 16:49

Thanks! One question; if I use Nuget package manager for glew and freeglut, do I still need to do additional wiring for linker and other stuff?

Reply
Manet Saman 31/08/2021 - 16:49

How to change name of a project in the correct way? Do i just go the folder directory and change it there or in the Visual Studio itself?

Reply
Samah Malibari 31/08/2021 - 16:49

From where can I get the code on 1:19 mins ? 🙂 

Reply
Mat Hunt 31/08/2021 - 16:49

Sadly this method doesn't work in visual studio 2013. I keep getting freeglut.lib cannot be opened all the time. Secondly, I think that you have to have the relevant files inside the project and not outside. I have looked EVERYWHERE for this particular error which is:
LNK1104 cannot open file freeglut.lib

Reply
pontus magnusson 31/08/2021 - 16:49

#include <gl/glew.h>
#include <gl/freeglut.h>
#include <iostream>

using namespace std;

void changeViewport(int w, int h)
{
glViewport(0, 0, w, h);
}

void render()
{
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glutSwapBuffers();
}

int main(int argc, char**argv)
{
glutInit(&argc, argv);

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
glutInitWindowSize(800, 600);
glutCreateWindow("Pinnen is the best");
glutReshapeFunc(changeViewport);
glutDisplayFunc(render);

GLenum err = glewInit();
if (GLEW_OK != err)
{
fprintf(stderr, "GLEW Error");
return 1;
}

glutMainLoop();
return 0;
}

Reply
dante uchiha 31/08/2021 - 16:49

and where do i download the opengl files??

Reply
lololololololol ol 31/08/2021 - 16:49

Please put the links to freeglut and glew in the description.

Reply
CroX 31/08/2021 - 16:49

its really smart to make tutorial about setting up without linking the code you use and the libary link so people would be sure to download the right thing and using the right code in order to program run and everything be ok

Reply
Minh Ly 31/08/2021 - 16:49

I am using VS 2012.When I accessed folder Debug in folder Project as you did.I didn't see anything inside.Even if there weren't ".exe","ilk","pdb" in folder Project.Could you help me with this problem ? Please respond me as soon as you can.I need this deperately.Thanks in advance.

Reply
vinay p 31/08/2021 - 16:49

Can anyone give link to download OpenGL Software shown in vedio

Reply
Joshua Heathcote 31/08/2021 - 16:49

My FLIPPING .exe isn't there, I ran a simple program at the start to make sure it was there, created the project, ran at the end and puff, its gone, error, can't find .exe

What the hell is going on

Reply
Caleb Kierum 31/08/2021 - 16:49

Hey their!  For the longest time i have been trying to find a tutorial that taught this and was re creditable!  I finally got openGL working.  I just have two questions for you.
1.  When using glut and glue is the project freely distributable?  Are their any royalties or licensing involved?
2.  Is their a function that simply sets a pixel at a certain point with a certain color?

Thankyou so much for doing more then just shoving the code in our faces!  Im excited to dig into what makes 3d gaming work!

Reply
some guy 31/08/2021 - 16:49

Tutorial 2 ?

Reply

Leave a Comment