conflict v2

This commit is contained in:
fruitstaa 2018-11-27 18:32:07 +01:00
parent 3cd3b20600
commit efb21993c9
3 changed files with 6 additions and 15 deletions

View file

@ -1,5 +1,5 @@
// This source code is property of the Computer Graphics and Visualization
// chair of the TU Dresden. Do not distribute!
// This source code is property of the Computer Graphics and Visualization
// chair of the TU Dresden. Do not distribute!
// Copyright (C) CGV TU Dresden - All Rights Reserved
#version 130
@ -16,11 +16,8 @@ void main()
{
vertex_pos = in_position.xy;
gl_Position = proj * view * in_position;
fragment_color = in_color;
<<<<<<< HEAD
=======
julia_position = julia_positions[gl_VertexID % 3];
>>>>>>> 8b4276f6ab9ed1d7d6e1909f36944eaa9a8964da
}

View file

@ -26,8 +26,6 @@ class Viewer : public nse::gui::AbstractViewer
nanogui::Slider *sldJuliaCY;
nanogui::Slider *sldJuliaZoom; //Zoom factor for the Julia fractal
<<<<<<< HEAD
=======
nanogui::Slider *point1X;
nanogui::Slider *point1Y;
nanogui::Slider *point2X;
@ -35,7 +33,6 @@ class Viewer : public nse::gui::AbstractViewer
nanogui::Slider *point3X;
nanogui::Slider *point3Y;
>>>>>>> 8b4276f6ab9ed1d7d6e1909f36944eaa9a8964da
// The following variables hold OpenGL object IDs
GLuint vertex_shader_id, // ID of the vertex shader
fragment_shader_id, // ID of the fragment shader

View file

@ -50,8 +50,6 @@ void Viewer::SetupGUI()
sldJuliaCY = nse::gui::AddLabeledSliderWithDefaultDisplay(mainWindow, "JuliaC.Y", std::make_pair(-1.0f, 1.0f), -0.3f, 2);
sldJuliaZoom = nse::gui::AddLabeledSliderWithDefaultDisplay(mainWindow, "Julia Zoom", std::make_pair(0.01f, 10.0f), 1.0f, 2);
<<<<<<< HEAD
=======
point1X = AddLabeledSliderWithDefaultDisplay(mainWindow, "Point1.X", std::make_pair(-3.0f, 3.0f), -0.8f, 2);
point1Y = AddLabeledSliderWithDefaultDisplay(mainWindow, "Point1.Y", std::make_pair(-3.0f, 3.0f), 0.6f, 2);
point2X = AddLabeledSliderWithDefaultDisplay(mainWindow, "Point2.X", std::make_pair(-3.0f, 3.0f), 0.5f, 2);
@ -59,7 +57,6 @@ void Viewer::SetupGUI()
point3X = AddLabeledSliderWithDefaultDisplay(mainWindow, "Point3.X", std::make_pair(-3.0f, 3.0f), 0.8f, 2);
point3Y = AddLabeledSliderWithDefaultDisplay(mainWindow, "Point3.Y", std::make_pair(-3.0f, 3.0f), 1.0f, 2);
>>>>>>> 8b4276f6ab9ed1d7d6e1909f36944eaa9a8964da
performLayout();
}
@ -73,7 +70,7 @@ void Viewer::CreateVertexBuffers()
// Define 3 vertices for one face
GLfloat positions[] = {
-1, -1, -1, 1, // 1
1, -1, 1, 1, // 6
1, -1, 1, 1, // 6
-1, 1, 1, 1, // 8
-1, -1, -1, 1, // 1
@ -122,7 +119,7 @@ void Viewer::CreateVertexBuffers()
// "in_position". First, get the location of this attribute in
// the shader program
GLuint vid = glGetAttribLocation(program_id, "in_position");
// Enable this vertex attribute array
glEnableVertexAttribArray(vid);
// Set the format of the data to match the type of "in_position"
@ -263,7 +260,7 @@ void Viewer::drawContents()
/*** Begin of task 1.2.4 (b) ***
Set the shader variables for the modelview and projection matrix.
First, find the location of these variables using glGetUniformLocation and
then set them with the command glUniformMatrix4fv.
then set them with the command glUniformMatrix4fv.
*/
glUniformMatrix4fv(view_uniform_id, 1, false, modelViewMatrix.data());