Questions tagged [opengl-2.0]

OpenGL (open graphic library) 2.0 adds support for an assembly language, based on GPU, called ARB, that estabilish to become the standard for all vertex and fragment shader functions.

Resources:

42 questions
39
votes
2 answers

How can I pass multiple textures to a single shader?

I am using freeglut, GLEW and DevIL to render a textured teapot using a vertex and fragment shader. This is all working fine in OpenGL 2.0 and GLSL 1.2 on Ubuntu 14.04. Now, I want to apply a bump map to the teapot. My lecturer evidently doesn't…
lofidevops
  • 15,528
  • 14
  • 79
  • 119
7
votes
2 answers

Modern equivalent of `gluOrtho2d `

What is the modern equivalent of the OpenGL function gluOrtho2d? clang is giving me deprecation warnings. I believe I need to write some kind of vertex shader? What should it look like?
Neil G
  • 32,138
  • 39
  • 156
  • 257
4
votes
1 answer

Resizing window using SDL and OpenGL

Before writing this question, I have read the question: Handling window resizing using OpenGL and SDL. However that question does not solve my problem, since I am using SDL2 and not SDL1.2. But I do use OpenGL2. My complete source code is available…
pro neon
  • 253
  • 1
  • 12
3
votes
1 answer

X-Y-Distance from camera to object in vertex shader

I want to show some fog / aerial view in my application. But I only want to use the x,y world distance from camera to the model to determine the appearance. I already managed to get the signed z-distance from camera to the models with this…
User Rebo
  • 3,056
  • 25
  • 30
3
votes
1 answer

LibGDX: How can I achieve a flat shaded look with OpenGL 2.0?

So I'm trying to achieve the "Polygon Art/Low Poly" style with LibGDX. I start by constructing a model made of triangles. Then with the vertex shader, I calculate the colors for each vertex based on height. Problem is, the terrain is Gouraud…
jrdzha
  • 161
  • 2
  • 12
3
votes
2 answers

Is calling glBindBuffer, glUseProgram etc with same values as before inefficient?

I've read that the best way to optimise rendering order of non-transparent objects in OpenGL 2 (especially ES) is to prioritise the avoidance of context changes (binding different buffers, shader programs etc) over depth sorting. If you do something…
realh
  • 962
  • 2
  • 7
  • 22
2
votes
1 answer

OpenGL Texture cause ImGUI windows to be permanently out of focus

I'm following TheCherno's tutorials on OpenGL (I've gone ahead and modified a few things though). I'm on MacOS mojave and have OpenGL 2.1. However, when I got to the ImGui part of the tutorial, things started behaving weirdly. Since I have an older…
Rotartsi
  • 527
  • 5
  • 19
2
votes
1 answer

How to replace 'gluOrtho2d' in a Qt app

I am working on bring back to life a program I wrote seven years ago. It is all written in Qt and uses some OpenGL to draw some frame lines on an image that the application is displaying. The problem is that 'gluOrtho2D' is used but is no longer…
Sam Carleton
  • 1,339
  • 7
  • 23
  • 45
2
votes
1 answer

Cubemap PCF: Get the plane perpendicular to a vector at a given point

I'm trying to implement PCF for a shadow cube map in OpenGL 2.0. I thought I'd found a solution here (search for Percentage closer filtering (PCF) algorithm to find the start of the section on cube map PCF), but the code is relying on the…
nils
  • 338
  • 4
  • 11
2
votes
1 answer

OpenGL - ARB extension

I am using MacBook Pro (13-inch, Mid 2010) and I work with OpenGL. I noticed, some of functions miss in library. I found specifications on the internet about my hardware and it says: "support OpenGL 3.3". It was strange so I printed my OpenGL…
eSeverus
  • 552
  • 1
  • 6
  • 18
1
vote
1 answer

Is it possible to write vertex array code that's portable between OpenGL 2.x and 3.x?

The OpenGL 3.0 spec says: E.1 Profiles and Deprecated Features of OpenGL 3.0 ... Client vertex arrays - all vertex array attribute pointers must refer to buffer objects (section 2.9.2). The default vertex array object (the name zero) is also…
1
vote
0 answers

Drawing to multiple buffers simultaneously and rendering each buffer Individually to display

My idea and requirement are to allow creating atmost 'n' buffers (where is n<7) during the program execution. So, ideally, I am looking for a way, where I can draw different things to different buffers and render each buffer as and when…
moizh
  • 55
  • 6
1
vote
1 answer

GLSL - Gaussian Blur Artifact Issue

First of all, due to requirements constraints, I am working in OpenGL v. 2.1, and GLSL 120. I have implemented a simple fragment shader that applies a two pass (horizontal & vertical) Gaussian blur with n-kernel weights obtained from Pascal's…
JDBones
  • 495
  • 1
  • 7
  • 18
1
vote
1 answer

OpenGL GLfloat not recognized Java

I tried to create a GLfloat buffer array with GLfloat mat_diffuse[] = { .2f, .2f, .6f, 1f }; But java can not find class GLfloat and when I try to use a normal float array I get an error with this line gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE,…
Jake
  • 617
  • 1
  • 6
  • 21
1
vote
2 answers

OpenGL 2.1 and glBegin()/glEnd()

there are lots of OpenGL tutorials out there - I think more than 90% of them make use of glBegin()/glEnd() with vertices set between these two calls. Now I found some people telling me these functions are deprecated and no longer available in newer…
Elmi
  • 5,899
  • 15
  • 72
  • 143
1
2 3