OpenGL 3D Game Tutorial 1: The Display

preview_player
Показать описание
LWJGL 2 tutorial series on how to create a 3D Java game with OpenGL!

Tutorial about setting up the project:

Full code:

Common Problems:

-In case you had annotations off, you need to do the ContextAttribs stuff all in one line like this:
ContextAttribs attribs = new ContextAttribs(3, 2).withForwardCompatible(true).withProfileCore(true);

Рекомендации по теме
Комментарии
Автор

Beginner game developer: *exists*
ThinMatrix: "I'm about to start this man's whole career."

Neightr
Автор

I've been looking for a tutorial like this for a couple years, glad I finally found it. So many tutorials talk about the java language itself which bores me and I have to "try" and skip ahead but miss things. I'm already highly experienced in Java as a whole, just not game development. Thank you for making this. I will start watching and going through these in my free time. :)

EverythingForNothing
Автор

Hey! You're seeing this for the first time. Let me warn you: this is gonna be a epic journey, enjoy!

vitor-a
Автор

I really appreciate you zooming into your code as you walk us through. Thank you very much for doing that!

DanielHong
Автор

"We are using LWJGL and OpenGL 3+"
subscribed!

DJStrife
Автор

Back to the start again. Going to redo all these tutorials probably will take less time then they did before and also will comment everything so I understand it. Today is the day I start a game not just props for a game :D

MohammedPlaysMC
Автор

I recently started wondering if I would make a game engine just to have a better understanding of them. I always thought that you were awesome for always coding everything yourself. Yesterday I found your series, it may be a couple of years old but I'll still follow through everything ^^
Thank you for sharing your knowledge!

VoylinsLife
Автор

Just finished watching the whole video and thought it was great (I've only done simple pure java games), definitely can't wait for the next episode! Great job man <3

nullerino
Автор

Great job. I have no almost no prior java game coding knowledge, but so far this strongly motivates me to learn java. Also, you do a great job explaining so do understand this, even without knowing java, very well. Keep up the great work!

StephanoGames
Автор

Wow, I'm amazed. For the 1st time ever, somthing showed in a programming tutorial I watched, works instantly without any errors xD
I'm getting better at this!

dondurruti
Автор

*Common Problems and Solutions:*

If you get the following error: *org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)* or *Pixel format not accelerated* then your computer may not support the version of OpenGL that we're trying to use (version 3.2). Try removing the parameters from the *Display.create()* method and try again. You may have trouble on the later tutorials however, depending on exactly which version of OpenGL your computer supports.

Also, in case you had annotations off, you need to do the ContextAttrib stuff all in *one line* like this:
ContextAttribs attribs = new ContextAttribs(3,

If the display opens and closes straight away without an error then make sure you didn't miss the *!* in the part.

ThinMatrix
Автор

YES! It's finally here, thank you so much for doing a tutorial series. It will benefit me so much, thanks!

DemonicGaming
Автор

This is one of the best set of video game tutorial creation videos I have ever seen. After watching this TheChernoProject Display method and this Display method I can see were a new screen method would fit in.

DeamonRex
Автор

Can you please create a new 3D game development series using LWGL3?

abhilashkrish
Автор

This is where all started. This videos about OpenGL is OG.

otoS
Автор

After hours of searching, I FINALLY found the problem. Even after updating drivers and looking up what version of Opengl my driver supported (which was 4.4) it still did not work. If you are having this problem you are most likely on a laptop.

Apparently, on most laptops there are 2 GPU's: the Intel(R) HD Graphics one and the NVIDIA Geforce one. For most PC use, the onboard Intel graphics hardware is just fine. You will not notice a difference between onboard and discrete graphics when using desktop applications. There is a difference, however – integrated Intel graphics use much less power than NVIDIA graphics. By using the low-power onboard graphics when a high-power dedicated graphics card isn’t necessary, laptops can save power and increase battery life.

When you launch an application that needs high-powered 3D graphics, such as a PC game, the laptop powers on the NVIDIA graphics hardware and uses it to run the application. This increases 3D performance dramatically, but takes more power – which is fine if your laptop is plugged into an outlet.

When you go to Control Panel > Hardware and Sound > Device Manager > Display Adapters there you can see the two GPU's.

The problem is that eclipse is run with the Intel GPU, which for me had Opengl version 3.1.

When doing:
Display.create();
String version =
System.out.println(version);
I get " 3.1.0 - Build 9.17.10.2932"

To make your pc use the NVIDIA GPU for Eclipse, go to Control Panel > Hardware and Sound > NVIDIA Control Panel > Manage 3D Settings:

Option1: Either change "Preferred graphics processor" to "High-performance NVIDIA processor" to make your laptop always use the NVIDIA GPU.

Option2: OR go to program settings > add > select the eclipse.exe in your eclipse installation folder and change "Preferred graphics processor" to "High-performance NVIDIA processor".

Now I had a problem where the second option to only apply it for eclipse is not applied for some weird reason, so I just made my laptop use my NVIDIA GPU all the time. If you really don't want to do that you can right click the eclipse.exe and choose "Run with graphics processor" option. If anyone finds out why the second option does not work please tell me.

When doing:
Display.create();
String version =
System.out.println(version);
I get "4.4.0 NVIDIA 344.48", you should now be able to make a new ContextAttribs(3, 2) without a problem.

Triplaglol
Автор

"이 강의가 없었다면 지금의 나는 없었다"

본질에 매우 충실한 강의.

대학생 시절, 컴퓨터공학을 전공했지만 늘 자신감이 없었던 나에게

엄청난 실력과 압도적인 자신감을 가져다준 유일한 강의입니다.

code_red_master
Автор

Mac users: In the closeDisplay method in the DisplayManager class, remember to add a System.exit(0); just after Display.destroy(). If you do not do this, the display will linger and just be annoying.

FaizaanDatoo
Автор

This is so nostalgic for me, this helped get me started on my coding and game development journey, good times.

localvoidlander
Автор

Doing these tutorials in c++ now. Got through the first 40 episodes before but now I feel like java isn't the encouraged language to make a game in because of the speed. Java is still my favorite language and I love these tutorials.

ojaslandge