-
as seen on Ask Ubuntu
- Search for 'Ask Ubuntu'
I am facing a very frustrating issue with my computer right now. I successfully upgraded to Ubuntu 12.10 this afternoon, but after the upgrade, the graphical user interface seems completely broken. To be more specific, I can not get the Unity bar to appear on the right.
I have tried many things,…
>>> More
-
as seen on Game Development
- Search for 'Game Development'
What should I learn? OpenGL 4.1 or OpenGL ES 2.0?
I will be developing desktop applications using Qt but I may start developing mobile applications in a few months, too. I don't know anything about 3D, 3D math, etc and I'd rather spend 100 bucks in a good book than 1 week digging websites and going…
>>> More
-
as seen on Programmers
- Search for 'Programmers'
I was doubting: I'm writing a cross-platform engine OpenGL C++, I figured out windows forces the developers to access OpenGL features above 1.1 through extensions.
Now the thing is, on Linux, I know that I can directly access functions if the version supports it through glext.h and opengl version…
>>> More
-
as seen on Game Development
- Search for 'Game Development'
I have migrated my code from OpenGL ES 2/3 to OpenGL 3 (I added bunch of defines and abstract classes to encapsulate both versions, so I have both in one project and compile only one or another). All I need to change was context initialization and glClearDepth. I dont have any errors. This was kind…
>>> More
-
as seen on Game Development
- Search for 'Game Development'
When I try to run my lwjgl project, an error pops . Here is the log file:
#
A fatal error has been detected by the Java Runtime Environment:
#
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d8fcc0a, pid=5612, tid=900
#
JRE version: 6.0_16-b01
Java VM: Java HotSpot(TM) Client VM (14.2-b01 mixed…
>>> More
-
as seen on Game Development
- Search for 'Game Development'
I'm using 3 different shaders:
a tessellation shader to use the tessellation feature of DirectX11 :)
a regular shader to show how it would look without tessellation
and a text shader to display debug-info such as FPS, model count etc.
All of these shaders are initialized at the beginning.
Using…
>>> More
-
as seen on Game Development
- Search for 'Game Development'
things I initialize at the beginning of the program
I realize not all of these pertain to my issue I just copy and pasted what I had //overall initialized
//things openGL related I initialize earlier on in the project
glClearColor( 0.0f, 0.0f, 0.0f, 1.0f );
glClearDepth( 1.0f );
glEnable(GL_ALPHA_TEST);
glEnable(…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I wondering if there is a way to optimize this vertex shader.
This vertex shader projects (in the light direction) a vertex to the far plane if it is in the shadow.
void main(void) {
vec3 lightDir = (gl_ModelViewMatrix * gl_Vertex
- gl_LightSource[0].position).xyz;
// if…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
hi,
I'm experiencing with shaders a bit and I keep getting this weird compilation error that's driving me crazy!
the following pixel shader code snippet:
DirectionVector = normalize(f3LightPosition[i] - PixelPos);
LightVec = PixelNormal - DirectionVector;
//…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
The Orange book, section 16.2, lists implementing diffuse lighting as:
void main()
{
vec3 N = normalize(gl_NormalMatrix * gl_Normal);
vec4 V = gl_ModelViewMatrix * gl_vertex;
vec3 L = normalize(lightPos - V.xyz);
gl_FrontColor = gl_Color * vec4(max(0.0, dot(N, L));
}
However, when I run…
>>> More