Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: OpenGL Loading Texture (LWJGL) on: 2014-01-18 03:23:10
Ok. Tried that. With some modifications (file loading was amiss, and the videomode creation crashed it), it works.

Theoretically I can keep this close and try it again on the side, and see which steps I am missing. Hopefully I get it working.

Did you, when learning, have difficulties with glTexImage2D? It feels rather fragile, I am not positive when the data is correct or not.
2  Game Development / Newbie & Debugging Questions / Re: OpenGL Loading Texture (LWJGL) on: 2014-01-18 02:28:43
That was what I was trying to follow, yes. If I use the vertices and texture coordinates provided, it still does not use the texture.

Do you think I should use the exact code of the tutorial, to see if it works, then modify?
3  Game Development / Newbie & Debugging Questions / OpenGL Loading Texture (LWJGL) on: 2014-01-18 02:07:10
Greetings.

So I decided to try learning OpenGL (again), and... for some reason am using Java, and thus LWJGL.

It went well for a while, but I am quite stuck on getting a texture to display.

http://pastebin.com/CfsnEFYr

I feel it is something small, but it has not become apparent to me over 12 hours, so I decided to come for help.

The image loads successfully. glGetError returns 0 (and glGenTextures returns 1 (not 0), if it matters).

I tried glTextCoordx at some point, but to no avail.

It is my understanding that there are several steps:

First, enable textures, and set several parameters (glTexParameteri).

Get an id for a new texture.

"upload" the data for it (I had a lot of trouble with this step. In the current configuration, it no longer errors with 1280 though (invalid enum)).

Bind it.

Draw stuffs.

Unbind it.


I also tried it with binding before the upload, as it seems it does not take a handle/id, but rather affects the current bound texture. No success.

What am I missing?
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Explanation of library/build files/jars, setting up Slick2D on: 2013-03-09 19:51:34
2. Well, I could set the classpaths during development, but they don't exists without the IDE on another computer, so I was wondering how that is specified.

3. Same as above, but in terms of paths to native DLLS and such, especially if you package it all in a jar.

4. What I meant was, in terms of normally loading DLLS using JNI/JNA, what path  needs to be set and to what - a directory of DLLS, for example, or to a DLL itself.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Explanation of library/build files/jars, setting up Slick2D on: 2013-03-09 19:14:36
Thanks for the replies, and sorry this is a bit late. I am a bit confused, though.

First, I would would say a jar is sort of like a normal folder. Does setting the classpath to the file of the jar rather than the directory reflect this?

Second, when deploying applications, how do you make it work for them classpath wise?

Third, on the local paths - same as above, how you you make it work for the user?

Fourth, on the local paths, is it sort of like the classpath, but is a relative point for loading DLLS? By this, I mean, say, you have a folder,natives. When you make a call such as the the system ones below, it looks for them starting from that point?

Fifth, what does System.setProperty do?

Sixth, I don't use Eclipse, but rather Dr Java, which os unfortunate considering all advice seems to be for Eclipse. There is a build path, but I am not sure if this is the same or different... does it need to be set outside, in code, or either way?
6  Java Game APIs & Engines / Engines, Libraries and Tools / Explanation of library/build files/jars, setting up Slick2D on: 2013-03-09 03:56:10
Greetings. I have a threefold question. Technically, I have one problem, but I would like an explanation as to how java mechanics work as related to libraries.

It seems to me that most such questions are how to make something work, but not why it works. But in this case, you do not learn how it works, either, and I would like to know this, not just a quick fix.

My first question is this: many libraries are either in whole or in part, a jar, or several jars. As I understand it, you set the classpath, not to the directory the jar is in, but the jar itself. IS this accurate, and if so, why? (mechanics of class loading, if possible). Is this because a .jar is essentially a folder (albeit zipped), and so this is accurate in terms of file structure?

Second, external dependancies. Those libraries need to use DLLs. I don't need to know how JNI/JNA works at this time, but I am unsure what needs to be done in terms of adding these to classpath or other build paths. What do you do and why?

Finally - I am trying to use Slick2D. I have a classpath set for the jar, and no errors come from there, but I got errors from LWJGL. I linked to those jars, and not get another error,

java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path

How do I fix this, and why?
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

UprightPath (5 views)
2014-09-20 20:14:06

BurntPizza (26 views)
2014-09-19 03:14:18

Dwinin (40 views)
2014-09-12 09:08:26

Norakomi (70 views)
2014-09-10 13:57:51

TehJavaDev (95 views)
2014-09-10 06:39:09

Tekkerue (49 views)
2014-09-09 02:24:56

mitcheeb (70 views)
2014-09-08 06:06:29

BurntPizza (52 views)
2014-09-07 01:13:42

Longarmx (39 views)
2014-09-07 01:12:14

Longarmx (45 views)
2014-09-07 01:11:22
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!