lwjgl

LWJGL jar not accesable

蹲街弑〆低调 提交于 2020-01-07 07:49:21
问题 This should be a pretty simple question. I am trying to us LWJGL and I watched a tutoiral on how to get started but the import statements and all lwjgl code is getting error messages. The file is below. What am I doing wrong? I added the jar in properties but it is still not working. https://www.mediafire.com/?vbckyjkr6di8dlk 回答1: LWJGL uses its own variables for the path to the native libraries (If they are not found you will get a "no LWJGL in path"-error): System.setProperty("org.lwjgl

Basic openGL 3.2 Setup with lwjgl - Object not rendered

廉价感情. 提交于 2020-01-07 03:04:27
问题 I am little bit desperate here. I am trying to update/refactor an existing code written in legacy opengl to make use of the "modern way" of opengl version 3.2+. It is written in Java with lwjgl. I already stripped away most of the functionality to test the basic setup. For me at the moment it is really just about setting up the vbo with vertices loaded from an obj file and render it. My problem is, that the display window stays empty. If it would display me just something, I would be really

Basic openGL 3.2 Setup with lwjgl - Object not rendered

纵饮孤独 提交于 2020-01-07 03:04:07
问题 I am little bit desperate here. I am trying to update/refactor an existing code written in legacy opengl to make use of the "modern way" of opengl version 3.2+. It is written in Java with lwjgl. I already stripped away most of the functionality to test the basic setup. For me at the moment it is really just about setting up the vbo with vertices loaded from an obj file and render it. My problem is, that the display window stays empty. If it would display me just something, I would be really

fragment shader if statment and loading array of mat4 into uniform

♀尐吖头ヾ 提交于 2020-01-06 21:12:15
问题 I have problem with if here, for reasons uknown to me, it dosnt work. When i delete if statment or malualy write shadowMap[0] 1 or 2 it works fine, but with if i just get set of white triangles and squares. here is part of my frag shader float shadow(float bias) { float visibility = 0; int index=1; if(gl_FragCoord.z<1.0){ index=0; } vec4 shadowCoord=depthPV*vPos; if ( texture(shadowMap[index], shadowCoord.xy).z < shadowCoord.z+bias){ visibility = -1; } return visibility; } Other problem i

Why doesn't my font render?

醉酒当歌 提交于 2020-01-06 07:57:10
问题 I've been using nifty GUI with lwjgl, and its been working great, but I can't figure out how to get it to use fonts I've provided it; it only seems to be able to render the default fonts. I've added the folder with my .fnt files to the runtime classpath (via eclipse), and this makes it so that no "resource not found" exception occurs, but when I run the program, any text fields using my font don't render. Here's the source code, it renders two text fields in the upper left corner and 2 white

How to make a simple screenshot method using LWJGL?

房东的猫 提交于 2020-01-06 07:55:41
问题 So basically I was messing about with LWJGL for a while now, and I came to a sudden stop with with annoyances surrounding glReadPixels() . And why it will only read from left-bottom -> top-right. So I am here to answer my own question since I figured all this stuff out, And I am hoping my discoveries might be of some use to someone else. As a side-note I am using: glOrtho(0, WIDTH, 0 , HEIGHT, 1, -1); 回答1: So here it is my screen-capture code which can be implemented in any LWJGL application

Lwjgl/openGL window size always stays the same despite changing width and height

社会主义新天地 提交于 2020-01-06 04:36:08
问题 For some reason the size if the window always stays the same size even when i change the width and the height. I think the problem is something to the viewport as the viewable area in the window changes correctly but there's always a black area in the part of the window that is not used. I've probably expalained this really badly but any help would be much appreciated. I've put a screenshot of the window below.. public class DisplayExample { private int width = 800; private int height = 600;

Exporting eclipse project to jar

坚强是说给别人听的谎言 提交于 2020-01-06 03:27:07
问题 I did check the already answeared questions which have almost the same topic as this question but none of the answeared onces were able to solve my problem. I have been searching now online for about 4 hours and tried soo many different things to solve my problem.. Im trying to make a Pong game in Java and now i wanted to export my project so i can send it to some friend so he can try it. Im using LWJGL for this project so i do have some jars added to the referenced libraries, And the LWJGL

Linking and compiling shaders for OpenGL 3.3 and 2.1 using LWJGL

徘徊边缘 提交于 2020-01-05 05:50:06
问题 I am using LWJGL to create an OpenGL context. I can get it running on my machine (OpenGL 4.2 compatible) and with changes to the simple shaders also on OpenGL 2.1. I have to write code (the shaders, or rather the linking and compilation of them, seem to be the problem here) that is compatible with OpenGL 2.1. I assumed it would be easy to just write: The Frag shader: #version 120 in vec4 pass_Color; out vec4 out_Color; void main(void) { out_Color = pass_Color; } The Vert shader: #version 120

Is GLFW designed to use without LWJGL (in java)?

倾然丶 夕夏残阳落幕 提交于 2020-01-04 05:30:25
问题 I know LWJGL is just a wrapper for OpenGL. It's a java library designed to use the lower level OpenGL functions in the java language. As far as I understand now, GLFW is just a library which makes it possible to create better windows to display the graphics. So GLFW is just a library for creating windows in a better way than LWJGL did before. Is it true that GLFW is not for creating graphics, but just for creating displays? And GLFW is not for using alone, you still should just use the LWJGL