Tutorial 08 - Creating Simple OpenGL Shaders

preview_player
Показать описание
In this tutorial I will be demonstrating how you can write opengl shaders and add them to our game engine.
Рекомендации по теме
Комментарии
Автор

You don't have any links in the description.

draynaruegames
Автор

What is the purpose of the "result" in loadshader?

edilonjunior
Автор

Just on the java side, don't you need to close your BufferedReader? It would be best to use the try-with-resources.

Lordpm
Автор

Wouldn't it be better to use StringBuilder in the loadShader function?

thekatze
Автор

Well why is my ball black and the whole screen black afterwards :(

NOOBDP
Автор

private Map<String, Integer> locationCache=new HashMap<>();
public int getUniform(String name)
{

return locationCache.get(name);
int newID=glGetUniformLocation(programID, name);
if(newID==-1)
System.out.println("uniform nem találhaató:"+name);
else
locationCache.put(name, newID);
return newID;
}
This way it would be faster?

Gy
Автор

For some reason I'm having to use GL20.glShaderSource(), GL20.glCompileShader(), etc. And before anyone asks, yes I have imported org.lwjgl.opengl.GL20.*;

indigoturtle
welcome to shbcf.ru