mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 12:38:46 +02:00
Remove local glfw3 lib for osx. (+1 squashed commit)
Squashed commits: [34cc3b7] Adds osx example. (+6 squashed commits) Squashed commits: [20330f2] Uses glfw by brew install. [0427861] Renames imguiex folder name to imguiex-ios [f9e27e5] Renames ios_example to apple_example. [44f8fe3] Updates the glfw header/library path. [919f279] Renames target from imguiex to imguiex-ios since there is already a imguiex-osx target now. [24395f5] Adds osx example.
This commit is contained in:
10
examples/apple_example/imguiex-ios/Shaders/Shader.fsh
Normal file
10
examples/apple_example/imguiex-ios/Shaders/Shader.fsh
Normal file
@ -0,0 +1,10 @@
|
||||
//
|
||||
// Shader.fsh
|
||||
// imguiex
|
||||
|
||||
varying lowp vec4 colorVarying;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = colorVarying;
|
||||
}
|
25
examples/apple_example/imguiex-ios/Shaders/Shader.vsh
Normal file
25
examples/apple_example/imguiex-ios/Shaders/Shader.vsh
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// Shader.vsh
|
||||
// imguiex
|
||||
|
||||
attribute vec4 position;
|
||||
attribute vec3 normal;
|
||||
|
||||
varying lowp vec4 colorVarying;
|
||||
|
||||
uniform vec3 diffuseColor;
|
||||
uniform mat4 modelViewProjectionMatrix;
|
||||
uniform mat3 normalMatrix;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec3 eyeNormal = normalize(normalMatrix * normal);
|
||||
vec3 lightPosition = vec3(0.0, 0.0, 1.0);
|
||||
|
||||
float nDotVP = max(0.0, dot(eyeNormal, normalize(lightPosition)));
|
||||
|
||||
vec3 colorLit = diffuseColor * nDotVP;
|
||||
colorVarying = vec4( colorLit.x, colorLit.y, colorLit.z, 1.0 );
|
||||
|
||||
gl_Position = modelViewProjectionMatrix * position;
|
||||
}
|
Reference in New Issue
Block a user